View Full Version : Arduino Vehicle Controls / BMS Thread

02 June 2015, 2234
I see a few members here and there mention that they are planning an Arduino this or that or BMS for their builds.

I'm doing this too, and I thought I would create a place for us to share Arduino developments that might be helpful to others.

If you are working on an Arduino project for your build, please feel free to share it here!

I'll start.

I am planning a complete Arduino vehicle control system eventually. Speed, amps, voltage info displays, charging control, Ignition and start-up sequences, fingerprint vehicle access, eventually BMS, and control of the 12v systems too, lights etc.

I'm fairly new to Arduino, but I find the basic stuff is pretty straightforward and there are lots of resources to help. I like that you can make a small project to figure out how to use a sensor like the fingerprint scanner, and then incorporate it into a larger program. That's how I'm making slow but steady progress on my system.

The first project I tackled was a 12v system control unit for my ICE bike. Sort of a Poor Mans Motogadget M-Unit. I figured it was a good starter project and first step towards my EV control system. I will be installing the first one in an ICE bike in a week or two, here it is:



I'm using an Arduino Pro Mini, an FTDI board for programming (easy software upgrades), a variable voltage regulator to turn the bikes 12-14v into a steady 5v for the arduino, and an 8 relay breakout board. It controls all of the lighting, horn, and starter solenoid. I have routed the input from the front handlebar controls through a network cable to simplify the wiring harness, each control now simply grounds the appropriate wire when it is switched on. The speed of the flashing of lights, etc is all software controlled, and I've added a few clever tricks like turning all the lights off when the starter is pressed to send all available juice to turn over the engine, and multi clicks on the brake handle to turn on hazard flashers or parking lights.
I'm planning to add a hall sensor for auto cancelling turn signals after the bike has traveled a certain distance, and maybe an accelerometer/gyro for crash, fall over shut off and engine braking activated brake light when the bike slows down quickly. Maybe an auto high beam dimmer with a photocell and an RFID ignition. The possibilities are endless really!

