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.

Sunday, February 16, 2014

Battery Protection

High Voltage Charging Cut-off

After some good basic Electrical Engineering 101, Jane now has a charging cut-off circuit that monitors each cell individually. This involved designing and wiring a circuit (schematic will be posted soon), that takes the alarm output from the CellLog monitor and uses to turn off a high-current contactor between the charger and the batteries.  As part of this enhancement, a couple of relays have been added to only turn on the CellLog monitor board when either 220V (charger) is connected or when the key is turned on.  This should solve the slow drift that the CellLogs were causing on some of the cells, since they don't draw evenly across the sub-banks.  Also, put on push-button switch to provide a quick check option for the batteries.  Pushing the button, powers up the CellLogs.

The relay controlling the charging contactor require two special considerations:
  • Latching - Wired it so that it would latch ON once the alarm triggered.  This way, even if the alarm condition clears, there is no way to resume charging without disconnecting the 220V supply.
  • Delayed-On - Added a cap (4700 µF) across the coil and a resistor (50 ohm) in series with the coil to require the alarm to sound for about 2 seconds before the relay will activate.  This filters short alarms and any temporary issues that may occur at power-up.
The CellLog Monitor has a buzzer attached to alarm if a cell is out of range.  A quick connection to the original Alternator indicator on the dashboard now provides the driver a red warning light (replaced with LED bulb for extra brightness) if an alarm condition is in effect. The buzzer is audible inside the cabin but if the windows are down or music is up, it may be missed.

Also, added a heavy-duty marine-quality manual cut-off switch on the positive side of the battery pack.  This provides a quick, secure cut-off of the high-voltage pack, making it safer to work on the systems.




The CellLogs are set to the following:
Voltage Range: 2.5V - 3.6V
Delta P (maximum cell variation): 100mV
Alarm Type: Normally Closed  (this provides a safety if a unit become disconnected or is not functioning, since the alarm will open up, triggering a alarm condition)

Pack Voltage:  
  • 6 Cell sub-pack = 17.5V - 21.0V
  • 7 Cell sub-pack = 20V - 25.2V

2 CellLogs have 6 cells connected to them, 2 have 7 cells to cover 26 total cells.

Completed one charge cycle and the system performed well.  One cell was slightly higher than the rest and hit 3.6V, shutting off the charge current.  Next is to test it while driving.  All of the cells are within 25mV of each other. 

Sunday, February 9, 2014

Heat

A little warmth is a good thing...

