Sunday, March 23, 2014

The Dashboard Continues

Rev 2 of the Dashboard

After a lot of cutting, sanding and re-doing, the dash is in but not covered.  Next step is to find some appropriate material to cover the rails and dash.  Next step is to create the center binnacle frame but that may mean pulling the binnacle forward to make is in-plane with the rest of the dash.
The before condition
Driver side


Passenger side with new glove box door

The new speakers  make a world of difference.  The glove box is not built yet, just the door is in place with the magnetic catch.  Having the stereo by the driver is also much easier than the old position in front of the passenger.  The Arduino is mounted in a portrait orientation since this was the only way it would fit with the defroster vent running right behind the dash.    The stereo barely clears the same duct.  There is still the question about adding the red and green status lights to help grab the driver's attention.

Minor Arduino enhancements this weekend:

  1. Limit the screen update frequency to no faster than once every 3/4 of a second.  These seems more than fast enough and provides sufficient time to perform all of the queries to the controller between updates.
  2. The system now reads the status of the accelerator switch to determine if the system is in regen mode.  If there is controller current and PWM values and the accelerator switch is off, then it must be in Regen.  With this information, the power reading on the display turns "Green" to indicate regen.  It is White normally, Yellow above 12,000W and Red above 18,000 watts.
  3. Added a rolling column graph to show power over time. This is not terribly useful but it does provide a quick glimpse to see how much power was used for a recent hill climb or acceleration.  It shows about 20 bars each representing 3/4 of second.  With the limit screen real estate available for this, it is not very high resolution but the bars change color in a similar manner to the power indicator in #2 above, to speed interpretation.  The whole graph is about 200x50 pixels.

Testing

Completed another extended drive today, 15 miles with hills and one 45 mph stretch.  Everything worked well, no real issues.  The motor heated up to around 100C during heavy loads but cooled off to 80C as soon as the load was reduced or the car was stopped at a red-light.  With the ChargePoint charger at work now, it be easier to assess actual energy efficiency since the charger will report total KWH provided during a charging session.  
Here is a ChargePoint screen shot from a quick charge last week.  This is reporting about 1.1 KWH, which is a 25% of the 4 KWH usable battery capacity. Took about 40 minutes.  This also included the recharging of the 12V accessory battery which has 100W charger.  Their Android app is also very handy since it reports real time charge status like time and power.  Makes it easy to know when the charge is complete.

ChargePoint Data Reporting - Shows actual KWH used to recharge

Sunday, March 16, 2014

New Dashboard

A Real Dashboard


Jane came with a fairly limited dashboard (instruments + storage + decorative features to hide in inner workings).  It has the 3-gauge binnacle with the speedometer (w/ fuel gauge), temp and oil pressure gauges.  Besides that, there were two shelves (Vinyl covered cardboard) on the left and right which had limited value except to gather junk.  The blue vinyl never fit that well.




This weekends project was to build a real dashboard and here is the current state.    You can see the Arduino display positioned where the driver can see it through the steering wheel.  This new wood panel will be covered in some durable material along with the top and bottom rails.  the panel mounted with two brackets which connect with wing-bolts to the supporting structure holding the lower rail.  The side vents are going to be capped and only the main blower will be available fresh air intake.


The plan is to have matching panels on each side and a nice wrap-around for the binnacle.   All matching and all wrapped.  The radio will be moved to the driver side just, to the left of the Arduino.  The passenger side is getting a small glove-box.  The final addition will be two 4" speakers for the stereo, probably close to where the vents were originally place.  This will improve the sound quality since Jane currently only has two speakers in the rear deck. Also, the USB for the stereo and the Arduino will be routed to the Glove Box for easy access

It only took a few minutes to add the bonnet hold-down latches.  Picked these up from 7ent.com : Bonnet Hook Kit.  They fit great and provide a very secure yet easy latching.  Much better than the quarter turn screws that were in the holes shown.  A little patch work and those holes will be gone.



While inside the dashboard, the battery monitoring Arduino is getting moved to the boot.  Two benefits - The current monitor AD8210 will be closer to the shunt (1 foot vs. about 7 feet of wire) and there will be no need to bring the battery voltage (84V) into the cabin for the adapter to power this Arduino.  This Arduino must be isolated from the main 12V supply which is why it is powered of the main battery pack, no the 12V accessory battery.    However moving this naturally threw off the calibration so that will be tomorrow's task.  Now only the battery alarm and fuel gauge signals are being routed through the cabin to the dash, a better and safer design.

Sunday, March 9, 2014

Battery Monitor

Today, the battery monitor board got converted from a prototype to more of a reliable solution.  This board has two functions:
1) Power up the CellLog board so that they don't pull power when not needed.  This is paired with the ElectricPorsche CellLog board.
2) Control the charger contactor to prevent over-charging.

Theory
1) Monitor the ignition switch and 220V input and if either are active, turn-on the CellLog.  There is also a test switch to allow for a quick check of the battery status.
2) The Charger contactor is powered by the 220V supply (through an adapter).  If a CellLog alarm is triggered, shut-off and latch the contactor so that charging stops until the 220V is removed (unlatching the relay) and reconnected (restart the process).  The CellLogs are set to alarm at 3.6V per cell.  

