Large scale projects I’m thinking about
1 - Battery Monitoring Basic
A basic battery monitor based on embedded board and analog reads
This is a very basic battery monitor using only the voltage to estimate SOC etc
Temporary location, water resistant, mounted using 2 screws from tank lid
What it does
- Read, log and display voltage
- Trips - keep voltage at start and end of each trip
- Calculations
- Display current voltage, averages
- estimated SOC (based on past data)
- SD Card
- Log data - for reprocessing the SOC calculations etc
- Start and end Voltage for each trip
- WiFi
- Automatic upload data on reconnect
- Remote update (OTA programming)
Electronics
Basic embedded board with an OLED display - probably not readable in daylight, but a good start. Board I have in mind has USB-C input so we can run it directly off the 5V USB port on the bike.
The Voltage measurement is a basic resistor divider with protection for spikes. These are not great accuracy over temperature range etc. However since we are only measuring 60 to 84 volts - I strongly suspect I’ll be able to calibrate it to the nearest decivolt (10th of a volt, e.g. 72.7 volts)
Inputs
Fully automatic when you turn on the bike. Also allow a single button to reset too.
Second button to do with uplaods and WiFi connect.
Mounting and Battery Connect
Start simple. Mount directly on a USB cable plugin (boards are very light and easy to connect). Using the unused charge port on the bike, to easily access the battery voltage. Add a plug there that routes the wires up to the front.
Calculations and Display
- Current - a floating average, maybe once a seconnd, or every 5 seconds
- 30 Second average - the last 30 seconds, I have a feeling this is going to be very useful. The number might change, might be 10, or 60 seconds. We may even want to put up 2 or 3 averages - 10 second, 30 second, 60 second, 300 seconnd….
- Start Voltage - really useful for logging - did we start fully charged
- End Voltage
- SOC: State of charge, and estimates minutes and km left depends of course on a recent average, e.g. last 30 seconds riding similar would give X amount. The actual calculations are going to be a little fuzzy to start with. Using the log I will do my own calculations offline based on where I think the bike ended at. This can be tweaked over time, and even self adjusted based on the steady state of the end voltage.
Now
It calculates the voltage, 30 second average, but no SOC etc. Adding some SOC and logging soon.
Future
See Range Monitor project for next version. Basically it adds a GPS and will capture the accelerometer data too and possibly some temperature sensors.
2 - Donner Bike
Build my Island bike
The Braaap EV5 is a pretty cheap bike, less than $5k.
The Island Bike
I would love to:
- Remove most of the plastic
- Add some metal fenders etc for a little safety
- Replace tyres with dirt tyres
Get money!
Get some money so I can do this
Buy the EV10 (10kW motor version)
This has a 120Ah battery.
Steel the battery
Steep the 80Ah battery from the EV5 (an 80Ah battery would cost me about $2500) and use it to extend the range of the EV10.
Replace the battery
Put a 20Ah battery (about $500) into the old EV5 - which is plenty of range for my island bike.
3 - Ideal Controller
What is my ideal controller
This project is purely virtual. What would I do if I built a controller.
Features
Battery Voltage
Obviously should support 72+, possibly even 200+ volts
Motor
Starting 5kW and up to 40kW
Motorbike Features
- Indicators - Use accelerometer to help auto cancel
- Brake lights
- Brakes engaged
Lock movement
- Hill lock - on stop, not pressing reverse, or holding brake, stop roll backwards using the motor.
- Lock for parking
Emergency Features
- Limp mode battery - adjustable amount remaining
- Lights and Indicators/Emergency flashes must be almost always availble
- Could be done with very low power (since LED lights)
- Or with a separate backup small battery
Brakes
These could be outside of scope of controller but ABS
Alarm
- Motion sensor
- Wheel lock - electrically lock wheel rotating
- Could be done not fully, like a parking lock, or when movement is detected
- Shorting the phases on the hub motor works well
- But many controllers do not allow shorting easily.
Battery Management
- Volts - clearly
- Amps - both out and in the charger
Regenrative Braking
It is useful and relatively simple.
Display
- Configurable widgets
- Some examples:
- Speed
- Accelerator position (how hard you pulling)
Architecture
Ideally split components into sections that are reusable.
Main parts:
- Battery Power convert
- Convert power to lower power for controllers and lights etc
- Indipendent of motor controller to allow lights even on motor failures
- ie. this is a 84V to 12V or 5V
- Two levels
- low quiesent low current for alarms and LED lights
- Higher power for headlights, and other services
- Motor Controller - also called inverter in EV cars
- Cut off on low power (see below re safety controller)
- Full control of hub motor (3 phase, rotary encoders etc)
- Regenerative brakes (see Drive controller)
- Locking control (either short or input on move)
- CAN bus or similar
- Input Controller
- Human inputs
- Brake switches (not the brakes, just the switch)
- Indicator switch
- Headlight control (high beam etc)
- Throttle
- Kill switches (e.g. kick stand)
- Mode switch
- Horn
- Accelerometer
- GPS
- Drive Controller (mostly talking to Motor Controller)
- This is a CPU for controlling the drive, but from a higher level
- Controls things like soft start and traction control
- Brake controller
- ABS et al
- Talk to Safety controller for brakes
- Work out if inputs need to be direct or not
- Safety Controller
- Take power from converter, indipendent from motor control
- Control indicators including emergency flashing
- Control lights
- Horn controller
- NOTE: Safety would allow for lights or indicators to remain on during catastrophic failures - e.g. loss of CAN input
- Alarm/Theft
- Separate battery to allow batteries removed for charging
- Movement sensors - from Accelerometer
- Control the output alarm
- Coded disable alarm
- Quiet beeps - for enable/disable alarm
- Medium - warning on move
- Loud - stop steeling
- Display
- See also input controller
- Display components such as speedo
4 - Ride Logger
Constantly log rides
Based on the battery monitor basic, but also adds in GPS or other ways of measuring distance
Purpose
- Automatically log every ride
- Detect each time turned on and off
- Data collected
- Date and Time (from GPS or WiFi)
- Distance (from GPS, maybe later from CAN bus)
- Accelerometer
- Temperature (maybe)
- Battery Voltage (averages over time, maybe 1 per minute)
- Upload
- Automatically uplaod each of these rides
Presentation
The idea is to present this data on a web site. Thus I can continually keep information up online of the rides, distances and most importantly the battery voltage over the trip.
This can then allow us to show chart of battery over the trip, so we can see if it is a constant lowering average, or if it has dips (e.g. up hills or on the freeway).
Advanced
Can analyse the route and work out type of road - standard, freeway, hilly, …
Security
Data can be made public with just the data, total km and volts, or track volts over time or even allow full access to track too.