If anyone is interested in the code (it's a bit messy at the moment), let me know. Eventually this will mutate into my EV vehicle control system

03 June 2015, 0039
Nice. I'll also use Arduinos and ATtinys on my build. I don't have much to share yet, but I'll post it, when I have some progress.

03 June 2015, 0151
This is cool. I have a m-unit on my bike and it simplifies things immensely. I am considering a similar unit for the car conversion along with a custom 7 inch TFT screen for the dash.

03 June 2015, 0200
If anyone is interested in the code (it's a bit messy at the moment), let me know.

I have built a lot of things with Arduinos for the last few years now. They are extremely useful boards. I wouldnt mind checking out your code.

03 June 2015, 0334
I'm still Arduino virgin but I would like to get started. I would like to read the current frequency, amplitude and direction on a motor phase and convert it to a variable audible signal in my helmet speaker.

Let's see where I get with this.

03 June 2015, 0940
Arduino virgins like myself could benefit from a list of resource/educational links. Are you guys soldering the boards from scratch? What special equipment and tooling is needed?

Like this:http://www.intorobotics.com/arduino-tools-resources-need-know/

Man there's a learning curve!!

Jonny Panic
03 June 2015, 1115
This is super cool! Thanks for offering up your code as well, I don't know anything about Arduinos but the potential is certainly intriguing.

03 June 2015, 1152
I am building a spot welder controlled by an micro.

And working on a battery management system with an arduino master.

03 June 2015, 1220
Another Arduino user here.

on the forum I have pubblished the code for controllin the Zivan Charger ,

right in this moment i'm writing the code for the Eltek Valere canbus charged ( the same of Brammo Empulse )

my next task is to make the Eltek and the Zeva BMS talk each other via canbus (and also working as a logger)

Jonny Panic
03 June 2015, 1340
Perhaps a subforum for Arduino projects could help keep all of this in one place?

03 June 2015, 1421
Can it have more than just Arduino? There's lots of other microcontrollers out there. I think a Micro-controller sub-forum would be great though!

I'm working on finishing up a VCU:

Based on an NXP mbed footprint, but can also use LPCXpresso boards.
7 Analog 0-5V inputs
1 Analog 0-5Voutput
5 opto-isolated digital 12V inputs
1 Reset input
6 PWM FET outputs
6 FET switched outputs
2 Opto-Isolated CANbus ports
1 USB Host port
1 RS232 port
1 Xbee socket (Can be used for xbee, wifi, bluetooth, celular xbee-formfactor cards)
12V input with internal DC-DC to get 5V and 3.3V levels
5V output for powering sensors
1 Internal microSD card slot
1 internal backup battery for RTC

All of this is inside a sealed CINCH enclosure with 48 pins.

05 June 2015, 0746
Nice with Arduino part of forum

I self used a Particle Core (Arduino simular with built in Wifi) connected to my Cycle Analyst during Winter storage of my motorcycle in garage and monitored AmphereHours and Voltage of my battery pack.


Cycle Analyst sends values 5 times a second, a particle core receives serial string, parsed it, read values and send values through Wifi to Google sheet every 15 minutes.

Good to know how battery pack is doing.

I can share my code if it is interesting...

07 June 2015, 1405
I built a spotwelder.


Need to dial in my spotwelding techniques.

The arduino controls the whole thing and is adjustable on the spot via the pot and buttons, all while visible on screen.

The arduino monitors the ac input to determine the correct time to switch on, using the AC line peaks as the switch on point when the button is pressed.

If anyone wants detailed schematics or code let me know.

19 June 2015, 0208
I'm considering a simple CA replacement (have two controllers now) with a small display where the temp gauge currently sits.
A good place to start is http://tronixstuff.com/tutorials/ if you want to get into Arduinos.
Sal Park also did some work in terms of current sensing: http://sourceforge.net/projects/bangxietymeter/

Edit: found a CA replacement & throttle tamer Arduino Nano based: http://endless-sphere.com/forums/viewtopic.php?f=2&t=61407

23 June 2015, 1129
Working on deciding which direction I will go with my battery monitoring. Still deciding between a pure High and Low voltage cut-off without further information or If i want some more grunt.

Got my high and low voltage cutoff workout with an celllog8m with my own isolation/discharge balancer/on off circuit. This way i can safely interface the celllog output with an normal relay or micro.

The cost of the design without the pcb is down to roughly 2.32 euro's per cell. A little high for the basic functions, how ever I am working on a more powerful puppy based on a ltc6803/ltc6804 and atmega328p (arduino bootloader possibly).

See the attached files for my current design.

09 July 2015, 1234
Hi guys, I'm new to the forum & not new to micro-controllers :D

I own quite abit of hardware. I have a mbed, arduino & raspberry pi. I will be using the arduino along with the raspberry pi for the instrumentation of my bike. I removed my cluster completely & will be replacing it with a colour touch screen. On the screen I will be displaying all the vitals (soc, amps, speed etc...). I will be using web technologies to display the the gauges on the screen.

For those wanting to get into Arduino from a web programming background. If you are comfortable with Javascript you can use Node.js with the Johnny-Five (https://github.com/rwaldron/johnny-five) library. This library allows you to program the Arduino via Javascript & illuminates the use of c++. I'm using Johnny-Five on my project.

Here's a video of me controlling my indicators via Arduino video (https://www.youtube.com/watch?v=_RaIOMAFABA&index=1&list=PLo9YLKXZcJmYsYo_m9dfrZcFpBRNgvnxG)

The possibilties with micro-controllers are pretty much endless...I have so many ideas similar to furyphoto.

09 July 2015, 2234
For anyone that may be interested, I have a 4.3 lcd mbed enabled board with ethernet, sd, can bus, serial, etc from embedded artists if they wanna mess with it. I just won't use it. Would be good for this kind of stuff.

Sent from my SAMSUNG-SM-G920A using Tapatalk

11 July 2015, 0807
got myself a more powerful arduino compatible micro. The teensy 3.1

Powerful enough for anything i can think of inside of an electric vehicle, besides an instrument panel.

Also adapted an LTC6804 to an 2,54mm headers so i can easly build test circuits.6630

17 July 2015, 0807
tomdb, are you implenting the teensy on your bike?

What time of hacking do you do?

17 July 2015, 0808
For anyone that may be interested, I have a 4.3 lcd mbed enabled board with ethernet, sd, can bus, serial, etc from embedded artists if they wanna mess with it. I just won't use it. Would be good for this kind of stuff.

Sent from my SAMSUNG-SM-G920A using Tapatalk

Sounds like a shield you describing.

17 July 2015, 0920
tomdb, are you implenting the teensy on your bike?

What time of hacking do you do?

The teensy will be for experimentation. But can have many applications ranging from controller to something as simple as CAN bus controller for the display.

Second question, what do you mean by this?

Currently my main project is an BMS slave board with an atmega and canbus.

17 July 2015, 1559
Sounds like a shield you describing.
No. It's an embedded artists lpc4088 display module board. Mbed enabled.


Sent from my SAMSUNG-SM-G920A using Tapatalk

22 July 2015, 1641
I had promised to share my work on my 12v control system, I started a new topic to keep from confusing topics and projects.

Please check it out HERE if you are interested! (http://elmoto.net/micro-controllers-arduino/4044-arduino-12v-systems-vcu.html)

07 August 2015, 1307
Currently nearing completion of my board design for an "arduino" based bms.
It will be programmed via arduino, because why not and all the libraries for arduino are extensive.

Currently testing the LTC6804 with arduino interface, so far it works and spews the data on the serial port.
Working on assembling a test board for my isolated can implementation. Pcb are made and ready for soldering.

Schematic is attached, almost 100% complete, i am just missing the correct connectors for the canbus/12volt in, cellmonitoring and balancing board.



09 August 2015, 1751
I'm interested to see where you end up with this, I had a look at the Linear chips too because they have arduino libraries, but I chickened out thinking they were above my arduino knowledge level.

I am just about to order 22 ATTiny's and some Optocouplers to run a separate voltmeter on each cell, reporting back to an arduino master control probably via a multiplexer. Parts are cheap, and the code is pretty easy too, but it's definitely more clunky than the Linear chip option.

09 August 2015, 2319
People always get scared of code. I see absolutely no reason to be. Got it running purely using their own library and code, all be it tweaked slightly.

14 August 2015, 1236
Almost done with my board layout, a little more testing with my trial parts and breadboard.

Hope to order the pcb's within a week.


17 August 2015, 1417
Had my idiot moment this weekend. I designed some opto isolated canbus boards for any micro controller. Currently running them with arduino's, I also do not have an usb to can device yet or any other working can device.
I was populating my smd design and noticed i was missing the correct opto couplers (got the wrong size). So i just bridged them, not realizing that on one board I had already mounted my pull up resistors.
So all of sunday trouble shooting without success, today I did some more testing and measurements (blew up my old oscilloscope in the process, not due to my measuring but some voltage spike on the input). Turns out the transciever mpc2515 does not like pull up resistors on the comm lines to the transceiver. Removed them and got it running, so now on to build my BMS board on the breadboard tomorrow for some code creating. Also now Im confident the things work time to finish the PCB.


19 August 2015, 1352
Not directly related to Arduino. However the spotwelder I built, contains an arduino micro and arduino code.
My second arduino project which got built into a usable machine (plug in the wall and go).

Built from an old stickwelder, rewound the transformer and built electrode holders. Need to get a footpedal sorted.
The preweld is configurable in ms as is the pause and main weld, the current gets limited by a transformer shunt. These variables can be stored in eprom once dailed in.

I attached the schematic and picture of finished product and first test welds after dialing in.

Planning on designing a 12S module based on 18650 cells, can you guess why. :p

19 August 2015, 1419
I see 12S , do you know if there is also a 14s option for the chip

19 August 2015, 2320
Nope, for the advanced chips the usaul size is 6s and 12s. There are some 14s option, but usually not available or made for standalone operation.

see this excelsheet for an overview liionbms.com/xls/BMS_IC_table.xls

20 August 2015, 0624
I was thinking about this chip but looks like is not used