Cyclops Pedal Power, based in Leeds, kindly invited me to work with them on their pedal power equipment.
They wanted to record the power and energy from their three-bike set-up, and have a system that can be expanded for more and more generators.
We had a three day workshop based in the fantastic Pedallers Arms working on monitoring voltage, current, power and energy.
After chatting with Steph and Woody of Cyclops, the main aim of the three day workshop was to build a pedal power monitor which could monitor the power (and hence the energy) from three bikes.
- They wanted a modular unit as they will be expanding their system in the future.
- They wanted to be able to monitor and analyse the data on a computer.
- The wanted the equipment and software to be as open-source as possible.
- They wanted the unit to be relatively easy to repeat, as they plan on doing workshops to build these monitors.
The end result is an Arduino Uno based slave unit which records voltage and current from up to three bikes (two analog inputs for each bike = 6 analog inputs which is the maximum for the Arduino Uno). This is interrogated via a master unit which receives the data fed back and processes it. The master unit will be a computer running some processing code to talk to all the slave units.
The planning stage wiring diagram.
This was the prototype “slave” pedal power monitor.
This was the idea behind the slave/master system. One unit (the laptop) will be the master and interrogate various slaves depending on how many are on the network.
We used simple potential dividers to give voltage inputs (along with Zener Diodes to protect the inputs from over voltage).
We used ACS756 hall-effect current sensors for monitoring the current. Three of these were used and placed in-line with the incoming pedal generators. More details about using these units is available here.
We wanted a serial connection to each of the slave units. Having cables everywhere at a pedal power event is not a great idea, so we decided to use a wireless serial link. We used the XRF and SRF from Wireless Things as I have used their equipment before and it works like a seamless drop-in serial link.
Having a wireless connection also means that there is no chance of any excess voltage or current flowing potentially damaging the computer.
The SRF USB Stick can be seen hanging out of the computer.
Slave Unit Software
The slave unit was an Arduino. The code uses Commands and Returned Data which are all in the format of a 12 Byte String. They ALWAYS start with a lower case ‘a’.
Each Slave unit has an ID which is two bytes which must be capitals.
For example “AA” or “AY”. “aR” and “12” are INVALID.
In the examples below the ID of the Slave unit is “XX”.
The ID of the Slave unit can be changed. It is up to the system installed to ensure that all the Slave IDs are unique.
The ID of the Slave units can be changed using the CHID command.
Commands and Returned Data
This changes the ID of slave XX to YY
It returns aYY———
This will return:
Where VVV, WWW, XXX are the voltages from the three inputs in 100’s of mV (ie 123 = 12.3V DC).
This will return:
Where VVV, WWW, XXX are the currents from the three inputs in 100’s of mA (ie 012 = 1.2A DC).
This will return:
Where VVV, WWW, XXX are the Powers from the three inputs in Watts (ie 060 = 60W DC).
Get data from one bike
This will return (from bike inputs 1,2,3 respectively):
Where VVV is the voltage in 100’s mV (eg 456 = 45.6V)
AAA is the current in 100’s mA (eg 103 = 10.3A)
WWW is the power in Watts (eg 012 = 12W).
Master Unit Software
The Master unit is a laptop running some Processing code.
The laptop computer needs to have an SRF plugged in and the correct driver installed.
We used Processing language as it is open-source, free to download and relatively simple to understand.
It can also be used with graphical libraries to do some interesting displays.
All of the design files and software are available in the GITHUB repository here:
This will be updated as more interesting code examples are developed.
We worked in the workshop of the Pedallars Arms – a great space.
Testing a current sensor with an Arduino.