Bicycle pedal generator. Overview of electric current generators for a bicycle: bottle, contactless and dynamo hubs

Finally, there is an opportunity to show you a video on a topic that interests a lot of Internet users. In this video tutorial, we will show you how to make a fairly powerful electric generator from a bicycle, which will generate a current of 12 and 220 volts. Thanks to this device, you can charge the battery in 1-1.5 hours and power a TV or other electrical appliances from it for several hours through an inverter. As a bonus, such a generator becomes a good exercise bike, on which it is pleasant to “ride”, realizing the benefits that it brings. You can use the bicycle generator in the country, at home with frequent switching off of the light, and on a hike it will become a great help to create almost urban comfort, if you make all the details of the structure foldable and sufficiently mobile.

Technical characteristics of the bicycle generator. With a leisurely "ride" by pedaling, an electric current of 5 Amperes with a voltage of 220 volts is generated. The acceleration of rotation produces more than 10 Amperes; in this mode the fuse of the author of this device has blown.

For work you will need:
- 12 volt collector motor;
- nozzle on the motor axis - drill chuck;
- uninterruptible power supply or inverter from 12 to 220;
- diode for 10 amperes: D214, D242, D215, D232, KD203, etc.;
- wires;
- bicycle;
- 12 volt battery (the higher the power, the longer its charge will last).

Assembly.
First, set up the bike in such a way that the rear wheel is suspended above the ground and rotates freely. To secure the bike in the desired position, the author of the video tutorial used materials at hand and made a stand out of the boards. He fixed the chuck from the drill to the motor axis and installed the motor so that, with the help of a spring, it was reliably pressed against the rear wheel. The connection proved to be reliable with no slippage.

In this design, the motor acts as a generator, so any 12 volt collector motor can be used. The more power the motor has, the more energy it will generate. The device, which was made by the author, uses a fan from a VAZ car. Its rated power is 120 watts.

In order to find out how much power this motor is capable of generating electricity in generator mode, we connect a 90-watt light bulb to it and see that the generator's performance is so high that the light bulb can burn out when the engine speed increases.

It is advisable to use a battery to accumulate electricity. A car battery works well for this purpose. To prevent the motor from rotating from the battery, you need to assemble a circuit with a diode that will block the current in the right direction and prevent unnecessary discharge. The anode of the diode to the positive of the engine, the cathode to the positive of the battery.

The 12-volt battery can now be charged, the voltage from which can be removed for equipment with the appropriate voltage. But in order for the voltage at the output of the generator to be 220 volts, an uninterruptible power supply from a computer will help.

The UPS design contains a small 12-volt low power battery. When the current in the network is turned off, the converter, which is embedded in the UPS circuit, raises 12 volts to 220, allowing the computer to work on it for some time. In order to ensure operation for a long time, you can remove a low-power battery from the circuit and connect a powerful car battery instead of it, as described above.

Now, by simply pedaling, you can get 220 volts, almost the same as in a regular network. Such a generator is capable of powering many electrical appliances in the house. There is one thing. If you connect a load of more than 500 watts to an uninterruptible power supply, then it starts to warm up and the battery is quickly discharged. Therefore, it is necessary to weigh the power of the bicycle generator and the built-in battery and the expected load. Instead of an uninterruptible power supply, you can use a car inverter with 12 volts to 220 volts.

Charging the battery by pedaling will increase the voltage across the battery. When it reaches 14.4 volts, the battery will be charged. Further, it is impossible to continue charging, since when overcharged, the electrolyte will begin to boil off.

Unlike a gasoline generator, a bicycle based generator does not require resources that may be in short supply.

Is it possible to make an electric generator from a bicycle?
How electricity is generated in Brazil.
Where to apply a bicycle generator.
What is needed to make it.
How easy it is to make a bicycle electric generator.

Many of us have probably wondered: if a generator were attached to a bicycle, how much electricity could be generated? And scientists have long calculated that a cyclist, depending on the level of training, can generate from 0.15 to 0.25 kW / h.

Although there are records. During one of the tests, it was possible to generate 12 kW / h in 24 hours. But this is not the limit, Siemens said that it has created a plant with which a person could get 4.2 kW / h in an hour. But the 62-year-old inventor Manoj Bhargava has assembled a unique exercise bike. Exercising on it for just one hour, you can provide electricity to a small house for a whole day. The scientist hopes that Free Electric (as he called his invention) will help solve problems with electricity in third world countries. Let's watch a video about him:


Now take a look at the photo below. What do you think these people are doing?


These are prisoners, violators of the order of the colony, in one of the Brazilian prisons, instead of a punishment cell, they generate electricity. They charge batteries that are used at night to power Santa Rita's city lights. And the idea was taken by the head of this institution in the Phoenix Women's Prison (Arizona, USA). There, the convicts pedal for 16 hours a day and this is counted for them as a day of imprisonment. Thus, they shorten their time.

Electric generator application

And where can we use a bicycle electric generator in our everyday life?
You can, for example, charge your phone while doing sports in the morning. Well really, why not exercise and save energy at the same time? Measure how long it takes to charge your cell. Try to remember the time and try to beat it in the future.
You can combine, so to speak, business with pleasure - see if you can generate as much energy as the blender consumes. Then you can make yourself a sports cocktail.

If you have a technically daring kid, then why not get involved in bringing this idea to life just for the sake of experience.
Turn on your imagination and maybe you will come up with some other funny ideas.

It is possible that you want to bring your ideas to life. What is needed for this?

  • Bicycle. For these purposes, an old one that has not been used for a long time or is lying around is perfect.
  • 12V DC motor.
  • V-belt for connecting the rear wheel to the engine.
  • A bar for a stand 100 * 50 mm.
  • Diode.
  • 12V battery.
  • An inverter that converts direct current 12V to alternating current 220V.

If you do not plan to connect anything other than a DC light bulb to this device, then you can do without the last three points.
And to connect other electrical appliances, they will be needed. The reason for this is the uneven voltage that will come from the generator (electric motor).

How to make an electric generator

Let's get started. I am posting two schemes for comparison. On the first, the pedal generator can only power DC light bulbs, and on the second, it can fully work with devices designed for 220V AC. Choosing a scheme.


Now we remove the tire with the camera from the rear wheel. We measure approximately the required length of the belt. The exact value is not needed, because the tension will be adjusted using the stand. We go to the nearest auto parts store and buy the appropriate belt. Next, from a bar with a section of 100 * 50 mm, we make a rack for installing the rear wheel of a bicycle and an electric motor. You should end up with something like this:

We install the bike with the rear axle in the slot of the rack, put the belt on the wheel and the engine. After that, we adjust the belt tension by moving and fixing the electric motor in the desired position.


In principle, the first circuit is ready. It remains only to connect an electric lamp to the generator. And for the second circuit, you need to take a 12V battery and connect it to an electric motor through a diode. The diode in this circuit only allows current to flow from the generator to the battery. When installing, make sure the cathode leg is pointing towards the positive terminal of the battery. The cathode is usually marked with a thin gray stripe on the diode body.


After that, it remains to connect the inverter to the battery.


Just before connecting, make sure to connect the positive and negative terminals correctly, otherwise you risk blowing the inverter fuse. And in general, be careful, because at the output we will already receive an alternating current with a voltage of 220V. In the photo below you can see how our creation will look after the final assembly and painting.

Greetings, brains! Homemade This brain leadership has an excellent property - it allows you to combine business with pleasure, namely, playing sports and also generate electricity.

The foundation homemade- a bike connected to a motor, which will convert your calories into electric current. In more detail, the rotation of the pedals is transmitted to the rear wheel, which accordingly rotates the motor shaft, as a result of which an electric current arises in the motor windings, which flows through the charge controller to the connected battery and is "preserved" there. An inverter with two outlets and two USB outlets is connected to the battery. To control and monitor all electronics, an Arduino microcontroller is used, which turns on / off the charge controller and the inverter, as well as displays the parameters from the sensors via the LCD display.

Materials and components:

Bicycle frame with rear wheel
Timber and bolts (for stand)
Exercise bike stand
Motor 24V
Cooling system belt
Belt pulley
12V battery
DC-DC charger
DC-AC inverter with USB outputs and sockets
Arduino (I used Leonardo, but others will work as well)
MOSFET (Insulated Gate Field Effect Transistor)
LED and photodiode
Hall effect sensor
LCD screen
Toggle switch "On / Off"
Relay, 5V voltage regulator, diode, buttons and resistors

Step 1: stand

To begin with, we construct a front fork support from a piece of 60x180cm plywood, 5x10cm bars and studs with nuts. I made it because I got the bike without the front wheel and had to figure out how to fix it. Stand crafts it turned out to be functional and withstands the pressure of even the most zealous "racers".

You can also make some kind of rack for the rear wheel, but I have come to the conclusion that a bicycle stand is the most suitable option. You just need to remove the additional load on the wheel, which sometimes happens on these stands, since it will only interfere with generation.

As a generator, you can take a 24-volt motor from a scooter, which we will force not to "eat" electricity, but to generate it. We remove the tire with the camera from the rear wheel rim and put on the belt from the cooling system, from it we take the pulley, which we respectively install on the motor shaft. After that, we put the belt on the pulley and tighten it, then we fix the motor in this position on the plywood base.

The design of the stand is such that it has the ability to adjust, and this option allows you to tighten the belt, as well as remove the bike if necessary.

Step 2: From generator to battery

Almost any rechargeable battery can be used as a "storage", for example, I took a 12V lead-acid battery, because it was at hand. But in any case, you need to know the technical characteristics and operating conditions of the selected battery for the correct charge / discharge, which can be found in the technical passport. In my case, the battery does not "like" when the voltage rises above 14V, and the current is not higher than 5.4A.

A complete discharge or overloading of the battery can damage it or reduce its service life, therefore, brain chain a toggle switch "On / Off" is installed, which prevents leakage of current under phantom loads, and an Arduino microcontroller is also installed, which displays the state of the circuit.

Naturally, it is impossible to directly connect the battery to the terminals of the motor, this will simply "kill" the battery, so we install a charge controller between them, which will supply the battery with electricity of the current and voltage that it requires. The controller itself will turn on when you start pedaling. homemade, and a 3-second hold of the controller start button will check the battery status, and if it needs charging, it will start. When you stop pedaling, the controller turns off.

When buying a charge controller, the main thing is to choose the necessary characteristics, that is, so that it works in the same ranges as the generator with a battery. So for my brainwashing you need a controller that can accept an input voltage of up to 24V and provide 14V with a current of no more than 5.4A. Basically, the controllers have the ability to configure parameters, so I just set the current to 5A on it, as required for my brain accumulator.

Step 3: inverter

It is impossible to simply connect your gadgets to the battery for charging, since this also requires certain voltage and current strength, so we connect an inverter to the batteries, which outputs electricity through its sockets and USB outputs with the parameters necessary for charging.

Inverter for crafts should be purchased according to the battery parameters and the calculated power. So the battery gives out 12V, the power for charging the phone is about 5W, and the laptop is 45-60W. I picked up an inverter with a power of 400W, 2 sockets and 2 USB-outputs, although I do not plan to charge 400W gadgets at the same time.

The inverter can be left out if you only plan to charge your phone or other USB devices. Then you just need to lower the voltage from the battery to 5V and "bring" it through the USB-cable. With this method, electricity is not once again converted from DC to AC, and then from AC to DC, but many are still inclined to trust the inverter rather than an impromptu USB port.

The inverter itself is connected simply: the positive input of the inverter to the positive terminal of the battery, negative brainwave to the negative terminal. And everything works simply: the motor charges the battery through the charge controller, the battery "feeds" the inverter, which charges the connected gadgets.

Step 4: Arduino and battery charging

Earlier it was said that in order to start charging the battery, you need to hold the start button of the charge controller for 3 seconds. This is a little inconvenient, it is especially troublesome to explain the order of inclusion homemade other people. Therefore, we will "hack" the charge controller and make sure that a simple push of a button starts the entire system and you can just pedal.

The charge controller is a "magic" box, to one side of which the positive and negative contacts from the battery fit, and on the other side the wires from the motor are connected. Anything "in between these parties" goes beyond this brain leadership, but still this box will have to open and touch the "magic".

The buttons are connected to the circuit with a 5-track cable, and when one of the buttons is pressed, the signal from the fifth track passes through this button along the track connected to it to the board. We change this 5-track cable to a bundle of five ordinary wires, that is, we unsolder the cable and solder the five wires, on the other end of which we install the connector through which we connect the breadboard. On this breadboard, we place 4 buttons, which are not yet connected to the microcontroller, we will control the charge controller.

IMPORTANT!!! If you decide, like me, to leave the controller board without a case, then be sure to arrange a heat sink, since the controller gets very hot during "intensive" driving.

To "teach" the Arduino to press the start button, you must use brainrelay, which will sustain a 3-second "press" on the signal from the microcontroller and turn on the controller. And although many relays have built-in protection diodes, I still recommend installing an additional one to avoid current leakage back to the Arduino pins.

The question arises: when should the Arduino give a trigger signal? The answer is obvious - when you start pedaling, otherwise there is no point in starting the controller. The charge controller will not "charge" an already full battery, but you can once again not check the charge level manually, but shift this responsibility to the microcontroller, that is, make it monitor the voltage and current parameters. To do this, you can use the analog inputs of the Arduino, only they work in the range from 0 to 5V, while the battery terminals are 11-14V, and the motor outputs are from 0 to 24V, therefore, voltage dividers are used. When connecting the battery to divide the voltage, we take one resistor of 1 kOhm, and the second, going to ground, 2.2 kOhm. Then, at a maximum voltage of 14V from the battery, the second resistor, from which the readout will take place, will be about 4.4V (for more details, see the article on dividers). When connecting the motor, we use 1kOhm and 4.7kOhm resistors in the voltage divider, then at 24V from the Arduino generator it will read as 4.2V. All these measurements in the Arduino code are easy to convert to real values.

To avoid overcharging the battery homemade the voltage at its terminals should be less than 14V, but for the generator the parameters are more flexible - if the cyclist "generates" a voltage sufficient to turn on the controller, then the controller can charge the battery. As a result, the voltage parameters will be as follows: more than 5V from the generator, and less than 14V for the battery.

The microcontroller itself will be turned on via a "button" or something similar, since it is not reasonable to keep it on all the time. And it is better to "power" it not from a replaceable 9V battery, but from a 12V battery. To do this, we connect the microcontroller through a connector and a 5V voltage regulator to the battery, although the Arduino supports a 12V supply voltage. By the way, you can power some other electronics from these 5V, and not use the 5V pin on the Arduino for this. The regulator must be placed on the radiator, as it gets very hot during operation.

Sample code:

// complete code at the end of this Instructable

int motor = A0; // motor / generator pin on the Arduino

int batt = A1; // 12V battery pin

int cc = 8; // charge controller pin

int wait = 500; // delay in milliseconds

float afactor = 1023.0; // Arduino's analog read max value

float motorV, battV; // motor voltage and battery voltage

boolean hasBeenOn = false; // to remember if the charge controller has been turned on

pinMode (motor, INPUT);

pinMode (batt, INPUT);

pinMode (cc, OUTPUT);

motorV = getmotorV (); // motovr / generator output voltage

