Since returning from my trip to Ireland I have spent the last ten days adding a few new features to what I am now calling TurboScan. Here’s a quick summary.
1. Auto Sleep mode in x seconds if no EV CAN activity (power use drops to less than 150 uamps for the logic )
2. Support for up to 8 screens of information
3. Screen selection made with a single externally mounted potentiometer
4. Added KW reading to Home screen
5. Added Power Screen with Horizontal Bar gauge similar to LeafScan
6. Added Motor Amps and RPM screen
The Auto Sleep mode is intended to be used when I switch over to powering the TurboScan from the always hot 12 volt power line in the OBDII cable. This means the TurboScan will always be powered, ready to wake from sleep whenever EV CAN activity is detected.
To support sleep mode I used two output pins and a pull-up resistor. The LCD plus the backlight LED only draws 12 milliamps total. Well within the 45 milliamp limit of the SX28 output drivers. So I only needed to move the LCD power from the 5 volt rail to an output pin and drive the pin active to power up the display. Before I enter Sleep mode all the I/O pins are placed into input mode which drops power to the display.
The MCP2551 CAN also supports a standby mode while still monitoring the CAN lines. Pulling the Rs pin high places the chip into standby so I used another output pin to pull the pin low during normal operation and added a pull-up resistor to pull the line high when all the SX28 I/O pins switch to inputs during sleep.
There are two parts to the total power draw. One is the logic chips which I now have down to less than 150 uamps. The other is the idle power of the switching regulator used to go from +12 down to +5. The one I am currently using draws about 4.39 ma. Still this is not too bad. Total is less than 4.5 ma or 1.3 whrs per day or 40 whrs per month. I have several more switching power supplies coming from China so I still may be able to lower this even more.
One advantage of keeping the processor powered all the time will be the ability to save data over Leaf driving/charging cycles. This is what I am planning to do with the bank of unused registers I have left in the SX28.
I had been looking for an easy way for the user to control the screen selection and after Phil gave me a demo of LeafScan at our last BayLeaf meeting he mentioned he was thinking of a rotary encoder for his design. That stuck in my mind and I noticed a sample program in the SX28 programming books on how to read a Potentiometer with just a resistor, pot and small cap. I added the code to my interrupt routine and had a workable selection method. I found a volume control Pot at Radio Shack that has 37 detents which give a nice bump feel as you turn it. It was however 500K ohms and I needed around 180K so I placed a fixed resistor in parallel. Not linear anymore but not too bad.
The code to control the Pot and convert it to a number from 0-7 has hysteresis to keep the number from bouncing between two values. I am able to get 180 degrees of rotation to cover the 0-7 screen selection range.
The advantage of the Pot is it can be mounted away from the display at a location easier for the driver to reach. For now I have it Velcro’ed to the side of the center console near the seat. The final location might be on the left side in one of the blank switch caps for the Steering Wheel/Side mirror heaters. This way the display can be mounted above the rearview mirror but the control mounted much closer to the drivers hand.
For testing here is what I have now:
The Home screen has been updated to include the power in the upper right corner where I previously had the max gid number displayed.
In this display 11.1 KW are being draw from the battery.
The next screen I added was to display the battery voltage and amps with a horizontal power bar display on the top row. Again this was inspired (copied) from seeing Phil’s LeafScan. Since this is a character not graphics display there is always a space between characters. This turned out to be of use as it makes reading the actual value very easy. Each column of dots represents 1024 watts and there are 5 dots per character. So just count the characters and multiply by 5. One custom edge character is generated on the fly with a variable number of columns of dots.
For those who have not seen Phil’s LeafScan power graphic the bar grows from the left for power out of the battery and from the right for power into the battery. My gauge tops out at 16 x 5 = 80KW.
Here is what it looks like under moderately heavy acceleration (58KW);
Here is what it looks like under regen.
The third screen I added today shows Motor RPM and Amps. The current documentation for Frame 1DA seems to show RPMs in ½ units but I can’t see that. The low order bit is always active so I just shift the RPM value right one and display it. Can any expert comment on this?
Here is the Motor screen.
The current code supports selection of 8 screens (0-7) although only the first three currently have data. The other 5 screens just show the screen number in the upper left corner for testing the Pot selection code.
I am still using my original test hardware with a few resistors and a cap added for the new features. The next step is to build a smaller unit that will fit above the rearview mirror. In that one the logic board will mount directly to the LDC display board. I have the parts just need to solder it up.
Almost forgot, I will also be adding a second CAN Transceiver so I can monitor the CAR-CAN too. So selecting a screen can also software switch to the correct CAN interface for the data to be displayed.