Mittwoch, 18. Januar 2012

What is the "Franzbox"


Hi everybody,

For some time,  am working on a metering-system for electric vehicles.
This is a small unit, a little box with some parts around an Atmega 168,
a display with 4 x 20 characters, a knob to be turned and pressed
and eight connections for supply, metering and output.
There is a black 14 pin-plug for either connecting a  external display and for
reprogramming the box and there is a red plug for a serial interface
and a few extra inputs/outputs, where all the unused ports are accessable.

There are some main functions:

As it is impossible to see the state of charge (SOC) of lithium cells it is necessary
to count Ahs.Metering the current (not by a shunt, but by a current converter!)

Calculating the used Ahs (about 15 measurings per second)
Displaying them on the Display and on the original tachometer !!!!!
(A frequency is generated that lets the tachometer display the current,
1000rpm = 100A)
Displaying the state of charge (SOC) on the display
and also on the original fuel gauge.
Capacity, and all the necessary parameters are adjustable by a menue.
No screwdriver is needed for adjusting any parameter.
The output for the fuel gauge is adjustable for 0% 50% and 100%,
no matter if your gauge is an "old" type where zero is at low current
or a newer "VW"-type where empty is at higher current than full.
Just adjust empty, half and full by software in the menue, and it works!
The frequency for the tachometer that is used for displaying the current
can be adjusted for 4 , 6 and 8 cylinder tachometers that are driven by impulses
from the ignition. Tachometers driven by CAN-bus dont work.....sorry........
(eventually they even work if the impulses from the box are coupled
with the original ignition sensor signals.......but that was never tested.
There is even a function in the menue to set a minimum frequency to
cheat the "dynamic oil pressure-control" of some VW/Audi that beeps
when the motor stops or starts and there is not the correct change in the signals
of the two oil-pressure-sensors.Such things like measuring charging current
or displaying recuperation as positive current on the tachometer can also be set
in the menue. The box has two power-inputs one for constant supply, one for
the "ignition" to recognize standby.
A few weeks ago i added a display for the 12V battery and an output
for a signal that can switch on a little charger for the 12V-system
if the voltage falls lower than 11V.
(You dont have to use this, but the option is there)
another little function is telling you if there was a restart, and the
info has to be reset by pressing the knob.
For all functions there is only one single knob
pressing it only for a moment resets the Alarm after a reset caused by
external signals or power-off, pressing the knob for at least 5 seconds
resets the counter, pressing it longer than 15sec. brings you into the
setup-menue and a short tip ontothe knob during normal use
and activated BMS-functions switches between normal display
(max, min and average) or single cell display


Further there will be some BMS-functions in future.
The program is already on the box, but it will be changed in some parts.
There will be displayed the cells with maximum and minimum voltage.
Every single cell is displayed one by one, and if pressing the knob
and turning it then, every cell can be accessed directly.
For the future i will not display every cell one by one but the average
cell voltage so that one view on the display is enough.
If you want to see every single cell you simply have to press the knob
an then you can read every cell by turning the knob left or right.

I intended to measure the voltage of every single cell by a little
ATtiny per cell that are coupled by a serial connection.
Only one little cable from cell to cell is necessary.
There are isolators at the highest and lowest cell.
The difference between the single cells does not require
electric isolation. Data is sent from cell to cell in some kind
of  "daisychain", that means, the main unit sends a starting impulse,
and every cell sends its data then, one by one, this works qiute fast.
at least fast enough!

The BMS-part is not yet "ready", but it seems to work as intended.
The older version polled the voltage fom every single cell,
the box sent one byte with the cell-number and the cell answered with its data.
This worked good, but the measurings had some time between them,
so they could not be compared directly.
Now i will send one "measure" signal and then i will collect all the data
separately to ensure measuring at the same time.

The Ah-Counter is already in a praxis-test and works fine for some months now.
It is not a "wonder-box", but it measures and counts as good and exact as a simple
instrument with a range of +-800A can do this.
You cant expect exact metering of 15A charging current with a resolution
of 3A, but it is exact enough to tell you when the battery will be empty
when you discharge it with 100-400A.But even a rather raw counting
of charging energy is helpful if you are only recharging partially.

I started this english discription for all the people out there that dont speak german.
please excuse all the mistakes, but english is not my native language
although i am sure i am able to explain you everything i want to tell you
even in english.

At the moment there exist only a few prototypes and there will not be a series.
(at least not made by me......) if anybody wants to build his personal copy,
i can submit the data of the board (EAGLE-files) and the program.
(only for personal use, please,don't sell it to the chinese....
and let me know what special purpose for using it you had found).
Converting all the text-messages to any other language will not be
a problem, as long as there will be enough letters.
Maybe, even adjustable in the setup, that depends on the rest of
Memory when all other functions are implemented and tested or
 maybe i will find simple descriptions that can be understood in many languages.
( it dont think it is necessary to translate " Setup offset"  "in" or "out"
"max" or "min" or "on and "off" )
The prototypes are made and tested in Germany by Germans, so they talk german.
if everything works correct there will surely be an english version too
with the result of much more english words in the "german" version then
as this makes it necessary for me to update two versions of one program,
and meanwhile there is a lot of text in it!

One realistic possibility might be to take as much english for Setup as possible
and different languages for the messages in the display.
 At the moment there is only  one german shortcut in the display,
entn  means taking power , lade means charging for the direction of power,
so, chrg. or disc   or inp. or out or outp. i have five letters there
including the point, so input and outp. are possible too and almost international.
.......we will see, that is not a problem now

I dont have the time to build up more than a handful at the moment and
the boards when made as prototypes in small numbers are too expensive (30 Euro)
but it is too good to end up in some drawer.....
I intend to add a max232 and a SN75176 for getting RS232 and RS485
connectivity additional to the serial TTL signals that already are there.
but this will be all changes that are planned for the next future.
Then it is Your turn to find possibilities for using this board
The board also can also be equipped with two
half-bridges for actuating 12-24V dc-Motors up to 20 or30A by pwm
and the layout should even be "Arduino-compatible" although i did not test this yet.

(can the display-signals be connected in arduino as "free" as in Bascom????
this is how they are connected now, all on portb
Config Lcdpin = Pin ,    Db4 = Portb.0 , Db5 = Portb.1 , Db6 = Portb.2 , Db7 = Portb.3 ,
E = Portb.5 , Rs = Portb.4
if this scheme works with arduino, the board is compatible! otherwise the display
has to be connected a little bit different, not a real problem!
E on B.5 and Rs on B.4 is "historic" and should better have been swapped long ago,
but then other things would have to be changed in many other older projects.
Not a problem for me now! if i schould make a board for the display, there will be
some jumper or bridge to set both possibilities)

Franz

If you like to have a look on my german blog, try it!

http://vehikelfranz.blogspot.com/