Power in Flux
Likes Likes:  2
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Arduino Based E-Bike Control Computer

              
   
   
  1. #1
    Member
    Join Date
    Nov 2015
    Location
    Liverpool, UK
    Posts
    39
    Post Thanks / Like

    Arduino Based E-Bike Control Computer

    Arduino Control information software

    Abstract:

    Develop a system that can display/influence drive train information for the E-bike and information required for public road use

    Requirements

    the system much be as none invasive to the higher power drive train circuit as possible and display information about it like power, RPM, averages in a visual way.

    Must be able to be used by new Arduino coders and customisable for all the bikes on here! (except the AC bikes sorry guys but maybe... with some magic)

    Be Cheap-ish

    Minimum Information Requirements

    Road lighting Control :
    the arduinos system should control all aspects of the road lights so handle bar controls will be controlled via relay where required for higher voltage/ power

    Dash board information
    • Speedo RPM (WIP)
    • Odometer (WIP)
    • Motor Current Done
    • Battery Current Done
    • Battery Voltage Done (No Protection)
    • Motor Temp Done
    • Motor Controller Temp Done
    • Battery Temp Done
    • Automotive Warning Lights (Hi/Lo Beam / Indicators Etc) Done For FZ6 but not my Kawasaki yet

    Over Voltage Charging Protection for 20+ Cells (WIP)
    Voltage Reconfigurable (very basic mains shut off for dumb chargers )

    Would be nice to have requirements

    Gps Tracker (Early Planning)
    Data Logger (Early planning)
    Gyro, Accelerometer g-meter (Not Started)
    Wifi Mobile communication (Needs Outsourcing most likely)
    Touch screen Control (maybe, gloves might put a stop that)
    Alarm
    SMS Warning Alarm integration

    The Plan

    Have a Master MCU and Slave MCUs as intelligent sensors for Pre-calculation and uninterrupted calculation which is by far the biggest issue with recording the information (to my limited knowledge of Arduino coding) what I found is some things need to ideally run all the time and the Arduino cant do that like Speedo and odometer really should be running all the time to work with any kind of accuracy and only be interrupted for data transfer. which is pretty quick in I2C in real terms.

    I plan to do a post on each aspect of the information what I want to know is how detailed people would like would people like it to be just the circuit and how I did it or a bit more in-depth like the things I tried, problems I had to over come and circuits I tried and what I like/dislike about them?

    This System is NOT Finished there will be problems with some of the stuff I post im sure (in Code, Electronics and Physics) and I welcome peoples ideas and criticisms

    I know there are a few who are really interested in this. my total cost is roughly 60 most of which is 2 sensors and the Arduino Mega and TFT Touch Display all the other components are inexpensive

    So the Master MCU is the Mega with a satellites of ATTiny85 as the slaves
    current sensors for the Motor and batteries are the LEM HTFS 400-P/SP2, Expensive but I had to rewrite my code for these puppies in a good way the signal needs no conditioning and is VERY accurate beat my clamp meter so I had to delete lots of code YAY

    let me know how detailed you would like the information and ill have my first post on current sensing up in a week or so
    Last edited by Chri5; 02 January 2018 at 0848.

  2. Likes Spaceweasel liked this post
  3. #2
    Senior Member Stevo's Avatar
    Join Date
    Nov 2014
    Location
    Behind the Redwood Curtain- REDWOOD ORIGINAL!!
    Posts
    715
    Post Thanks / Like
    If you start programming your BMS, let us know. I'm trying to learn Arduino now (so much to learn!) and just ordered an Uno and some shields (wifi and Bus to mini)... I made a 12v dc-5vdc from an old automotive cell phone charger. I'll see if that's enough to power on the Uno. My first goal is to be able turn my bike's main power on via an opto-isolated relay switch with my cell phone. Then I can use my cell phone's display for GPS maps and route planning, or as a speedometer.
    Last edited by Stevo; 02 January 2018 at 1108.
    Current rides: '96 Honda Ohlins VFR, '03 Cannondale C440R, '03 Cannondale Cannibal, '06 Yamaha 450 Wolverine 4x4
    Current builds: WORX.VOR.v3.2

  4. #3
    Member
    Join Date
    Nov 2015
    Location
    Liverpool, UK
    Posts
    39
    Post Thanks / Like
    Arduino is a great plaform I only came across it in my E bike research and have been learning it since. my super simple bms which is still in the work but looks promising is using a attiny85 (very similar to arduino but with 5/6 IO pins and uses 12mA) and a few multiplexer 74hc4051 ICs to increase the cells being read as Lipo batteries are under 5v when one analogue signal goes over the charge limit set in the program aka 4.19v the tiny will send a signal to a relay on the a.c. input for the charger and cut it. the multiplexers (mux) are stacked so attiny to mux1, mux1 to mux 2 and 3 but I'll have more details when I get to that bit I want to make this comprehensive as there's so many arduino ideas floating around on the interwebs for E bike control but I've found they don't give enough scope to easily change it to your needs or disregard as N/A or what limits it my have

    That's quite a goal for a early sysyem steve I haven't tried gsm and GPS yet I've had some long thought experiments about them tho they are complex but once I pick up some modules I will have a play but if you crack it let me know maybe we can intergrate it into this system
    Last edited by Chri5; 02 January 2018 at 1457.

  5. #4
    I should be working! furyphoto's Avatar
    Join Date
    Jan 2012
    Location
    Harrop, BC, Canada
    Posts
    320
    Post Thanks / Like

    My Social Networking

    Add furyphoto on Facebook
    I have done some work on the 12v control side. I was starting with a system for wiring my ICE bike, and then planning to add battery monitoring and some other vehicle control. You can see it here: http://elmoto.net/showthread.php?t=4044

    I was also looking at using the ATTiny voltage reference for cell voltage monitoring, I have a stack of them and opto-isolaters in a box waiting. One of my concerns with this layout is parasitic drain on the cells. While the Tiny uses almost no current ~1ma, they will always be on, and always running non-stop. I have considered another isolater for each cell that can connect the vcc to the tinys when the system is activated.

    Also, I'm looking at using an Arduino Mega for my main board. It has lots of digital pins, (54, I will need 22) so I can skip the MUX ('s) and run direct to the main board.

    I would be interested to see what you have going on if you are willing to share.
    -Andrew

    http://www.andrewdoran.com
    mail(at)andrewdoran.com

    My ElMoto Project "Electric Hurricane" - 1987 Honda CBR600 F1: Check out my Build ALBUM
    My ICE Cafe Racer Project "My Precious" - 1983 Honda CM400 Classic

  6. #5
    Member
    Join Date
    Nov 2015
    Location
    Liverpool, UK
    Posts
    39
    Post Thanks / Like
    to aviod the parasitic drain try 2 opto coupers to isolate the battery circuit in opposite directions (LED side to a Digital output on the Tiny) and the other one LED side to the Cell Circuit. then when you turn on the Digital output on the tiny it switches the curcuit on. then read the other opto coupler with a voltage devider and a analogue input then turn off the digital output and put the tiny into sleep mode untill the next read and power the tiny from the Mega that way the cell circuit only activates on command (bar a very small leech (~nano volts/Amps) this is how im planning to do it but i may need an op amp to add gain to the difference as 4.15v and 4.2v wont have much difference. i hope that makes sence
    Last edited by Chri5; 03 January 2018 at 0714.

  7. Likes Stevo liked this post
  8. #6
    Member
    Join Date
    Nov 2015
    Location
    Liverpool, UK
    Posts
    39
    Post Thanks / Like
    everything i do is going to be shared i could maybe make it a poduct for sale but there is already the CA and all the information on this forum has helped me a great deal so i want to give back. my cell monitor is still in the Simulation stage and im not 100% sure its the right/cheapest way but once ive built and tested it ill post the results

  9. #7
    Member
    Join Date
    Nov 2015
    Location
    Liverpool, UK
    Posts
    39
    Post Thanks / Like
    twin op amp idea.jpgTinyCell gauge.jpg

    sorry for the tiny image ignore the resistor values i was just throwing it together to shows what i mean

    battery source V1 (4.2v) is the cell
    battery source V2 would be a +5 from the tiny with the analogue input between the resistors
    Battery Source V3 Would be a Digital Output from the tiny
    Last edited by Chri5; 03 January 2018 at 1528.

  10. #8
    Junior Member
    Join Date
    Mar 2017
    Posts
    11
    Post Thanks / Like
    Interesting, I have an Arduino based I2C system running on my motorcycle conversion. It is not connected to a BMS though. I have two Arduino Mega's, one running a 5 inch tft and the other running a speed sensor, a 4 channel ADC for battery voltage, battery current, and charger current. I have 4 I2C sensors for temperature measurments and a FRAM for storing battery capacity, odometer and trip miles. Everything works just need to calibrate speed and set up the odometer readings.

    Your project is very similar to mine but you have gone the extra mile with bike controls, very nice I will monitor how you progress it.

    Bernel.

    Sent from my SM-T310 using Tapatalk

  11. #9
    Member
    Join Date
    Nov 2015
    Location
    Liverpool, UK
    Posts
    39
    Post Thanks / Like
    well the bike controls still go through the orginal controls and wires but are mostly non invasively monitored by the logic i dont have/want software running saftey controls like brake lights but can still display information in the arduino if they are active. is your speedo a Hall sensor if so where have you mounted it? im torn between the hall sensor-magnet or encoder wheel and Diode. i would like to do a laser diode just so the bikes got a laser

  12. #10
    Senior Member
    Join Date
    Feb 2012
    Location
    Edmonds, WA
    Posts
    154
    Post Thanks / Like
    You might want to look at something like an Adafruit Feather M0 instead of the Arduino Nano. It has a much more capable processor (32-bit ARM Cortex M0) and can still be programmed in the Arduino IDE. You could probably set up interrupt based I/O with DMA transfers to keep streaming in data from peripherals while doing calculations and display updates. Sometimes the Arduino IDE doesn't let you get to all of the features of the parts so I usually use the Keil or IAR IDE, both are free up to 32K code size (or even mbed, the online IDE) but the learning curve is much steeper.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •