Corbin Dunn
Redwood Monkey

Electric Bug: Charger Control – Design

Electric Bug

Based on my requirements, I made some hardware the will more intelligently control my Manzanita charger. It is powered by an Arduino, and has a little LCD to tell me what is going on and accept input settings:

IMG_8909.JPG

First off, everything is on https://github.com/corbinstreehouse/ChargerControl.

It solves the problems I previously listed, by implementing J1772 (minus respecting the amperage that the charging station provides — since I can’t control that in the Manzanita charger) and implements a timer.

I bought an Arduino last winter and learned how to do basic hardware programming.

IMG_8050.JPG

I then used EAGLE PCB software (free) to design how I would do this with some circuitry (after testing it on a breadboard first). The concept is really simple: use resistors to control the J1772 pilot signal, and sense a change in the proximity signal (to detect when the J1772 plug is going to be unplugged), and use several relays to turn on the BMS, turn on the EVSE charging station, and turn on the charger (via its Reg bus input).

The inputs are: 12v power, ground, an AC-DC 12v+ (powered by the 120v or 220v plug so I don’t drain the 12v battery while charging, as my DC-DC isn’t on), pilot signal input, proximity signal input, pilot/proximity ground from the inlet plug, V source output to the BMS (to turn it on), HLIM input from the BMS (to sense when to stop charging via the “high limit” input of the BMS), and a plug into the REG BUS port of the charger to turn it on and off (by connecting pins 1 to 2 via a relay).

Screen Shot 2012-11-08 at 7.02.05 PM.png

The eagle files I made are here. One other thing I added was a diode on the BMS output, as the BMS was accidentally turning my charger control on when the car started.

Once I made a schematic, I had to figure out how to get it all onto a board. I didn’t want to print my own PCB (I’m not really at that level yet) so I wired it all up manually. To figure out how to do that, I made this crazy layout in illustrator:

Screen Shot 2012-11-08 at 7.19.03 PM.png

The wiring underneath my board basically ended up looking like this, and it makes me wish I made a PCB. I may eventually do so…when I do some more electronics work on the car. Other parts include a clock kit from adafruit, an LCD kit from adafruit. Here it is all wired up manually to test:

IMG_8889.JPG

The red mini breadboard is used to simulate the J1772 proximity plug.

I then made a box out of lexan and stuff everything in:

IMG_8900.JPG

IMG_8904.JPG

The on/off switch is a Pololu power switch, which lets me automatically turn the whole thing off in software. See http://www.sparkfun.com/products/8904

Most the important code is here in ChargerControl.cpp. I also wrote an Arduino LCD menu system.

The software works great. I push a pushbutton on top of the box to turn on the whole thing (I could make this automatically happen when the gas tank door opens). Then, plug in the J1772 plug and everything works: first, the the proximity signal on the latch is sensed. Then the Elithion BMS is turned on (via its Vsource input and a relay). The code waits for the BMS to turn “off” the high limit, indicating it is okay to charge. It then generates the pilot signal for the EVSE, which turns on contractors at the charging station and gives the charger power. I then turn the charger on by opening a relay (that opens the charger’s pin 0 to pin 1 connection, indicating it is okay to charge). When the BMS high limit is hit, the relay closes to turn off the charger and it goes into a “balancing mode”. It then “balances” the cells for controllable amount of time, and then automatically (and safely) turns everything off!

When the timer is being used, you just set it to be in “timer mode” and set the start time and duration. The timer EVSE has zero power to the car’s J1772 plug, until the arduino tells it to turn on.

So far, it seems to be working pretty well. I haven’t really used the timer yet and only just tested it.

Warning: use at your own risk.

Previous Post
no_thumbnail
Electric Bug: Charger Control - What I want
Next Post
EV Converstions and white Clean Air Stickers

5
Leave a Reply

avatar
500
5 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
4 Comment authors
corbintomCorbin's Treehouse » Blog Archive » Plug Bug: Charger Control UpdatesPharmb898Pharmd621 Recent comment authors
  Subscribe  
Notify of
Pharmd621
Guest
Pharmd621

Hello! bfedfaf interesting bfedfaf site! I’m really like it! Very, very bfedfaf good!

Pharmb898
Guest
Pharmb898

Hello! ggbkeeb interesting ggbkeeb site! I’m really like it! Very, very ggbkeeb good!

trackback

[…] Electric Bug: Charger Control – Design […]

tom
Guest
tom

Hi Corbin,

You describe the charger transitioning to a balancing mode. What exactly occurs? Does your bms throttle back the charger to low current output by applying a voltage less than 5V to pin 2 of the regbus? Or are you relying on the voltage limit setting of the charger to determine transition from CC to CV, cutback of current, and the charger timer to end charging? What is the charger current output when balancing? What magnitude is the balancing (shunt) current on the elithion?

corbin
Guest
corbin

Hey Tom — it is just connecting the 5V to pin 2 of the regbus. Also, beware of that…as it requires more than 5V to stop charging! Originally, I had the Arduino feeding 5v into pin 2, but that wasn’t working. I then checked the output voltage from the charger’s pin 1 (which is supposed to be 5v), and it measured at like 13v! So, I had to switch to using a relay to connecting pin 1 to pin 2. My “balancing mode” is just a duration timer; after which, the arduino shuts off the entire system. It does what… Read more »

(c) 2008-2018 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

75 queries. 0.427 seconds.

Log in