if (motorV> 1.0 &&! hasBeenOn) (// if our DC motor gives out more than 1V, we say it’s on

digitalWrite (cc, HIGH); // the cc pin is connected to a relay

// that acts as the "Start" button for the charge controller

delay (3500); // our charge controller requires the start button to be held for 3 seconds

digitalWrite (cc, LOW); // electrically releasing the start button

hasBeenOn = true; // the charge controller should be charging the battery now

delay (wait); // we want our Arduino to wait so not to check every few millisec

else if (motorV> 1.0 && hasBeenOn) (

delay (wait); // again, we don’t want the Arduino to check every few millisec

hasBeenOn = false; // the person is no longer biking

// we wrote separate functions so we could organize our code

float getmotorV () (

return (float (analogRead (motor)) / afactor * 5.0); // the motor gives out about a max of 5V

float getbattV () (

return (float (analogRead (batt)) / afactor * 14.0); // the battery technically is ~ 13.5V

Step 5: Arduino and inverter

Keeping the inverter permanently connected to the battery is not beneficial for several reasons. First, the phantom load discharges brain accumulator, and secondly, you need to make "protection" from cunning people who want to recharge the gadget, but do not want to turn the pedals for this. Therefore, we will again use Arduino, which will turn on / off the inverter and thereby control the charging outputs, without relying on the honesty and technical knowledge of the users.

Integrate the inverter and Arduino as a key for it, using a MOSFET. This is essentially a normal transistor, but it requires small turn-on currents, with large passing currents (but the turn-off voltage should be higher than that of conventional transistors, although this is not a problem for Arduino).
We connect the MOS transistor to the circuit so that the negative output of the inverter is connected to the collector, the negative output of the battery to the emitter, and the output of the Arduino to the base. When all the required parameters are the same (such as the duration of the ride, the supplied voltage, etc.), the Arduino sends a signal to the transistor and it opens, allowing current to flow from the battery to the inverter; if the Arduino interrupts the signal, then the transistor turns off, interrupting the circuit, and the inverter shuts down.

Note that when large currents pass through the transistor crafts it gets very hot, therefore, just like on the voltage regulator, the installation of a radiator on the transistor is required!

Sample code:

// the bolded code

int mosfet = 7; // used to turn on the inverter

unsigned long timeOn, timecheck; // for time checking

if (motorV> 1.0 &&! hasBeenOn) (
timeOn = millis ();

inverterControl ();

// the separate function

void inverterControl () (

battV = getbattV (); // check the battery voltage

timecheck = millis () - timeOn; // check how long the user has been biking

/ * We want the user to have biked for a certain amount of time

before allowing the user to charge the user’s electronics.

We also need to be sure that the battery isn’t undercharged.

if (hasBeenOn && (battV> 10.0) && (timecheck> 5000) &&! mosfetOn) (

digitalWrite (mosfet, HIGH); // the inverter is on when the Arduino turns on the MOSFET

mosfetOn = true;

else if ((battV<= 10.0)) { //turns off inverter if the battery is too low

digitalWrite (mosfet, LOW);

mosfetOn = false;

else if (timecheck<5000) { //turns off if the user stopped/hasn’t biked long enough

digitalWrite (mosfet, LOW);

mosfetOn = false;

Step 6: Arduino and Feedback

As a feedback during training, you can take the values ​​of the rear wheel rotation speed, that is, the "cyclist" will not only charge the battery, but also receive information about the intensity of his training. An optical sensor and a Hall sensor can be used to read the revolutions of the rear wheel.

Optical sensor

In its brainwashing I went by installing an optical sensor to read the number of revolutions of the rear wheel, and made this sensor from parts I could get my hands on. The bottom line is simple: an opaque object is attached to the wheel rim, here is a thin colored plastic, which, when rotating, periodically interrupts the LED-photodiode beam. The photodiode and LED themselves are installed in a piece of foam with a selected cavity in which the wheel rotates (see photo). Due to the plasticity of the foam, it is easy to place and adjust the LED-photodiode system in it, namely, to place them on the same line, this is important, since the photodiodes are very sensitive to the angle of the incident beam. As a result, when rotating, the plastic should not interfere with the rotation of the rim itself, and interrupt the beam.

The diode connection diagram is also simple: 5V is supplied to both diodes from the microcontroller, but it is imperative to install a resistor in the LED circuit, since the LED has a low resistance and therefore the current flowing through it will be large and the LED will simply burn out. Therefore, in series with the LED, we mount a 1kOhm resistor, and then the current through the LED will flow approximately 5mA. The principle of operation of a photodiode is the opposite of an LED, that is, light is used to generate voltage, and not vice versa. And therefore, in the circuit, the photodiode must be installed in the opposite direction than the LED. The voltage generated by the photodiode is measured across the resistor connected after the photodiode, and the voltage value is not important, because we only need to interrupt the beam from the LED. The value of the resistor after the photodiode must be selected so that even when the light from the lighting lamps hits the photodiode, the voltage will be 0. By brain scientists I selected a 47kOhm resistor, and when the LED beam is blocked, the voltage is 0, and when the beam hits the photodiode, the voltage is sufficient for reading. Thus, at zero voltage, the Arduino understands that the wheel has made one rotation.

Hall Sensor

To read the wheel rpm value crafts you can also use a Hall sensor, which reacts to changes in the magnetic field falling on it. This means that in order to read the revolutions in this way, you can place a magnet on the rim, and the Hall sensor can be installed in about the same way as the LED from the previous method. The principle of operation of a Hall sensor is that it generates a voltage proportional to the magnetic field applied to it, that is, every time a magnet passes near the sensor, the Arduino reads a voltage change.

Sample code:

// the complete code can be found at the end of this Instructable
// the bolded code is what we add to the code from above

int pdiode = A3; // photodiode for rpm

int photodiode;

int cycle = 0;

int numCycle = 20; // for averaging use

float t0 = 0.0;

float t1;

pinMode (pdiode, INPUT);

if (motorV> 1.0 &&! hasBeenOn) (

cycle = 0;

t0 = float (millis ());

getRpm ();

void inverterControl () (

else if (timecheck<5000) {

cycle = 0; // this is a safety since arduino can’t run multiple threads

t0 = float (millis ());

void getRpm () (

// may want to consider an if else / boolean that makes sure increasing cycle only when biking

if (t0 == 0.0) (// safety for if the arduino just started and t0 hasn’t been set yet

t0 = float (millis ());

photodiode = analogRead (pdiode);

if (((photodiode! = 0) && (analogRead (pdiode) == 0)) || ((photodiode == 0) && (analogRead (pdiode)! = 0))) (

cycle ++;

t1 = float (millis ());

if (cycle> numCycle) (

rpm = (float (cycle)) / (t1 - t0) * 1000.0 * 60.0; // conversion to rotations per minute

cycle = 0;

t0 = float (millis ());

Step 7: Arduino and current sensor

Our charge controller homemade displays the amperage coming from the battery, but you can also use the amperage as an indicator of the intensity of the workout. And for these purposes, we will use the Hall effect mentioned in the previous step, that is, by passing the current from the charge controller through a special sensor with the Hall effect, which generates a voltage proportional to the magnetic field created by the passing current, we can indirectly measure the current going to the battery. To process the obtained values, unfortunately, there are no specific tables of the ratios of the generated voltages and currents, but this brain puzzle can be solved by passing known currents through the sensor and measuring the voltage generated by the sensor. According to the data obtained in this way, the ratio of voltage and current is displayed.

This current can be converted into other statistics - energy supplied to the battery and total energy generated. That is, by comparing the energy going to the battery and the energy consumed to charge the connected devices, it is possible to determine whether the battery needs to be charged if the connected devices consume more energy than the battery can supply.

Sample code:

/ the complete code can be found at the end of this Instructable

// the bolded code is what we add to the code from above

int hall = A2; // for current sensing

float Wh = 0; // for recording the watt-hours generated since Arduino has been on

pinMode (hall, INPUT);

else if (motorV> 1.0 && hasBeenOn) (

getCurrent ();

void getCurrent () (// the current going into the battery

current = (float (analogRead (hall)) - 514.5) /26.5; // equation for current from experimental plot

Wh = Wh + float (wait) /3600.0*current*13.0; // calculation for watt-hour

// assume 13V charge controller output into battery

Step 8: LCD

There are many options for displaying information using Arduino and LCD. The screen I have selected has 2 lines with 16 characters each, 4 direction buttons, a select button and a reset button. To simplify coding, I used only directional buttons in the code, the code itself is rather "raw" with approximate values ​​for many parameters. If you are fluent in C ++, then you can write your own more professional braincode... I wanted the "cyclist" to have saved statistics about the best time for one ride, total distance, total watts / hours since the start of operation. crafts... During the race, I planned to display on the display the time of the race, the speed in km / h, the generated power and the energy in Watt / hours generated during the race. If this is your first time using an LCD in your homemade, then it is useful to get acquainted with this.

It is not difficult to calculate the necessary data: to obtain the rotational speed and km / s, you need to divide the number of wheel revolutions by the time spent to complete this number of wheel revolutions and convert to the appropriate units. Having measured the radius of the rear wheel, it is equal to 28cm, we get a circumference of 175.929cm or 0.00175929km. Further, according to the formula "speed * time = distance" we get the distance traveled. Using the formula "current * voltage" we calculate the power, and to obtain the energy value using the Riemann sum, we multiplied the instantaneous power by the elapsed time (0.5 s) and added every half second of pedaling.
Regarding the menu, I indexed each display and used a dummy variable to navigate through the displays.

As for the menu, each screen is indexed and a dummy count variable is used to navigate the screens. "Up" and "Down" will increase or decrease the dummy variable, "Left" leads to a higher level menu, and "Right" leads to a submenu.

Menu scheme:

Main menu
> Best time
>> Show value
> Total distance
>> Show value
> Generated power
>> Show value
> About
>> Any information about the bike.
// The complete code can be found at the end of this brain leadership

// the bolded code is what we add to the code from above

// include the library code:

#include

#include< Adafruit_MCP23017.h>

#include< Adafruit_RGBLCDShield.h>

// This portion is taking word for word from Adafruit's tutorial, which we linked above

// The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can’t use those for analogRead () anymore

// However, you can connect other I2C sensors to the I2C bus and share

// the I2C bus. Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield ();

// These #defines make it easy to set the backlight color

#define RED 0x1

#define YELLOW 0x3

#define GREEN 0x2

#define TEAL 0x6

#define BLUE 0x4

#define VIOLET 0x5

#define WHITE 0x7

// here starts the part we coded

int ptr = 0; // menu pointer

int mins, secs, kmh;

// long term storage variables

int timeAddress = 0;

int distanceAddress = 1;

int powerAddress = 2;

byte timeValue, distanceValue, powerValue;

boolean isHome = true;

lcd.begin (16, 2);

lcd.print ("Hello, world!");

lcd.setBacklight (WHITE);

timeValue = EEPROM.read (timeAddress);

distanceValue = EEPROM.read (distanceAddress);

powerValue = EEPROM.read (powerAddress);

root (); // set display to root menu

uint8_t i = 0;// we put this in because the tutorial included it (not exactly sure what it’s for)

menuFunction (); // see if button is pressed

if (motorV> 1.0 &&! hasBeenOn) (

lcd.clear ();

lcd.setCursor (0,0);

lcd.print ("Warming up ...");

lcd.setCursor (0,1);

lcd.print ("Keep pedaling.");

lcd.setBacklight (GREEN);

digitalWrite (cc, HIGH); // press start on charge controller

lcd.setBacklight (YELLOW);

delay (3500); // press start for 3.5 seconds

digitalWrite (cc, LOW); // stop pressing start

// battery should now be charging

lcd.clear ();

lcd.setCursor (0,0);

hasBeenOn = true;

lcd.print ("Charging battery");

lcd.setBacklight (RED);

lcd.setCursor (3, 1);

timeOn = millis ();

// time of how long person has been pedaling

lcd.print ((millis () - timeOn) / 1000);

isHome = false;

else if (motorV> 1.0 && hasBeenOn) (

secs = int ((millis () - timeOn) / 1000);

mins = int (secs / 60);

secs = int (secs% 60); // this could also be written as a separate function

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print (mins);

lcd.setCursor (2, 0);

// print the number of seconds since start biking

lcd.print (":");

lcd.setCursor (3, 0);

lcd.print (secs);

lcd.setCursor (9, 1);

lcd.print (rpm);

lcd.setCursor (13,1);

lcd.print ("RPM");

isHome = false;

getCurrent (); // this prints W, Wh

getkmh (); // this prints km / h

if (timeValue> (millis () - timeOn / 1000/60)) (

timeValue = int (millis () - timeOn / 1000/60);

EEPROM.write (timeAddress, timeValue);

root ();

void getkmh () (

kmh = rpm * 60.0 * revolution;

lcd.setCursor (0, 1);

lcd.print (kmh);

lcd.setCursor (2,1);

lcd.print ("km / h");

void getCurrent () (

current = (float (analogRead (hall)) - 514.5) /26.5;

lcd.setCursor (6, 0);

lcd.print (int (current * 13));

lcd.setCursor (8.0);

lcd.print ("W");

Wh = Wh + float (wait) /3600.0*current*13.0;

lcd.setCursor (10,0);

lcd.print (Wh);

lcd.setCursor (13,0);

lcd.print ("Wh");

void menuFunction () (

delay (200);

uint8_t buttons = lcd.readButtons ();

if (buttons) (

if (buttons & BUTTON_UP) (

scrollUp (ptr);

if (buttons & BUTTON_DOWN) (

if (ptr> 0) (

scrollDown (ptr);

if (buttons & BUTTON_LEFT) (

if (ptr> = 1 && ptr<=4){

root ();

else if (ptr> = 5) (

menu ();

if (buttons & BUTTON_RIGHT) (

scrollRight ();

void menu () (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("MENU (scroll V)");

lcd.setCursor (0, 1);

lcd.print ("Top times");

ptr = 1;

void root () (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Bike to Charge!");

lcd.setCursor (0, 1);

lcd.print ("Menu (Right>)");

ptr = 0;

isHome = true;

void scrollRight () (

Serial.println (ptr);

if (ptr == 0) (

menu ();

else if (ptr == 1) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Top time");

lcd.setCursor (0, 1);

lcd.print (timeValue); // RECALL NUMBER !!! TOP TIME

lcd.setCursor (13,1);

lcd.print ("min");

ptr = 5;

else if (ptr == 2) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Total distance");

lcd.setCursor (0, 1);

lcd.print (distanceValue); // RECALL NUMBER !!! TOTAL DISTANCE

lcd.setCursor (14,1);

lcd.print ("mi");

ptr = 6;

else if (ptr == 3) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Total energy");

lcd.setCursor (0, 1);

lcd.print (powerValue); // RECALL NUMBER !!! TOTAL WATTHOURS

lcd.setCursor (15,1);

lcd.print ("J");

ptr = 7;

else if (ptr == 4) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Scroll down to");

lcd.setCursor (0, 1);

lcd.print ("read more !!! (V)"); // RECALL NUMBER !!! TOTAL WATTHOURS

ptr = 8;

void scrollDown (int i) (

Serial.println (i);

if (i == 1) (

lcd.setCursor (0, 1);

lcd.print ("Total distance");

ptr = 2;

else if (i == 2) (

lcd.setCursor (0, 1);

lcd.print ("Total energy");

ptr = 3;

else if (i == 3) (

lcd.setCursor (0, 1);

lcd.print ("About!");

ptr = 4;

else if (i == 8) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Electronics bike");

lcd.setCursor (0, 1);

lcd.print ("worked on by:");

ptr = 9;

else if (i == 9) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("A. McKay '13");

lcd.setCursor (0, 1);

lcd.print ("J. Wong '15");

ptr = 10;

else if (i == 10) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("A. Karapetrova'15");

lcd.setCursor (0, 1);

lcd.print ("S. Walecka '15");

ptr = 11;

else if (i == 11) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("S. Li'17");

lcd.setCursor (0, 1);

lcd.print ("N. Sandford'17");

ptr = 12;

else if (i == 12) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("For His Majesty");

lcd.setCursor (0, 1);

lcd.print ("Dwight Whitaker");

ptr = 13;

else if (i == 13) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Phys 128");

lcd.setCursor (0, 1);

lcd.print ("Pomona College");

ptr = 14;

else if (i == 14) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Paid for by the");

lcd.setCursor (0, 1);

lcd.print ("SIO and Dept of");

ptr = 15;

else if (i == 15) (

lcd.clear ();

lcd.setCursor (0, 0);

lcd.print ("Physics and");

lcd.setCursor (0, 1);

lcd.print ("Astronomy.");

ptr = 16;

void scrollUp (int i) (

if (i == 2) (

menu ();

if (i> 2) (

scrollDown (i-2);

Step 9: General schematic and code

95% of our circuit is assembled on a circuit board, and sensors and other electronic components are connected via pin connectors, which is very convenient. The full code is attached as a file or posted


The final step brain project is the "cultivation" of the craft, that is, giving it a complete look.

We just carefully collect the wires into bundles and hide them in the box at the front of the stand. We hide the wires going to the back with a half of PVC pipe, which we then attach to the base. We also hide the battery - we place it in a box, mount a plastic stand for a book or phone on the steering wheel, and attach an LCD display to it. The toggle switch from Step 2, which protects against phantom loads, is insulated and secured to the handlebar.

And as a final chord, we paint homemade in any chosen color (without painting, of course, electronics and moving elements).

Ideas for improvement crafts:
Radiator for charge controller
Protection from environmental influences (to use homemade products and outdoors)
Installing a Hall sensor for reading wheel speed
More functional book stand, cup holder
Expanded and more convenient menu
More advanced code

So, brain-the bike generator is ready, I hope it was useful!

An electrical energy generator is a device that converts chemical, mechanical or thermal energy into electrical current. The generator used on bicycles to power the rear lights and headlights is a dynamo.

Varieties

Consider the existing types of factory-made bicycle dynamos.

Bottle

This type of bicycle generator is the most affordable and simplest. However, its power is not the greatest of all types. The drive roller of the generator rotates by touching the tire tread of the wheel while driving.

Bushing dynamo

The hub dynamo is, by design, an axial dynamo. Executions of such models can be of various types. The cost of a bushing generator is quite high. The installation is more complicated than the bottle version.

When purchasing, check the number of spokes and the method of fixing the adjusting wheel. The advantages of the bushing generator include its protection from moisture, in contrast to the bottle generator, the drive roller of which slides on the bicycle tire in wet weather. The device is enclosed within the hub of the wheel, and the work comes from its rotation.

The disadvantages of such a device include the fact that it will not be possible to turn off the operation of the bushing generator.

Chain

The chain version of a bicycle generator is quite rare. However, there are several different versions of this kind. The device can be equipped with a USB port for charging mobile gadgets.

The disadvantage of this design is a short service life, since during operation the metal bicycle chain is exposed to the plastic elements of the generator.

Contactless

This is an original non-contact dynamo. The bicycle wheel acts as a rotor. A special hoop is fixed on the wheel, on which 28 magnets are fixed. They are located alternately with different poles.

The stator is an induction coil in which an electric current is generated. This system includes a rechargeable battery for energy storage. According to the manufacturer's assurances, to ensure a normal luminous flux, it is enough to move at a speed of 15 km per hour.

The advantages of this design are:
  • Lack of rubbing elements.
  • Quiet operation.
  • Unlimited service life (except for rechargeable batteries).

The disadvantage of the contactless model is the small capacity of the batteries. It only lasts for a few minutes. However, many craftsmen easily correct this deficiency in various ways, including replacing the battery with a more powerful one.

Other designs

Currently, various interesting devices that are made in China are very popular. Sometimes you see devices that have not been produced anywhere before. Even their principle of operation is not always clear, but they work.

Such a Chinese device can be safely called the bicycle generator of the future. The dynamo machine from the Middle Kingdom looks like a science fiction movie. Judging by its appearance, it does not need to be in contact with the tire of the wheel or the chain for its functioning. There are also no magnets.

The principle of its operation is not entirely clear. Perhaps this is a technological secret of the manufacturer's plant.

Design features and work

The most popular model of dynamo on bicycles is its bottle design, followed by a hub dynamo. The rest of the types are used much less frequently. Therefore, we will consider the most common models.

Dynamo bottle

The bottle dynamo runs on the side of the front tire of the bike. It is made in the form of a small generator of electrical energy, and serves to operate the rear light and headlight of a bicycle, as well as to charge electronic mobile devices.

Such a mini-generator can be mounted both on the front wheel and on the rear. In the first case, the device can be combined with a built-in flashlight. To turn off the generator, a special folding mechanism is provided that fixes the generator body in the position when there is no contact with the tire of the bicycle wheel.

The name of this device comes from the external resemblance of the shape to the bottle. The bottle bike generator has another name - the side dynamo. A rubber or metal drive roller is driven in rotation on the side of the tire of the wheel. When the bicycle is moving, the tire rotates the roller of the bicycle generator, which generates an electric current.

Advantages
  • The disconnected generator drive does not resist the movement of the bike. When the generator is on, the cyclist has to apply more force to move. The hub dynamo, unlike the bottle bicycle generator, always resists the rotation of the wheel, although the value of this resistance is insignificant. If the bottle bike generator is on, but the lights and headlight are not connected to power, then the resistance to the movement of the bike is less.
  • Easy and simple installation. Such a device is easy to install on any bicycle, unlike a hub generator, which requires the assembly of the entire spoked dynamo wheel.
  • Low cost. These models usually cost less than other types of bicycle generators, although there are exceptions to this rule.
Flaws
  • Complicated setup. Careful adjustment and adjustment of the contact with the wheel tire at a certain angle, tire pressure, height is required. If the bike falls over or the fixing screws are loosened, the generator could be damaged. An improperly adjusted generator device will make a lot of noise, create excessive resistance, and slip on the wheel. If the mounting screws are too loose, the mechanism can move and get caught in the spokes of the wheel, which will break the spokes and damage the wheel of the bicycle. Some bike generators are equipped with special loops to prevent them from falling into the spokes.
  • Physical effort is required to switch. To power the generator, it is necessary to move its housing until it touches the wheel. Bushing generators can be switched on automatically or electronically. You don't need to make an effort to do this.
  • Increased noise. During operation, a buzzing noise is heard while the hub dynamo is silent.
  • Wheel tire wear. The generator requires contact with the tire to operate, resulting in friction and tire wear. Compared to a hub dynamo, there is no friction with the tire.
  • Resistance to movement. The bottle dynamo offers significantly more resistance to the movement of the bike than the hub model. However, with the correct setting, the resistance is insignificant, and when it is turned off, it is absent.
  • Slippage. In wet rainy weather, the drive roller of the bottle generator will slide on the tire of the wheel, which reduces the generation of electrical current and dims the headlight and taillight. Bushing generators do not require good grip on the tire to operate, and are not affected by weather or other adverse conditions.
Dynamo hub

The bushing design of the bicycle generator was developed in England, and is produced by various companies in many countries. The power of this design can reach 3 watts at a voltage of 6 volts. The technologies for their manufacture are constantly being improved, the dimensions of the structure are becoming smaller and more powerful. Modern bicycle headlights have begun to emit more efficient light as and are used.

Dynamo hubs do not generate noise during operation, but their weight is greater than that of other models. There are no rubbing parts in the sleeve version of the device. They function due to a magnet that has many poles and is made in the form of a ring. It is located in the hub body and rotates around a stationary armature with a spool fixed on the axle. The resistance to rotation of this design is very low.

The hub dynamo generates alternating current. At low speeds, more electricity is generated compared to the bottle model due to the low frequency of the current. There are rectifier circuits for a dynamo machine. They are made according to a simple bridge circuit of four diodes.

The bushing dynamo generates a low voltage, therefore, when using silicon diodes, the losses are significant - 1.4 volts. With germanium diodes, losses are reduced, and are only 0.4 volts.

How the dynamo works

A dynamo generates an electric current using the effect of electromagnetic induction. The rotor rotates in a magnetic field, as a result of which an electric current is generated in the winding. The ends of the rotor winding are connected to a collector made in the form of rings. Through them, with the help of pressing brushes, electric current enters the network.

The winding current is at its maximum if the rotor is perpendicular to the magnetic lines. The greater the angle of rotation of the winding, the lower the current. Rotation of the winding in a magnetic field changes the direction of the current in one revolution two times. Therefore, the current is called alternating.

A similar DC generator is manufactured on the same principle. The difference is in some details. The ends of the winding are connected not with rings, but with half rings, which are isolated from each other. When the winding rotates, the brush contacts alternately with each half-ring. Therefore, the current supplied to the brushes will have only one direction and will be constant.

There is a special device that can generate power supply. Such a device is a bicycle generator. The received electricity is absolutely free. The development process takes place by scrolling the pedals. According to the types of generators of bicycle origin, there are 4 types:

  • Bottle.
  • Sleeve.
  • Contactless.
  • Carriage.

The frequency of pedaling is closely and almost inextricably linked with the issuance of current strength, as well as voltage. This reproduction is inherent in all types of generators. Only alternating current is supplied by the bicycle generator. To have a constant current, it is necessary to install a rectifier bridge. It consists of specialized lamps of diode origin. Alternatively, you can install a rectifier of two half-cycles. You can buy a generator for a bicycle in special stores, as well as at car markets.

Bicycle bottle generator

This type of generator is called a bus generator. By type, it is a secondary value generator. The bottle generator bicycle consists of a case, which is completely insulated. Outside, it has a special roller that is designed to rotate. It is firmly attached to the body, that is, to the plug. Also, the filling of this generator consists of a conventional copper winding and a magnet. The movement of the field of magnetic origin occurs due to the contact of the roller with the tire of the bicycle wheel. Based on this, there is a transfer of energy from the wheel to the mechanics.

The faster the wheel spins, the faster the roller on the generator spins. The maximum polarity is achieved in the generator itself, the voltage is reproduced.

The positive side of this type of generator is:

  • Low price compared to other types.
  • Easy to fit on your bike.
  • The device can be easily turned off or on by pulling it away from the bike.

As for the shortcomings, they are not so weighty:

  • The tire begins to wear out over time.
  • It takes time to set the incline level.
  • Tire friction sound, especially at high speeds.
  • Slight wheel skew due to the weight of the generator, which ranges from 200-250 grams. This is due to its fasteners on one side.
  • If the weather is rainy, then the generator will not run at full capacity. Wheel friction is defective due to slipping.

But given these disadvantages and advantages, in general, this type of generator is quite effective.

Non-contact generator for bicycle

Electricity is produced by the operability of the bottle generator. The carriage also delivers current. In another way, this type of bicycle generator is called a hub dynamo. The name comes from the fact that no contact between the generator and the wheel is observed. The current appears as a result of close contact between the rim and the generator. Because of what the magnetized field of the wheel rim is formed.

The lighting diode is directly installed in the apparatus. The voltage goes directly, without any additional stabilization devices. The positive aspects of this device are:

  • Lack of friction factors against the wheel.
  • Compactness and low weight, up to 70 grams.
  • No connection cables.

The headlight, which is located at the front, is mounted on the fork. The taillight is at the back. Based on this, these flashlights are independent in themselves. They burn not due to accumulators, but due to the spinning of the wheel in the field of magnetism. The quality of lighting is at a sufficient level. In slow motion on a bicycle, the lights should in theory go out, but this is not the case. This is not due to the fact that a special capacitor is installed. In essence, it can be called a battery that gains energy while cycling.

Conclusion

Using a bicycle generator is beneficial. First, electricity generation is absolutely free. Secondly, convenient and comfortable lighting of the road at night. The 12 volt DC bike generator is convenient to use and easy to install. Also, it can be assembled almost quickly. It does not take up much space during transportation. The bicycle generator does not do any harm.

Share this