Close
0%
0%

imPulse

Energy harvesting alternative for bikes including data logging, smart lighting system and power distribution board for power banks

Similar projects worth following
The aim of this project is to provide a cost-effective alternative to power generation on bikes using conventional stepper motors while adding other capabilities, such as:

- An integrated data logging system to monitor power generated on each trip.

- A smart lighting system with addressable LEDs, working as indicators, braking lights and headlights, incorporating Light Dependant Resistors (LDRs) to sense the environment and to reduce the risk of glare.

- Power Distribution Board (PDB) to charge two different/generic powerbanks. While one powerbank is charged, the other one is used to supply energy to the system.

Please bear in mind that I am currently testing quick prototypes that may compromise the bike reliability in some cases (aka 'learn by doing'). No stress, compression, bending or torsion analysis have been carried out yet on the power generation stage, so use all this project content at your own risk.

Introduction

Power generation on bikes has been widely implemented throughout years using dynamos. A dynamo working principle is the same as the electric motor. Electric motors use electricity to produce mechanical motion, while dynamos use mechanical energy to produce electricity. Electric motors can be used as generators (like a dynamo) as long as the input source of energy is mechanical.

Dynamos can be attached to the bike's fork, so the shaft will be continuously in contact with the tyre. The wheel hub can also be replaced by using an in hub dynamo, where the dynamo will be fully integrated on the bike, so it looks more aesthetic and it solves any possible contact issues. However, in hub dynamos are more expensive, they make one rotation per wheel rotation (more poles need to produce the same energy) and the drag feeling is also noticeable.

In addition, there is no integrated solution that also includes a power management device, so the generated energy can be safely stored while cycling (e.g. powerbanks, phones, etc) or used to feed other electrical sources in the bike like a lighting system.

imPulse offers a cost-effective alternative to power generation on bikes using conventional stepper motors while being able to store the generated energy using almost any powerbank available in the market. imPulse also offers a smart and fully integrated lighting system powered by a second powerbank, so while one powerbank is used for charging, the other one will act as the system’s main source. All of this is easily managed by an integrated power distribution board.


Milestones

  • Power Generation Stage (Closed)
  • Data Logger Stage (Closed)
  • Smart Lighting System Stage (Closed)
  • eBox Stage (Closed)
  • Wiring Harness Stage (Closed)


Hackaday Prize 2018 Video

FAQ

What is the difference if a conventional dynamo hub is compared to imPulse?

In a few words, a dynamo hub will make one rotation when the bike wheel makes one rotation. There is no gear system embedded to increase power generation while keeping wheel rotations. The power generation stage in imPulse has a gear ratio of 4.5:1, so the pinion attached to the motor will rotate 4.5 times while the spur gear will rotate only 1. Please feel free to check logs for more information.

Can I install imPulse on ANY bike?

This system has been tested only on bikes with braking discs as the power generation stage uses the braking disc and braking caliper mounting points. Headlight and rear light can be easily adapted to any steering wheel and seat available in the market as they were designed to be versatile. The eBox can be fitted on the water deposit mounting bracket as this mounting point should be the same in most of bikes. 

Why a stepper motor?

Because it is cheap, it has more poles than a conventional DC motor and I wanted to use devices that I already had available.

parteBoxBatteryHousingRight.IGS

CAD of the right power bank container

iges - 1.28 MB - 10/17/2018 at 14:19

Download

parteBoxBatteryHousingLeft.IGS

CAD of the left power bank container

iges - 1.30 MB - 10/17/2018 at 14:19

Download

parteBoxBatteryHousingLid.IGS

CAD model of the lid needed for the power bank container

iges - 240.96 kB - 10/17/2018 at 14:19

Download

partStepperBracketAl.IGS

CAD of the stepper motor bracket based on the Aluminium U beam I had

Initial Graphics Exchange Specification (IGES) - 230.30 kB - 10/17/2018 at 14:00

Download

partStepperBracketPlastic.IGS

CAD model of the motor bracket for 3D-printing

Initial Graphics Exchange Specification (IGES) - 334.09 kB - 10/17/2018 at 13:58

Download

View all 16 files

  • 1 × NEMA 17 Stepper Motor 17HS4417, 1.7A @12-48 Vdc
  • 1 × JSP 2.54mm XPH-4 housing (male + female + inserts) For stepper motor
  • 2 × Full-wave rectifier 2W08M 2A 800V
  • 1 × DC-DC step-down converter From 6-24V to 5V with a maximum of 3A
  • 1 × Electrolytic capacitor 25V, 100uF

View all 47 components

  • Wiring Harness Stage

    Javier Betancor5 days ago 0 comments

    This could be a very tricky part depending on your bike. Components needed:

    • Black Heat Shrink Tube 3:1 (1m x 10mm)
    • Black Heat Shrink Tube 3:1 (2m x 5mm)
    • 1 x Blue Silicon AWG 22 wire (5m)
    • 1 x Red Silicon AWG 22 wire (10m)
    • 1 x Black Silicon AWG 22 wire (10m)
    • Cable ties (200mm, 100pcs)
    • Cable ties (100mm, 100pcs)
    • Soldering iron + soldering material
    • Glue (e.g. super glue)
    • Set of screwdrivers
    • Heat gun


    I am assuming that the headlight, rear light, motor and eBox are ready to be installed in your bike. Hence, the only thing to do is to 'convert' the braking levers so they can act as pushbuttons. I am trying to use a non-invasive methodology in order to implement the pushbutton effect in the braking levers.

    First thing I did was to spend a while trying to analyse the best way to attach cables and also if it possible to take advantage of conductive materials. My plan is the following:

    • The braking light will be activated when the user pulls the braking lever. However, in my case there was a huge gap to cover. My solution was to use a spring as you can see in the pictures.
    • The indicator will be activated when the user pushes the lever forward.

    Now it is time for using your skills and decide which is the best way for routing all cables. I think the best way to explain it is to show some pictures (again).

    UPDATE 21-10-18

    After spending some time (a lot!) testing the hardware/ software stages of this project, I have to acknowledge that the tweaked levers worked amazingly well. Here is the final picture!

    Q&A Section

    Did you have use any invasive methodology (e.g. drilling) for the wiring?

    No! The bike I am using was not precisely cheap, so I was forced to use non-invasive methods for the wiring. The main advantage is that you can remove anytime!

  • eBox Stage 2.0

    Javier Betancor10/06/2018 at 17:33 0 comments

    I am back! Yes, it has been a while. I have been travelling for a conference and I have been preparing my presentation, some paperwork and finishing other projects. It was amazing!!

    Coming back to the main subject, I know I did not explain much in the eBox Stage log entry, but it is mainly because I decided to upgrade the initial design. Both images are shown below, so both designs can be easily compared. Components needed for this stage are:

    • 1 x 3D-printed eBox assembly
    • 2 x 3D-printed Power Bank Housing
    • 1 x 3D-printed eBox Mounting Bracket 
    • 1 x Strip Board
    • 1 x Relay (SRD-05VDC-SL-C)
    • 2 x Diodes (1N4007)
    • 2 x USB 2.0 to Micro USB cable (1m)
    • 2 x Power bank
    • 1 x Single Solid Core (SSC) Black wire (0.6mmx1m)
    • 1 x SSC Red wire (0.6mmx1m)
    • 1 x SSC Green wire (0.6mmx1m)
    • 1 x SSC Yellow wire (0.6mmx1m)
    • 1 x SSC Orange wire (0.6mmx1m)
    • 1 x SSC Purple wire (0.6mmx1m)
    • 2 x M3 screw
    • 1 x Rubber Sheet (250x250x1.5mm)
    • 2 x M3 Threaded brass insert 
    • 8 x Neodynium Magnet Disc (3x20mm)
    • 1 x Stainless Steel Rod Bar (200x2mm)
    • 2 x Blue LED
    • 2 x 220Ohm Resistor
    • 1 x DPDT Switch

    Please find all changes listed below:

    • FireBeetle (ESP32) instead of Arduino Nano v3 
    • 5V to 9V DC converter is removed
    • C2, R3 and R4 are removed
    • There was a bug in the relay connection that keeps the coil active permanently. With a Double Position Double Throw (DPDT) switch, this problem is solved.
    • LED1 and LED2 have been added, so the user can see which power bank is being used to provide energy to the system

    The addition of the ESP32 brings some advantages to the system:

    • An improved processor - there is no need of using two MCUs
    • BLE connectivity - the uSD module is removed and now all data is directly streamed to your phone
    • OTA (Over The Air) updates
    • Blynk App is used while you ride like a dashboard, where different commands can be executed, the generated power is directly shown and the linear speed is acquired from your phone GPS and displayed too. (You will be able to download and modify my program, so anything is possible!)
    • There is no need of installing a DC-DC step-up converter. Everything works within 5V.

    As a remainder, I would like to clarify abbreviations shown in previous pictures:

    • D stands for 'Diode'. Diodes used are 1N4007
    • R stands for 'Resistor'. R1 is 1KOhm, R2 is 120Ohm and R5 is 10KOhm
    • FL stands for 'Front Light'
    • RL stands for 'Rear Light'
    • RI stands for 'Right Indicator'
    • LI stands for 'Left Indicator'
    • B stands for 'Brake'
    • The relay used is a SRD-05VDC-SL-C


    And....real pictures!!

    I also have to say thatI am looking for hardware bugs as everything seems to be perfect in the diagram (like the relay bug).

    Regarding the eBox design, I mentioned that I wanted to leave the bottle cage mounting point for its purpose and I managed to do it. Below you will find the CAD (models uploaded asap) of the assembly which has four components and is modular:

    • An adaptor for the bike main frame that holds all parts together and makes the system just one part that can be easily removed for cleaning purposes. This is the only part that changes depending on your bike and is located right after the steering wheel keeping other mounting points free!
    • Two power bank containers -  you can also decide if you prefer to charge your phone instead! It only needs to have a T-slot, so give wings to your imagination! This containers can be opened/closed at any time as they have a magnetic mechanism (I really like magnetism!)
    • The bECU (eBox) is fixed using screws on top of the adaptor.

    Unfortunately, due to the time being I could not design a waterproof system, but I have it in mind for future releases! Now, let's jump to the real world again:

    UPDATE - 18/10/18

    And here they are! I also glued a rubber sheet and added the M3 inserts to the eBox mounting bracket. Hinges and magnets were also added to the power bank housing. It looks nice, isn't it?!...

    Read more »

  • Data Logger Stage 2.0

    Javier Betancor08/18/2018 at 19:14 0 comments

    Yes, I am also upgrading the Data Logger Stage. This is the last entry for this challenge as it involves all hardware/software debugging. These to parts are merged to create a unity, a system!

    I am changing some of the components. To be honest with you, a physical data logger was very interesting to star with, but we are in the IoT era! Hence, here is the components list for this stage:

    • 1 x FireBeetle (ESP32)
    • 1 x Current sensor (ACS712-30A)
    • 1 x 1 kOhm resistor
    • 1 x 120 Ohm resistor
    • Blynk app installed in your phone!

    You can use all documentation available on my previous logs to create the voltage divider and to calibrate the current sensor. I will comment here all changes needed in order to transfer your code from a conventional Arduino (or similar) to the ESP32.

    Hardware changes

    The ESP32 has very nonlinear ADCs (Analogue to Digital Converter) despite of a greater resolution (12-bit or 4096 div). I had a very big headache trying to get reliable readings until I realised that the ADC was not working like the Arduino one. I measure the maximum voltage allowed for analog measuring and was 3.14V, not 3.3V. I would recommend you to read the Espressif ADC documentation (just in case).

    My test circuit was just a voltage divider, but I added two extra components, a first-order-filter and multiple sampling (image below):

    Here are the input parameters:

    • Vin - 
    • Vout - 
    • R1 - 1KOhm
    • R2 - 
    • R3 - 10 KOhm
    • C - 10nF

    After these changes, readings were very stable, so I defined a "true voltage" calibration function and also implemented it in the code. The spreadsheet can be downloaded from GitHub. I have to point out that voltages below 0.114V were not considered by the ADC.

    The current sensor requires 4.5 - 5.5V. My power banks were providing 5.016V but only around 4.3V were provided to the sensor as I had a diode for the DPDT (diagram here). The sensor worked just fine, but the reading from the module MUST go through the calibration function first (to avoid any painful headache).

    Another thing I had to change in the hardware was the addition of voltage dividers for the LDRs readings. Unfortunately, I had them connected directly with the lights, so the voltage supplied was 5V instead of 3.3V.

    Software changes

    First of all, I planned to incorporate Blynk on my setup, so the bike rider will experience something similar to a car dashboard. Here is my dashboard setup:

    I wanted to have:

    • The power generated transmitted through BLE (Bluetooth Low Energy)
    • The linear speed retrieved from the phone GPS sensor.
    • LEDs to show that indicators, break light and beam light are ON/OFF
    • The chance to switch ON/OFF the beam light manually any time and adjust the brightness.

    Anything is possible with this app and your imagination. I encourage you to build something completely different and at your own choice, something that only you will find useful. That is why I chose Blynk!

    After testing most of the codes regarding Blynk, sensors and light system separately, I finally created a unique file: imPulseMain. I had several issues with the ESP32 and now I understand why it is categorised as a developing board. No worries, all of them are listed in the code:

    • FastLED library was not working properly until #define FASTLED_ALLOW_INTERRUPTS 0 was declared. I almost give up on this until I found the issue here.
    • Interrupts are defined in a different way. This post was very useful.
    • D2 and D3 in the ESP32 used in conjunction with interrupts is a VERY BAD idea. The interrupt count went crazy when D2 was enabled and the board was not able to reset (RST) when D3 was used. 
    • Some of the D/O (Digital Output) cannot send a LOW signal. It does not matter what you do.

    However, the good news are that I managed to make everything work. Still minor bugs but will be fixed in future...

    Read more »

  • Power Generation Stage 2.0

    Javier Betancor08/18/2018 at 19:13 0 comments

    As this log entry says, I am now upgrading the current power generation setup. Please find below the goals for this stage:

    • Aluminium pinion and spur gear manufacturing.
    • Aluminium motor bracket.
    • Explained power generation circuit.

    So, why Aluminium everywhere? Let me show you a picture:

    Yes, I was about to reach my working place and after an unexpected bump at 40 km/h that happened. The pinion is dirty because I tried to add some grease for noise cancellation and also for less friction as I am dealing with ABS.

    That made me think. One of the main topics of my dissertation is Vibrations and Control, so let me give you a practical explanation about what (I think) really happened. Imagine you have a racket and a ball. For some reason you feel lazy and decide to attach a short elastic string to the racket and to the ball, like paddleball. Then, you start playing and I guess you will find fairly easy to predict where is the ball going to hit it.

    The situation above can be described as a one Degree Of Freedom (1 DOF) system under ideal conditions, so the ball can oscillate only through one axis. That is the bike and the road. Well, now let's make it a bit more complicated by cutting the string and adding another ball (the motor + bracket). We will consider that the second ball (the furthest) is static in the air waiting to be hit. This is also know as a 2 DOF system.

    The racket hits the first ball and this one will hit the second one and come back because of the string. By that time, the second one will be forced to change its trajectory while going up because the first ball came back and is being hit again by the racket. Now, the first ball will hit a MOVING second ball. That means more energy when they collide. If we add more time and also real conditions to this experiment, you will see that it is almost impossible to hit the ball because one depends on the other. In other words, this system is unstable.

    So, I had two choices: to implement a controller or make the bike + motor + bracket to oscillate as a single system. The idea of a controller is senseless since I can use a stiffer material for the motor bracket. Hence, my father had a u-shape aluminium profile back in home and cut a bit for me (pictures below). 

    For this part of the stage I used:

    • Motor bracket drawings (GitHub)
    • Angle grinder + steel disc
    • Driller with several drills (from 1 to 6)
    • 25mm diameter hole saw drill bit
    • File tool

    But, not everything was success! On my first try I made a little mistake by placing the bracket holes too close to the edge and this is what happened considering that tools are not perfect and I am learning:

    Now, regarding the pinion and spur gear I have been in touch with manufacturers here and there and none of them want to build just one unit for prototyping, which makes sense but I do not need more than one unit. I am still trying to make a deal but in the meantime I managed to reinforce both gears and make them stronger by using a full solid plastic structure and adding a grub screw to the pinion, so it will be completely fixed to the stepper shaft. Components used for this part of the stage are the following:

    • Updated 3D-printed models of the reinforced gears (CAD files on GitHub!).
    • 1 x M3 Allen grub screw + tool

    And this is how gears looks like:

    You can notice the effect of the pressure generated by the washer as it was about to break the old spur gear. You can also appreciate it in this picture:

    By the way, I already did more than 200km with the same gears. I think it is a very good figure considering that we are talking about medium quality 3D-printed parts!. Well, this is how it looks like on the bike!!!

    I tested it on the road and...IT WORKS!!! The bike + motor bracket + stepper motor works as a single system, no oscillations at all!

    Now, the last...

    Read more »

  • Bill of Materials

    Javier Betancor08/18/2018 at 19:11 0 comments

    This log entry will be focused only on all running costs. I will show all components needed per stage (tools are omitted) and the corresponding spreadsheet will be uploaded at the end of this entry.

    Power Generation Stage

    • 1 x Stepper Motor (17HS4417)
    • 1 x JSP XPH-4 male + female + inserts
    • 4 x M3 screws
    • 1 x Aluminium U channel for the Motor Bracket
    • 1 x 3D-printed Spur Gear
    • 1 x 3D-printed Pinion Gear
    • 6 x M6 stainless steel washer
    • 2 x Full-wave rectifier (2W08M)
    • 1 x Electrolytic capacitor (25V, 100uF)
    • 1 x DC-DC step-down converter (MP2315)
    • 1 x M3 Allen Grub Screw

    Data Logging Stage

    • 1 x FireBeetle (ESP32)
    • 1 x Current sensor (ACS712-30A)
    • 1 x 1 kOhm resistor
    • 1 x 120 Ohm resistor

    Smart Lighting System Stage

    • 1 x 10x10 RGB LED Matrix (WS2812B)
    • 3 x Light Dependant Resistor (LDR)
    • 1 x 3D-printed Front Light assembly
    • 1 x 3D-printed Rear Light assembly
    • 5 x M3 screws + nuts for the headlight and rear light
    • 3 x JSP 2.54mm XPH-3 housing (male + female + inserts)

    eBox Stage

    • 1 x 3D-printed eBox assembly
    • 2 x 3D-printed Power Bank Housing
    • 1 x 3D-printed eBox Mounting Bracket 
    • 1 x Strip Board
    • 1 x Relay (SRD-05VDC-SL-C)
    • 2 x Diodes (1N4007)
    • 2 x USB 2.0 to Micro USB cable (1m)
    • 2 x Power bank
    • 1 x Single Solid Core (SSC) Black wire (0.6mmx1m)
    • 1 x SSC Red wire (0.6mmx1m)
    • 1 x SSC Green wire (0.6mmx1m)
    • 1 x SSC Yellow wire (0.6mmx1m)
    • 1 x SSC Orange wire (0.6mmx1m)
    • 1 x SSC Purple wire (0.6mmx1m)
    • 2 x M3 screw
    • 1 x Rubber Sheet (250x250x1.5mm)
    • 2 x M3 Threaded brass insert 
    • 8 x Neodynium Magnet Disc (3x20mm)
    • 1 x Stainless Steel Rod Bar (200x2mm)
    • 2 x Blue LED
    • 2 x 220Ohm Resistor
    • 1 x DPDT Switch

    Wiring Harness Stage

    • Black Heat Shrink Tube 3:1 (1m x 10mm)
    • Black Heat Shrink Tube 3:1 (2m x 5mm)
    • 1 x Blue Silicon AWG 22 wire (5m)
    • 1 x Red Silicon AWG 22 wire (10m)
    • 1 x Black Silicon AWG 22 wire (10m)
    • Cable ties (200mm, 100pcs)
    • Cable ties (100mm, 100pcs)

    I already had some of these components, so prices will be based on current suppliers. Please, find the corresponding spreadsheet here.

  • eBox Stage

    Javier Betancor07/15/2018 at 23:21 0 comments

    I am creating this entry in order to show you how all different stages are being merged into a main system, the eBox. The eBox is the brain of the bike, a box that gathers, process and stores all data. It also has the ability to process commands from sensors, like a car ECU (lets call it bECU)!

    Hence, let me start with the diagram of the system:

    Please bear in mind that this schematic may change (a lot) as I am currently creating a Prototyping Board with all modules embedded.

    I would like to clarify a few things before going mad:

    • D stands for 'Diode' and I will show their specifications asap.
    • R stands for 'Resistor'. R1 is 1KOhm, R2-R4 are 220Ohm and R5 is 10KOhm.
    • C stands for 'Capacitor'. C2 is needed to smooth power surges if any (I may remove it).
    • FL stands for 'Front Light'
    • RL stands for 'Rear Light'
    • RI stands for 'Right Indicator'
    • LI stands for 'Left Indicator'
    • B stands for 'Brake'
    • MS stands for 'Main Switch'

    Q&A Section

    How many controllers are being used on this project?

    At the moment only one. However, I could appreciate some lag when testing the light system. I will merge all the code and see how it goes but I believe one MCU will be for data logging an another one for the system management.

    Why a diode in the Vin pin?

    From previous experiences I have observed that Vin also provides 5V. This will avoid any possible issue.

    A box in a bike like in the pictures?

    Well, yes and no. I need a waterproof container to install all the electronics. This eBox needs to be compact, modular, small and also needs to use a common fixation point that all bikes have. The bottle cage mounting point is my first choice.

    I know, it is still a box but I have some nice designs in mind, and you should be able to still use the mounting point for its original purpose.

    UPDATE - 6/10/18

    I have made lots of changes regarding the electronics and I would like to explain all of them in a new log entry as I am leaving this one for reference. It is always nice to see a 'before' and 'after' picture.

    Please, find the new and updated log entry here: eBox Stage 2.0 

  • Smart Lighting Stage

    Javier Betancor07/15/2018 at 21:32 0 comments

    It is time to upgrade the current setup with a smart lighting system!! The aim here is to use one of the batteries to power up a headlight and a rear light. One of the three Light Dependant Resistors (LDRs) will be used to sense the environment. The other two will be used in order to decrease the light intensity when another car/bike is coming from the opposite direction. Another functionality could be that the front and rear lights will start blinking to make sure that the car spots the bike.

    On the other hand, I would like to outline the usage of programmables LEDs. You can literally program anything! And I have some ideas in mind...I will keep you updated.

    Please find below the list of components needed for this stage:

    • 1 x 10x10 RGB LED Matrix (WS2812B)
    • 3 x Light Dependant Resistor (LDR)
    • 1 x 3D-printed Front Light assembly
    • 1 x 3D-printed Rear Light assembly
    • 5 x M3 screws + nuts for the headlight and rear light
    • 3 x JSP 2.54mm XPH-3 housing (male + female + inserts)
    • Different sizes of heatshrink
    • Hot glue gun
    • Soldering iron + soldering material
    • Patience and be willing to improve your soldering skills!

    First of all, I would like to show you the schematics of this stage. As I mentioned before, my aim is to show you how I am building this system, not to teach you how schematics should be represented.

    Having said that, I want you to imagine that you are currently on the bike. Now, I guess the arrow labeled as 'FRONT' makes sense. I know I mentioned 3 LDRs and I am showing only one as I managed to implement this one (I need more time!) only but the setup for the rest of them should be the same. Below you will find the list of abbreviations:

    • RI - Right Indicator
    • LI - Left Indicator
    • B - Brake
    • FL - Front Light
    • RL - Rear Light

    Let's start with FL and RL. I tried to make a simple design for ease of printing. However, it is not an easy task if we start thinking about the number of wires coming out and how to route them. Let me tell you something, I hate wires as they really affect aesthetics and no matter how you sort them, they are not part of the design when you first think about it. Wire routing is art, so my plan is to make them disappear!

    As it can be seen, I have also added the LED matrix, but all rows still need to be connected. Now, patience and start soldering! I will treat the LED matrix as a single LED stripe, so only one 'for' loop will be needed to address all of them instead of two (rows and columns).

    The best way I found to solder this LED matrix is to use some 'blu tack' or similar, so the matrix will be firmly attached to the bench. 

    Next step was to find a good library for Arduino. FastLED seemed to be a great choice, so I decided to check each LED to see if all of them are well connected. There is an example named 'Blink' that can be used to activate one LED each time and also to get familiar with the library itself. If you want to go further, I would suggest you to add a potentiometer to the setup, so you should be able to activate as many LEDs as you want by adjusting the knob.

    I have to say that it was a pain!! Well, I managed to finish, so let's see how it looks like o the bike, but first check out the coupling system of the headlight. Different brackets would make it easier to adapt the system to other bikes. As it can be seen, two rows of headlight were tilted 30deg to provide light close to the bike too. I will give further details on this idea as soon as I test the light on real conditions.

    I...

    Read more »

  • Data Logger Stage

    Javier Betancor07/06/2018 at 08:17 0 comments

    In this part of the project  I am going to focus on building and calibration of the data logger for the bike. I would like to measure the current generated at a certain voltage and save it on a uSD card module. From there I should be able to get the power generated on each trip. In other words, I should be able to validate my setup!

    I know I could add GPS, speedometer and cadence sensors, but we are on the wearable era! I think it is more useful to use your watch rather than add a lot of circuits to your setup that would increase the space needed, the cost of the overall project and will also use more energy. This could be saved for future implementations, but for now lets stick to basics. First walk and then... run!!

    Components needed:

    • uSD card reader module for Arduino (or similar).
    • 2 resistors to build a voltage divider
    • ACS712-30A current sensor or similar
    • Arduino MCU or similar
    • Single Core Solid (SCS) wires
    • Time...plenty of time!


      VOLTMETER (voltage divider)

      My question at this stage was very simple, how could I build an accurate voltmeter with a voltage divider? And I found out that it depends on a lot of factors, so...hands on with electronics!

      My aim with all diagrams at this stage is to show you how I did things (the big picture). I am not trying to draw ideal and standardised schematics as I believe it would be harder to understand. Who knows if the next 'Einstein' will read this and based on the level of difficulty will give up or continue learning about these little things! In other words, things as simple and easy as possible. It will help others to discover new areas of interest.

      Coming back to the main topic, it is possible to design a digital voltmeter with two resistors in series (voltage divider). If you have a look on the diagram, I have also connected a standard voltmeter in parallel, so I can validate my voltmeter. I finally attach Vout wire to an Analog Input (A/I) on the Arduino.

      Now lets look at this setup in a more 'specific' way. A/I pins on the Arduino are able to read a signal of max. 5V and the resolution of the Analog to Digital Converter (ADC) is 10 bits or 1024 divisions (2^10 bits = 1024 divisions). Remember that in programming the range would be from 0 to 1023 divisions. In my case, I am planning to read a maximum of 25V for safety, so Vin will be 25V. Vout should be less than 5V, so I set Vout to be 4V when Vin is 25V. That is how a voltage divider 'should' work.

      Next step...resistors! (R1 and R2). I had available some 1 KOhm resistors, so I grabbed a multimeter and measured its real value. The real value for R1 was 994 Ohm. Now, I assume that there is no multimeter and MCU in the diagram. Applying Kirchhoff's voltage law we get two equations and two unknowns:

      Rearranging,

      An this is how the value of R2 is calculated. In my case, the ideal value of R2 should be equal to 189.3 Ohm. As it is fairly difficult to find a standard resistor with that value, I decided to approximate the value so R2 is 220 Ohm. Wait a second! Grab the multimeter and measure the real resistance! The real value for R2 was 217.3 Ohm. Now it is very important to check that Vout will never reach 5V, so rearranging from above equations:

      If the value is less than 5V, you are good to go (mine was 4.4898V).

      Now, last thing before proceeding with the calibration as with this little tweak you will avoid a huge headache. If you connect Arduino to the computer (as we all do) and check voltage in Vref pin by choosing GND as the the usual...

      Read more »

    • Power Generation Stage

      Javier Betancor06/26/2018 at 23:47 2 comments

      Welcome to the first stage!

      The main aim is to design the system that will generate energy while cycling. Components/tools needed:

      • 1 x Stepper Motor (17HS4417). It needs 1.7A (0.85A/phase) @12-48 Vdc
      • 1 x JSP XPH-4 male + female + inserts
      • 4 x M3 screws
      • 1 x Aluminium U channel for the Motor Bracket
      • 1 x 3D-printed Spur Gear
      • 1 x 3D-printed Pinion Gear
      • 6 x M6 stainless steel washer
      • 2 x Full-wave rectifier (2W08M)
      • 1 x Electrolytic capacitor (25V, 100uF)
      • 1 x DC-DC step-down converter (MP2315)
      • 1 x M3 Allen Grub Screw
      • Calliper or similar for measurements
      • Bike - I am currently using my own bike

      Nowadays, most of bikes incorporate disc brake systems, so I decided to design a spur gear to be fixed using the same screws as the brake disc and brake callipers. I chose the rear side of the bike as it is easier to modify, so I can fit the motor bracket without adding extra components. However, since I am planning to 3D print first versions, I will not be able to fix all components as tight as it needs to be. 3D printed parts may brake under high pressure.

      So, I made some measurements and designed a quick prototype. Measurements depends on what is the size of your brake disc, the available space between the disc and the bike frame, and the size of the selected stepper motor. 

      I will use ANSI metric standard to design the gear system. In other words, both gears must have the same modulus (M), which is the selected circle pitch diameter (D) over the number of teeth (T) (figure below):



      In my case I manage to obtain a gear ratio of 4.5 and have some space left so it could theoretically fit smaller break discs as there are many variations.

      So far, I have been working on the second version. The motor bracket needed extra modifications as it needed to be reinforced with a rib. It also has been printed from one side so the filament direction will not be compromised under oscillations. The spur gear has been thickened compared to the first version and the use of washers was also very helpful.

      Figure below shows the previous design (right hand side) and the improved design (left hand side). I still need to go through a third version regarding the motor bracket because the motor shaft was touching the brake disc. I am sure you will notice it on the next picture.


      The next step was to assemble all components. It still needs some minor modifications, but it looks promising! As I said, only four extra screws are needed to fix the motor.

      I tested the system by connecting both phases of the motor in series to a capacitor, then DC/DC step down converter and a generic powerbank at the end.


      Do not forget to watch the video! Unfortunately, the first time I had a 50V capacitor instead of a 25V one. I think I do not have to explain what happened to the DC/DC step down converter. However, I could still use it as a 'circuit load', so I managed to check how much current was generated. The multimeter is connected as an Ampmeter (series) after the capacitor, so as far as I know it should show the current generated at 25V (units shown are Amperes).


      As it can be seen, 700mA were easily generated @25Vdc. This seems quite logical for me as each phase of the motor requires 850mA to work (I will update the video as soon as I get more DC to DC converters)

      Looking forward to make more tests...on the road!!

      UPDATE - 2/7/2018

      Yesterday, my partner and me decided to meet some friends in London. I could not see a better chance to test what I have been working on for the last few days. Well, I did not have anything installed on the bike...

      Read more »

    View all 9 project logs

    • 1
      Power Generation Setup

      Components needed:

      • 1 x Stepper Motor (17HS4417)
      • 1 x JSP XPH-4 male + female + inserts
      • 4 x M3 screws
      • 1 x Aluminium U channel for the Motor Bracket
      • 1 x 3D-printed Spur Gear
      • 1 x 3D-printed Pinion Gear
      • 1 x M3 Allen Grub Screw

      Assembly all the aforementioned components to create a unity and attach it to the rear/front brake disc. You will need a crimping tool for the JSP plug, unless it is already included.

      Please, be aware that what it is being shown may differ from your case. It should look like this:

    • 2
      Smart Lighting System Setup

      Components needed:

      • 1 x 10x10 RGB LED Matrix (WS2812B)
      • 3 x Light Dependant Resistor (LDR)
      • 1 x 3D-printed Front Light assembly
      • 1 x 3D-printed Rear Light assembly
      • 5 x M3 screws + nuts for the headlight and rear light
      • 3 x JSP 2.54mm XPH-3 housing (male + female + inserts)

      Please, make sure that all printed parts will fit in your bike, so make some measurements first. I also recommend you to solder all wires for the LED matrix very carefully and taking your time. It should look like this when you finish:

      It should i;ike the image below when all components are assembled:

    • 3
      eBox Setup

      Components needed:

      • 1 x 3D-printed eBox assembly
      • 2 x 3D-printed Power Bank Housing
      • 1 x 3D-printed eBox Mounting Bracket 
      • 1 x Strip Board
      • 1 x Relay (SRD-05VDC-SL-C)
      • 2 x Diodes (1N4007)
      • 2 x USB 2.0 to Micro USB cable (1m)
      • 2 x Power bank
      • 1 x Single Solid Core (SSC) Black wire (0.6mmx1m)
      • 1 x SSC Red wire (0.6mmx1m)
      • 1 x SSC Green wire (0.6mmx1m)
      • 1 x SSC Yellow wire (0.6mmx1m)
      • 1 x SSC Orange wire (0.6mmx1m)
      • 1 x SSC Purple wire (0.6mmx1m)
      • 2 x M3 screw
      • 1 x Rubber Sheet (250x250x1.5mm)
      • 2 x M3 Threaded brass insert 
      • 8 x Neodynium Magnet Disc (3x20mm)
      • 1 x Stainless Steel Rod Bar (200x2mm)
      • 2 x Blue LED
      • 2 x 220Ohm Resistor
      • 1 x DPDT Switch

      Follow he diagram below for the soldering part. Please, make sure that the perforated board can be trimmed, so allow some tolerance for fitting purposes.

      Again, please make some measurements first for the CAD models. The final result should look like this:

    View all 4 instructions

    Enjoy this project?

    Share

    Discussions

    Javier Betancor wrote 08/21/2018 at 19:21 point

    Hi all! 

    First of all, thank you hex4def6, electrobob and K.C. Lee for all your different ideas regarding the capacitor issue. I really appreciate it and it also made me think...a lot!

    Now that I am back and full of energy, I would like to share my thoughts with you.

    I finally decided to use a 100uF@25V smoothing capacitor. I made my choice based on this post:

    https://www.electronics-tutorials.ws/diode/diode_6.html

    I also managed to simulate it using PartSim, but first I measured the max. voltage with no load, 50V and also the load resistance, 1.12MOhm:

    http://www.partsim.com/simulator/#154948

    Now, my options to store most of the generated energy based on your suggestions are:

    - TL431 Shunt regulator - Nice option but its maximum current is 100mA, so it need to be used in conjunction with a PNP transistor to be able to handle more power. (http://www.bristolwatch.com/ccs/TL431A4.htm)

    - MPPT - Excellent choice. I already bought one from Amazon (https://www.amazon.co.uk/SODIAL-Controller-Step-down-Charging-Display/dp/B076BFCGG6/ref=sr_1_3?ie=UTF8&qid=1534878476&sr=8-3&keywords=5A+MPPT) I think it would be nice to try, but it is bulky and I believe I have more choices.

    - LM78XX or LM731 linear regulator - Not very efficient for this purpose as a buck converter will do the job perfectly (https://www.youtube.com/watch?v=CEhBN5_fO5o&frags=wn).

    - What I had since the very beginning is a 'Step-down Buck Converter Module' (https://www.ebay.co.uk/itm/DC-6-24V-12V-24V-to-5V-3A-Car-USB-Charger-Module-Buck-Step-Down-Converter-Phone/401265883616?hash=item5d6d4f79e0:g:OjoAAOSwQctbMTOy) with the MP2315 synchronous step down converter embedded (https://www.mouser.com/ds/2/277/MP2315_r1.01-478439.pdf).

    I think I am already making the most of it. Am I right?

    Thank you for your time and patience!

    Javier

      Are you sure? yes | no

    hex4def6 wrote 07/10/2018 at 16:58 point

    "Unfortunately, the first time I had a 50V capacitor instead of a 25V one. I think I do not have to explain what happened to the DC to DC step down converter." ... 


    If you're implying that having a higher rated capacitor damaged your DC-DC converter, you're mistaken. The voltage rating of the capacitor is maximum voltage that it can sustain before being damaged, not the guaranteed voltage that it will output. Therefore, there is no downside to using 50V capacitors (except them being bigger / more expensive).

      Are you sure? yes | no

    electrobob wrote 07/16/2018 at 07:55 point

    the 25V cap might have limited the voltage from the generator if it was stressed beyond the rating. See here what happens: http://www.diyaudio.com/forums/power-supplies/309332-happens-electrolytic-capacitor-overvoltage.html 

    Ideally, there should be some over voltage limiting element from the generator, like a zenner diode.

      Are you sure? yes | no

    Javier Betancor wrote 07/17/2018 at 22:06 point

    Hi Hex4def6,

    Thanks for your comment and also for reading my logs!

    I might have missed some details about what happened. There was no load after the capacitor and I was messing around with the bike. I connected the USB module and 'pop'. I assumed the capacitor was fully charged or the module could be faulty. 

    Any suggestions? I am planning to add a zenner diode as Electrobob suggested. 

      Are you sure? yes | no

    hex4def6 wrote 07/17/2018 at 22:53 point

    I think a zener is a pretty good / easy way to deal with it. It's possible that the 25V was protecting it in the manner he suggested (although this is still bad -- the capacitor will eventually fail)


    I would suggest measuring the output voltage when you are cycling at top speed without the DC-DC connected. If it's generating substantially above the rated voltage, a zener diode is going to get very hot / act like a big load, which is inefficient. If that is so, you may need to either adjust the gearing ratio, or choose a converter with a bigger input voltage range.

      Are you sure? yes | no

    K.C. Lee wrote 07/17/2018 at 23:21 point

    You'll need to size the protection circuit to the amount of power that can be generated from the generator.

    Zener diodes are reasonably prices to may be 5W ($1.25), but they can get expensive or hard to find beyond that.  You might want to look at a crowbar circuit:

    http://www.industrial-electronics.com/images/switchmode_1-11-2.jpg    

    Use figure b to boost the wattage.  Transistors are reasonably cheap and you can get them mounted on a heatsink easily.  Add a fuse on the input side too so if it get bad enough, the fuse would blow to protect the rest of your circuits.

      Are you sure? yes | no

    K.C. Lee wrote 07/17/2018 at 23:24 point

    50V caps in general have lower ESR than 25V and have higher ripple current rating.  They are not be the reason why things blow up.

      Are you sure? yes | no

    Javier Betancor wrote 07/06/2018 at 07:40 point

    Hi Electrobob!

    Thanks for spending some time reading this post! I am glad you find it interesting because I really like it!

    So far, I cannot feel any drag on the bike thanks to the gear system. You may notice that I had both diode bridges connected in series but I decided to connect them in parallel (more current generated). I can easily generate 16W (1A@16V) which I think it should be enough for the system. I am sure you can install a bigger motor and a bigger gear, but I am getting good results with this setup. 

    I should have some data available soon, so you should be able to see that it really works...

      Are you sure? yes | no

    electrobob wrote 07/09/2018 at 11:21 point

    Thanks! Waiting for more data.

    The thing works as it is, but if you want to get every bit out of it you might try to use a MPPT converter and charge the battery with it directly. 

    Also highly recommended: add some over voltage protection, like a zenner diode across the generated power, so you don't go over the maximum input of the DC/DC converter. 

      Are you sure? yes | no

    Javier Betancor wrote 07/17/2018 at 21:44 point

    Hi Electrobob!

    Sorry for the late reply...loads of work.

    Love the idea of using MPPT! I will make a note for future improvements.

    Voltage protection is a must! And I missed it...well I am learning.

    Thank you for your comments, they are very helpful! Hope I can help you the same way!

      Are you sure? yes | no

    electrobob wrote 07/05/2018 at 09:10 point

    This is a very cool project. It seems you are getting more power than the classical 3W dynamo. 

    What is your experience with the drag added by the motor?

      Are you sure? yes | no

    Similar Projects

    Does this project spark your interest?

    Become a member to follow this project and never miss any updates