Well since winter has arrived in full force (18" of snow this week), having a heater in Jane became a priority.  Originally the gas engine provided hot water to the heater coil but that is not possible now, so this project required a bit more invention.  The final implementation ended up being:


  1. A ceramic heating coil from a 110V space heater: Warmwave 1500-Watt Ceramic Electric Portable Heater
  2. A high current contactor to control the heater: Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid  - First attempted to use a 30A 12V automotive relay but it melted with the high voltage.  The heating coil should only be pulling ~10A.
  3. High-temperature cut-off Protection: Amico 5 x KSD301 250V 10A 70 Celsius Temperature Control Switch Thermostat N.C
  4. Lighted toggle switch for the dashboard.  This was placed where the old heater mechanical control was located.  The old controlled connected to a valve which regulated the water flowing to the heater coil.  The lighted version will help the driver remember to turn this off when not in use since it will use the same power source as the drive motor, impacting overall range.

Connecting it all together....

Electrical

The blower's original switch controls the ground to the blower, so that was connected to one side of the contactor.  The new lighted toggle switch was wired to the 12V side of blower motor which is switch by the ignition switch.  This way the ignition must be on and the blower switch on before the contactor will activate.  The contractor was wired through a 20A fuse to the 84V battery main battery (after the main contactor, which is also activated by the ignition switch).

Heater Contactor mounted on the firewall
The High temp cut-off device was wired in series to the heating coil and mounted inside the blower housing near the coil.
The coil is rated at 1500W at 120VAC, so at 84VDC, I am not sure just how much heat will be available.

Mechanical

The ceramic coil was much smaller than the original Mini water coil so a adapter plate was cut from sheet metal and fit within the blower housing with the power wires being fed through on of the water inlet holes in the housing.

Cooling the motor -  A bit of irony

Cooling the Motenergy ME0913 has continued to be a problem.  Since the motor is running in reverse, the built-in centrifugal fan does not move any air. The hall sensor magnets are connected to the fan, so it cannot be removed or modified easily.  After attempting to utilize two 1" hoses to pull air through the motor using a 200CFM blower, the motor continued to overheat (100C) under only a slightly elevated load (driving the hills around home).  
Next idea...  
  1. Cut a 4"x1" rectangular hole in the motor fan cover (black area on the right in the photo below).
  2. Deform a 3" to 4" round duct adapter (shiny sheet metal with the bar-code in the picture) to act as a funnel from the 3" flexible hose from the blower to the round cover with the rectangular hole.  The adapter was screwed to the cover and sealed fairly well.  It would have been better to mount this on the end of the motor, but there is no room since the motor is right up against the inner-fender.  To avoid the cover screw shown in the photo there was very little room for the funnel.
  3. Currently, the blower is set to pull air through the motor since that is direction that the built-in fan would move the air if it was functional.

ME0913 Traction Motor with cooling adapter.  The new right front coil spring is visible through the hole
in the sub-frame.
Next ideas - Can the motor heat be directed into the cabin to supplement the electric heat?

Tuesday, December 24, 2013

26 Batteries and Balancing

Balancing Saga

Went out for a Sunday drive this weekend and about 3 miles in the drive the battery alarms starting going off whenever more than 60 amps (1C) were being pulled from the pack.  Seemed strange since the pack was just charged.  The battery monitors showed several cells with large differences (DIFF Error). The alarms was set to ring at 150mV difference across the sub-packs (6 or 7 cells).  After  the 100A draw, the monitors were showing 250mV differences for several cells.

Well this is what all of the posts on the web about balancing tried to say.  If the cells are not balanced, they will drift and eventually some the charge difference between cells will be enough to be noticed.

Well, we limped home from the Sunday Drive and the cells are returned to a nominal voltage of ~3.2V after a few minutes of rest so I know they were not too discharged, just getting low.

Nonetheless, this has prompted a full manual balancing process.  Picked up a Onxy 235 cell charger and balancer that can charge and balance 4 cells at a time at about 8 amps.  Tried it on one cell, it worked like a champ, tapering off current as the cell approached 3.6V.  Wired up the 4 cell balancing cable and one of the 4 cells had enough difference in charge that it hit the Upper Voltage Limit of 3.6V well before the rest, triggering the alarm.

Onyx 230

So now, the charging process is down to trying to charge 4 at a time but if there is too much variance, resorting to single cell charging to get them all within a few percent of each other.  LiFePO4 batteries have very flat discharge curves, so a tiny voltage variation could equate to several AH of charge.  It seems the only real way to know is to top off each cell until the current draw from charging is quite low (<1A) and  the same cell-to-cell.



Near the end of the charge process, the cell voltage will spike up 0.2V to 3.6V. The charger is set to 3.6V so as soon as the cell hits that, the charging will safely stop.

Springs

Finally completed the Hi-Lo installs.  The fronts and rears are in and set.  Final right height, based on the factory spec of 53 inches at the roof, is 9.75" at the lower sill seam near the rear wheel.  The back is about 0.5" higher than the front which is normal for Classic Minis.  Looks good, handles well, and the ride is quite smooth now.  At this height there is sufficient compression at the springs when the wheels are off the ground to keep the springs in place.  Much lower and larger upper bump-stops would be needed.

Blower

A new blower was installed to cool the motor.   The leaf-blower, though effective was just too loud.  The new blower is Jabsco, 3" Blower, Flexmount, 105 CFM,   Much quieter and about the same CFM as the leaf blower.  Mounted much nicer also.

Computer Work

The work continues to refine the software running on the Arduinos.  Was able to connect the battery monitor Arduino to the Mini's fuel gauge so the gauge shows charge level now.   Used one of the PWM outputs on the Arduino (Pin 9) to drive the following circuit.


The PWM was set to a range of 0-205 to map from 0%-100% of the charge.  100% is still set to 48AH even though the batteries are 60AH cells.  This leaves 20% of margin.

Also added some more error messages to the Motor monitor to indicate different situations like over temp or low voltage or over current.