The new project is a digital dash for my brothers Fury. The dash is based around three LED backlit 2*16 dot matrix
LCD panels (Seiko CS550001- from www.eio.com. Each of the six lines displays a
digital readout of a variable (battery voltage, current drawn, water and oil temperature etc).
At either side of the readout is a LED (blue to the left, red to the right). These come on when the reading goes
below or above (respectively) preset limits, which are adjustable via three buttons next to the dash (config, up and down).
I deliberately made the project modular. The first to be built was the display module (LCD panels, LEDs and LED driver IC).
Only when this was completed would the motherboard/mainboard be started on, which includes a 16F877 main processor and various
op-amps and resistors for level adjustment and calibration. The LED driver IC was infact a 16F84 running a purpose designed 1-wire
protocol.
The first problem was getting the panels to do anything!! But in the end I got there :)
I used Stripboard because many of the connections on the LCD panels are common and it seemed the
sensible way of doing it, rather than designing a PCB with lots of parallel lines and then having to drill lots of holes!
The three LCD panels and LEDs were then added (picture via my scanner):
The top right hand corner got very busy after
the IC socket was filled with a PIC 16F84A, a 4Mhz oscillator and capacitors
were added and twelve wires (to the LEDs) were added..... Okay so the PIC was
missing in this picture.........
The display board is now totally finished and work is underway on a prototype mainboard.
The 1-wire LED driver system was re-written as I had concerns about spurious signals coming down the line.
Broken down to it's basics, the system is very simple, the '877 sends a pulse, either followed or not followed by another pulse.
If a second pulse is detected then the next LED is to be switched on, if not then it switched off. The driver waits until
it has received 12 signals before updating the LEDs.
I then turned my attention to the main motherboard and the 16F877 that sits on it. I've done alot of work on the adjustable limit values. These are stored in the '877s internal EEPROM (electronically erasable programable read only memory)...
I've got the EEPROM read and save functions to work, including holding two copies of the data, both with internal checksum markers to avoid strange functioning in the event of
EEPROM failure.....
The interpolation and mathematics system is finished and working.
Interpolation, by the way, is a process whereby a non-linear association is split up into smaller more linear sections for which a simple
mathematical equation can be created.
Although I was hoping that the sensors would have linear relationships I quickly realised that they probably wouldn't so included interpolation from early on.
I've put a potentiometer on the test motherboard for testing and all is well.
Currently that one pot is for all channels but it has allowed me to test the interpolation and
high/low limiter systems.
Now all that's left is to get the sensors calibrated, a little time with some op-amps for level adjustment etc... Then it's a few days working out the
interpolation lookup table values (most of which need to be in binary!) and it should be done :) Then I'm retiring from anything to do with PICs.... the mathematics makes my head hurt too much.....
...... as soon as I've built my beer temperature logging unit anyway....
However, I was concerned that even a single voltage spike down the line could result in all the LED signals being shifted out of sync. In a electrical noise rich
environment like a car, this was unacceptable. Consequently I devised a simple (but so far effective) work-around. After the twelth signal, the LED driver (from
here on known as the '84) turns its input into an output and keeps it high for a period of time. Similarly, the '877 on the mainboard (after sending its twelth
signal) turns its output into an input. If the 877 does not see the "packet" recognition pulse from the '84 it knows that it is out of sync. It then sends filler
pulses until the '84 signals that it has received 12 signals, and is therefore ready to accept a new 12-pulse packet. The '877 then resends the 12 signals again,
hopefully this time without the corruption..... Having done and dusted this I announced the display module "finished!"