the tachometer is an amp meter misuse.
In connection with Michael's New Beetle Electric Conversion
I had a few days ago, the idea spontaneously,
that the existing tachometer but could use as a wonderful
ammeter.
The speed is rather unimportant, but much more interested,
if you reach the desired drive in an electric propulsion
with the optimal energy consumption.
Since you have such a beautiful instrument with a scale of 1
- about 6 and the metering current
is 0 to about 500A ideal can not do that !!!!!!
The speed measurement is also complicated and
actually rather pointless who cares anyway?
It's also not here see a high-precision display,
but mainly a question of whether the currently engaged gear
is the right one.
A four-cylinder fires twice per revolution.
50Hz = 1500 rpm = 100Hz 166Hz = 3000 rpm 5000 rpm
So you would need only a regular CT
............. so what to buy exist!
.... and a bit of electronics, which makes it the right frequency!
?????? what do you take the most sense ????????
!!!!!!!!!!!! ATtiny one or Atmega !!!!!!!!!!!!!!
(ok, that is slowly boring!, I also promise
soon be time for something completely different to describe, how about a tiny hydraulic ram?)
The idea is still very fresh, but that should be very easy to solve.
The current transformer provides a voltage proportional to the current
(exact dates, I have to look out)
The voltage can measure a ATtiny and convert it into a number.
eg 0-5V = 0-1024 because the AD converters with 10bit
The timer can count down the ATtiny 256 steps up or
and corresponding frequency adjustment (divider - quartz oscillator or internal) switch
according to an exit.
for 0 to 600A need 0 (1) (10) - 200Hz So there would be room
can hintrimmen which is self-10a 200Hz loose enough
(display 300 -6000 rpm or 30 to 600 A)
The program I have now considered yet, but it will be tiny
.
set variables that you configure
timer
measure transmitter voltage, multiply
inverse of the transmitter voltage
with constant
passed to the timer
......... that's it!
Hardware:
ATtiny 13 and 25 (containing what degree lying around)
5V regulator + Elko
input voltage divider (if sensor voltage> 5V) + Elko
possibly resistant to the vapors of the input transistor
+ resistance (not Reacting with MOSFET) for 4 clamps to 12V
+
The small circuit board should be enough!
In a few days there are more on the subject!
Whether that is now incorporated or not does not matter
but now I want to know if or how well it works.
I am sure that it works, if not
with one (1) Timer (ATtiny)
then at least two timers (Atmega) ... let's see, measure voltage
But, convert and output via PWM, the small self
ATtiny13 a two-time simultaneously and up to a timer
other configuration is almost the same basic program!
I know now wants
and therefore I prefer the now by !!!!!!
mfG
Franz
7/29/2010 It works great!
Unfortunately it has not worked with the ATtiny, the 8-bit timer
is simply a number too small.
This can be a sufficient cover band.
begin with either 100A or above out
's in 30A steps. ... Too bad!
This is unfortunately the entire series ATtiny not be used-or do you?
(02:09:10 Note: I have on occasion even try when the timer prescaler
reconfigured during program execution
.... if that is possible, fast enough, then that would go well with a
ATiny 13 or 25 .... .. I habs but as yet not tries!)
But can a ATmega48 that! With its 16-bit timer.
The proposed power converter LEM HASS 200 provides
a middle layer of 2.5 V 0.31 V per 100A,
polarity appears depending on the current direction
This signal strange at first glance,
but after a 10-bit A / D converter to 5V reference
are exactly 64 steps per 100A.
This fits perfectly! So you can theoretically + - Measure 800A.
(One can not fully utilize the area, but +-600A
should go at all costs)
The tachometer of a four-cylinder engine
needs two pulses per revolution
The display will ultimately 100A's place 1000rpm, so we need
starting from 2.5 V 0.31 V 33Hz ever be generated. Since
generates the output frequency with the "Toggle PinX" command
must deliver twice the frequency of the timer.
How to implement this task?
The solution was ultimately very simple
The clock will count with a fixed cycle,
in this case up, but it would go down well,
you have to tell him just where to start, he loszuzählen.
at each overflow, an interrupt is to say after 65 535
and there is the desired output pin switches
The number of cycles necessary
is a function of the reciprocal of the current.
That sounds complicated now, is but it is not
In the end, only one constant through
the output value of the AD converter are shared,
've got the number of counting steps of the counter
for the desired frequency.
You can either count the counter to 0 and the number
can accept directly or
the counter counts up, then you have to subtract the number of steps from
65535th
prevent Then another that is shared by 0
at 0A, that's actually already
The program is not yet optimized
, but that's
is ever quite useful.
... and because anyway an Atmega
has become I've packed inside the same with even
a display. This also helps
when adjusting the constants because you get all
displayed intermediate results with the same
.
presented at this point I realized that the program
just 10% of the memory of ATmega48
belegt.Deshalb I decided to pack the same as an energy meter with
still pure.
The current is already measured
The voltage can be measured easily.
still lack the time!
There are two timers
The output pins of Timer 0 are already
already provided for input keys and shows
therefore offers itself as a timer for the time.
at the intended 4MHz
results as "good value right", a frequency of 15.5 Hz that is calculated
15.5 x per second performance from
current and voltage and adding the results and
ever by the number of measurements per hour parts
(55 800 hour) there you have the
Wattstunden.Ich have not converted to
KWh, because the output is formatted numbers
a huge memory hog.
lift I up to at the end!
Then a small menu to
enter the starting value.
It sets out the energy that you would like to remove the battery and the display
then pays down to zero.
The whole thing appears in watt-hours and%
. The
.... Memory was still not fully
and there is still a timer (Timer 2)
the umd but can the% value as
output PWM signal, output is still free-OC2B
This works also!
The PWM signal can thus be drilled
that the existing fuel gauge
controls, thus indicating the
residual energy.
......... now 4k Flash, however, are full!
I hope to bring another over dinner
adjustable warning at about 25% residual
.
should do the trick, if I display my
remove intermediate results and optimize the program is still a little
.
a little video of the almost finished
transducer:
(unfortunately, the display is barely legible)
.... and even a small function demonstration
the current development status
The energy meter is supposed to be in my BMS integrated
- so he has his values via the serial interface
to the master display
weitergeben.Das display of the energy meter
I have provided only for the configuration
, then immediately ran rare, and the
is probably somewhere near the current transformer
be installed or the battery charger.
The transmission of values is now,
but all those interrupts the timer
and the many calculations of energy
the reaction time is quite long.
Just all takes precedence over the actual
program execution (display + serial output) has
brings it on this little increase in time to
because it set the timer to run faster
würden.Mal see what comes to mind yet
................. it would have been much better
, when no longer appears so much
would!
of postscript:
Thus, the currently sees on my "old" from Display
(ATtiny2313, 2k):
cell 16 is 3.39 V
cell 5 has the highest at 3.56 V and
cell 13 with 2 , 64V
the lowest value, the total voltage is 128V
and the batteries still have 95%
energy in it.
In the 4 x 20 display could still pack an
more info, but the
really makes sense?
such as: (
older photo with the "new program" Atmega 48)
the average voltage
is important to me! also the
12V battery.
But that is quite a bit for the small
DIP204 Display
Let's see what ideas come from there ......
Addendum 12/03/2010:
This project gets just a very interesting
momentum .......
Today's cars have usually no classical
tachometer more, almost all signals
, and statistics are now in some
generates a control computer,
monitored, evaluated and often
recorded. A very extreme example
or the first in which the really
has consistently used the SMART. Since everything is
via CAN-bus ......
each wheel is monitored, steering wheel position,
lateral acceleration, inclination angle,
injection volume, temperature, fuel level,
inserted straight path .... etc. .. all that thrilled
as a data packet permanently of the CAN-Bus!
If you want to upgrade as a tachometer
, then you can indeed infect the
, but he must first time in
central computer will be unlocked ........
Apparently the whole rev
nothing but a small step motor
with hands! Let's see if I can move this little
recalcitrant part to
display reasonable values?
If really only a step motor,
then this should be pretty easy!
's see ......... I will report here about
when I know more.
Addendum 13/12/2010:
YES!! It works!
It is really just a less expensive stepping motor
and it can be directly controlled with the Atmega!
$ regfile = "m48def.dat"
$ crystal = 8000000 $ baud = 1200
Config Adc = Single, Prescaler = Auto, Reference = AVCC
Start Adc Dim
Adcin Integer
Dim Adcstep Integer
Dim number of steps As Word
Dim Adcin8 Integer
Dim Steps As Integer
Dim phase (4) As Byte
phase (1) = 8
phase (2) = 2
phase (3) = 1
Phase (4) = 4
Config PORTC = & B00001111
Initl:
If Adcstep < 500 Then Incr Adcstep
Gosub Subsm
PORTC = phase (steps)
Waitms 4
If Adcstep < 500 Then Goto Initl
Inith: drive 'right to stop
If Adcstep> 0 Then Decr Adcstep
Gosub Subsm
PORTC = phase (steps)
Waitms 4
If Adcstep> 0 Then Goto Inith
Thurs
Adcin = GetADC (5) =
Adcin Adcin / 2
If Adcstep < Adcin Then Incr Adcstep
If Adcstep> Adcin Then Decr Adcstep
Gosub Subsm
Waitms 4
PORTC = phase (steps)
Loop
Subsm:
Adcin8 = Adcstep / 4
Adcin8 = Adcin8
Steps * 4 = Adcstep - Adcin8
Steps = Steps + 1 End
Return
......... that's it ..........
"gain" and some little things still need to be adapted
, but is the basic framework.
I now have another little
refined method found to produce the sequence of steps
but so it is also good, and that idea is at least
me about yourself ....
and yet another new idea:
Recently I have a full
entire shell annoyed Batteries,
can tell none of whom more
which is still usable there.
The energy meter program could be
problems as the basis for a battery capacity meter
use.
single discharge a fully charged battery with about 1-2A
and energy
count until the battery voltage falls below a certain
.
off and then display the value
the display.
already know you know!
Maybe I'll bring it even
make adjustable under, and discharge Spannug
..............
yes it should be even larger
batteries can be tested.
(from cell phones to wrench ....)
's see, could even go with the voltage
automatically?
measure startup, and remember
somewhere around 70 - 80% off ....
I must study
times tables and see how it is defined,
what it says on such a battery!
up soon
Franz