Here is a schematic for the board.



Extended Test Drive

Headed out today for a long drive to see how the overall car would do including the new digital dashboard Arduino.
Cover 17 miles and used about 30AH - This leads to the following data points
  1. Total Range with 48AH of usable energy (80% of the 60AH battery capacity)  = 27 miles
  2. Energy Efficiency = 30AH x 81V = 2,430 WH / 17 miles = 143 WH/mile
A few notes - Data  from a app called GPS Essentials.
  1. Top speed for this drive was 33.6 MPH  - Average speed 16.3 MPH (including stopped time)
  2. Miles traveled 17.3
  3. Total Gain of altitude 2,881 ft - Regen is on and working well - This is not net altitude, just how much climbing was measured during the drive.
  4. Motor Temp - never above 70C

Remote Charging

Tested the J1772 adapter at one of the Oregon State BLINK charging stations and it worked perfectly.  The BLINK station recognized the car was attached and when the manual charge switch on the adapter was turned-on, the BLINK station energized and charging started.  At $1/hour, BLINK is great for emergencies but no a cost-effective charging option compared to home.  The following circuit is used to control the signaling to the EVSE, courtesy of EVTV - Control Signals


Sunday, March 2, 2014

Dashboard Computer

Everything almost works..

It all started with a desire to have a full color graphic display as the primary interface to the car's electronics.  The first version was a Arduino Uno with 16x2 character display.  Worked well, but 32 characters may be enough for a Tweet, but not to quickly convey to the driver useful information about the status of the motor.

This is the new larger Arduino Mega 2560 R3 from SAIN SMART with the full color 3.2" 320x240 touch display.

The other advantage over the Uno is this MEGA has 4x the program memory space using the AVR2560 processor.  Physically it is not much larger than the Uno, a bit longer.  The middle board's schematic is available at this link.

The following is a detailed account of integrating this with the SEEED Studio CAN Bus Shield, which was working great on the Uno at 1 Mbit/S
  1. SPI Bus - The 2560 moves the SPI Interface to different pins on the board in addition to the Arduino standard 6-pin ICSP header in the middle of the board.
  2. The SEEED Studio CAN BUS board (WIKI & schematic) does not use the ICSP header to access the MOSI MISO SCK signals which would have been logical.  Ironically, it passes through this header but does not actually have traces to these signals, but connects to the peripheral headers for digital I/O signals 10, 11, 12, 13.  The table in the connections section here shows the mapping.  Note the SD Card interface on the TFT board uses the same chip-select (Pin 53) so this will be inoperable if it is shared with CAN-BUS as a chip select.   The SD Card could be useful to store bit-maps for displays and possibly performance log data.   Schematic for the LCD & SD Interface Board.
  3. So after adding these jumpers to move the 3 signals from the peripheral headers  to the ICSP header on the CAN shield and the ChipSelect (it has several names: CS or SS or SPICS or SPI_CS) to I/O 53 on the Mega's extended I/O connector (2x18) the controller was able to initialize the CAN shield controller.  SPICS (SPI Chip Select) signal also had to be changed in the mcp_can_dfs.h file to define this to signal 53 (Mega) from signal 10 (Uno). 
  4. However, as soon as the the Kelly Controller was connected to Jane's CAN bus, the interrupt indicator on the shield illuminated and no data was be read from the shield.  It "appeared" to be sending data onto the CAN bus, but nothing was being read back.  Since the TX, RX and INT indicators were illuminating, it seems like data was available, just the MEGA was not reading it.  The CAN Shield uses an interrupt to signal the MEGA that data is available.  By default it uses INT0 (Interrupt 0 Uno I/O 2, pin 3 on the header) which is attached to the ISR (interrupt service routine) with the attachedInterrrupt function as interrupt 0.  This page also shows the differences between the UNO and MEGA interrupt.
  5. The SAIN SMART LCD Shield for the MEGA also uses INT0 (maybe for the touch-screen) and has a 10K pull-up resistor on it.   So it appears that the interrupt from the CAN Shield needed to move.  The MEGA has several as shown on this schematic.  Interrupt 4 (which may be labeled as (RXD1/INT2)PD2 on the Mega schematic/pin-out) was selected and it appears on I/O pin #19.  It is "mis"-labeled on this schematic as INT2 and there are several references on the web to this being INT2 but don't be fooled, it is attached in SW as INT4.  
    Dashboard Display
  6. After all of this the MEGA with the large LCD is now talking CAN.
  7. Mechanically, this also required some adapting.  Since the CAN shield is not designed for the MEGA platform, it does not have a header-pass through for the Extended I/O of the Mega.  Two layers of trimmed stackable headers passed the signals up to the LCD adapter. 

  1. Next steps - Mount the display and work on speeding up the refresh rate.   Creating an isolated communication link to the fuel gauge Arduino will permit this display to be the primary interface and allow the Fuel Gauge Arduino to live in the boot.