Welcome to Dave-Rite auto system part
three
Part one mechanical part
Part two electronics circuits
Part three programs and programming
system
Danger I
am no keyboard monkey, micro-pain, or cyber-warrior
The
following program is the work of king Neptune.
If you use this circuit in a life
support system don’t blame me if you have a bad day.
The hart of the system is the Picaxe
micro controller these systems are incredibly easy to learn and use.
You can down load the programming
program from
www.picaxe.co.uk but please read the license agreement for personal use
only.
After you have loaded the programmer
in to your computer, build your controller plug it in to your computer;
flash up the Pic and away you go it’s as simple as that.
Test board
Above is a picture of the test board
that I developed the soft ware on. I call it the Dave-Rite dive simulator,
all the following pictures are taken from the simulator not from the unit it
self. I made it up from a pic 28X experimenters kit, three pots which I used
to simulate the o2 cells inputs, and some LED, s to represent solenoid
outputs etc,
Above right is the LCD screen when
you first turn the unit on it shows the three cell readings along the top
line and the loop count bottom right.
The way the program works, the core
of the program reads the cell voltages and writs the cell values to the
screen by a subroutine this I call the main loop (RECELL) every time this
loop happens it counts. After a preset count the count resets to 0.
The count can be used for a visual
check that the micro is not hung up.
Above Right, the letter bottom left
of the screen shows the operating mod L for low set point H for high set
point M for manual the solenoid dos not inject when in manual.
The mod can be changed any time on
the run by using the menu switch.
Above left operating in low set
point the second number on the second line is the average of the three
cells.
Above right operating in low set
point cell 0 has an astras beside it indicating that it has been voted out
of the average because the cell has gone low. The unit needs two cells
reading correctly before it will take an average the average is what it uses
to estimate the PP02.
If a cell goes high compared with
the other two cells the unit goes in to alarm.
It has three other alarms low PPO2
high PPO2 and cells out of range.
The three cell readings are updated
twice a second, when the loop count reached reset the micro checks the cells
for out of range, takes average, then injects or no injects depending on
PP02 level.
The loop time changes with error
from set point.
The injection time changes with
error form set point.
On the next page is a picture of the
unit in alarm mode cell 0 has gone high compared with the other two cells
the high intensity LED flashes and a C is written to the bottom left corner
indicating a cell alarm. In cell alarm and high PP02 alarm the solenoid
stops operating until the alarm state has been reset and the problem fixed
or it is operated in manual mode. And if you are having a real bad day you
go semi closed or bailout.
I dive this unit Neely every weekend
on wrecks to 80 meters and it has never locked up or stuffed up other then
cell problems, which happen whatever system, you use.
If you do build something like this
make sure you test it real good there is no second chances in home building
game.
And have a nice day.
|