DIY contactless generator for a bicycle. High Power Bicycle Pedal Generator for Battery Charging

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 coupled with an engine that will convert your calories into electricity... And 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, the Arduino microcontroller is used, which turns on / off the charge controller and the inverter, and also 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 front wheel and I 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. Just need to take off additional load on a 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. 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 specifications and the operating conditions of the selected battery for the correct charge / discharge, which can be found in the data sheet. 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, therefore we install a charge controller between them, which will supply the battery with the 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 bought 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 there are positive and negative contacts from the battery, and on the other, 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 through this button goes along the track connected to it to the board. We change this 5-track cable to a bunch 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 organize 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 through a "button" or something like that, 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, since 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 the Arduino, which will turn on / off the inverter and thereby control the outputs for charging, 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 negative output the inverter was 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 voltage supplied, 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, 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 feedback during training, you can take the rpm of the rear wheel, 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, we mount a 1kOhm resistor in series with the LED, and then the current through the LED will flow about 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 applied magnetic field, 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 ratio 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 the race time, speed in km / h, generated power and 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 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 it into 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.
In terms of menus, 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 the menu more top level, and "Right" leads to a submenu.

Menu scheme:

Main menu
> The best time
>> Show value
> Total distance
>> Show value
> Generated power
>> Show value
> About
>> Any information about the bike.
// Full 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 put it in a box, we mount a plastic stand for a book or a phone on the steering wheel, and we 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, paint homemade in any chosen color (without painting over, 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!

Hello dear comrades-in-arms! I bring to your attention an environmentally friendly source of electricity.
By the nature of my work, I have repeatedly had to solve the problem of power supply for remote objects. However, the methods used are not acceptable to me for financial reasons. Experience remains.
When planning the backup of the electrical supply of my "object", I proceeded from the technical and financial possibilities available to me: when the electricity in one feeder runs out, I switch to another (ATS), the entire external network will be covered - there is a gasoline generator, the fuel will run out (well, or to save it) - solar panels. As a reserve - 6 pieces of different-colored batteries from cars ("passport" capacity from 44 to 115 A * h). Their capacity, of course, is not the same as in youth, but for small loads, they will do quite well (I also use it as a starting battery for reanimating frozen cars).
The minimum total power of consumers in winter is 100 W (boiler automation, a circulation pump and 2-3 LED lamps). In the event of an acute shortage of gasoline, I will not provide so much one solar blessing (short winter day + snow). Well, or it is necessary to increase the area of ​​solar panels (expensive pleasure).
The idea of ​​creating a simple backup source of electricity "from what is at hand" has been around for a long time. Investing a lot of money by my standards in something that may never be needed, I think it is not reasonable.
So there are: used car batteries in assortment, used 80A generator (from dozens of VAZs, changed from one time to a more powerful one), son's bike. And legs. And of course, hands.


The son made a stand for the rear wheel out of pieces of plywood. Rear wheel axle nuts have been replaced with pegs (leg supports, used when doing cycling tricks). With the help of pieces of a metal profile and an M8 hairpin, the generator was fixed to the rear wheel. We connected the battery and started charging it.


Aha! Shchaz! The strength is not enough. He began to understand and count. The relay-regulator keeps (tries) 14.5 V, the battery charging current is 4-5A. Total more than 70 watts. Taking into account the losses of the pedal-chain-tire-pulley, probably the same amount is needed. Vicki says that this is unrealistic - I’m never an athlete.
It is necessary to somehow reduce the power. The charging current depends on the design (size) of the battery, you can't change anything here - we use what we have. The tension remains. I remember that there were 6 volts in motor vehicles. You can remove 6 volts from a 12-volt generator using a suitable voltage relay instead of a standard automobile one. And charge a 12-volt battery in two passes, "dividing" it in half. This will halve the effort on the pedals by doubling the pedal rotation time.
In the battery I used, the jumper between the third and fourth banks is located just under the cork (if you remember earlier, the jumpers were outside, now I have met these only on freight ones). There was a 100-mm self-tapping screw, soiled in silicone (I was cleaning the nose of the pistol), Silicone - protection of the iron self-tapping screw from acid, or rather the opposite - electrolyte from extraneous piece of iron. Slowly, carefully, with effort, I twisted it into a jumper (here the main thing is not to overdo it and not scroll through it - you can close the plates in this bank) and got a third contact. It must be remembered that it is positive, if it works in tandem with the standard “minus” and negative, if in the native “plus”.


I remade the standard relay-regulator into a simple brush assembly (I bit off the relay legs, soldered the wires), installed PP1 from IZHak and the process started! The motorcycle relay kept the voltage no higher than 7.5 V (average about 7 V), the average charge current was about 4 A. The effort on the pedals was normal, for my untrained body. In general, everything works.
However, as we were taught in the ML philosophy class: practice is the criterion of truth! It is necessary to evaluate the practical value of this energy source. The assessment method was proposed as follows: the control battery is connected to the emergency lighting until the latter goes out. After that, the battery is charged by the pedal method for one hour and reconnected to the lighting. The ratio of charging time to lighting operating time can be a parameter for evaluating system performance.


Emergency lighting system - LED strips (left over from apartment renovation) with a total length of 5.7 m, glued to the guide of the crane beam. Operating voltage from 12.5 V to 8 V (average 10 V), current 0.8 A. Average power consumption 8 W. If we assume that from the generated power of 28 W (7 V * 4 A) it will be possible to “store” 20 W the expected operating time of the emergency lighting system is approx. 2.5 hours.
A pre-discharged battery (up to 7.5 V under load with an LED strip) took 40 minutes to charge. The pedals were twisted in turn with my son for 5 minutes - it turned out to be not an easy thing. 20 minutes one half of the battery and 20 minutes the other.


Then they connected emergency lighting to it and began to wait. Then a bitter disappointment awaited me - my calculations were not correct. After two and a half hours, we went home, leaving the LEDs on. In the morning, after 12 hours, I drove in to check - they are glowing, infections. After another 8 hours, they almost did not glow - the voltage under load dropped to 7.5 V.
In general, after 40 minutes of recharging with the bike generator, the operating time was about 20 hours. Somewhere I was mistaken  But the main thing is that the result has been achieved. Having such a device, you can provide yourself with electricity, sufficient for modest lighting and the operation of not very powerful devices. Exercise bike hour - day with light
Practical advice for those wishing to repeat the experience:
A bike with a gear change is highly desirable - you will start at one speed, you will end at another.
Swap the tires on the wheels. The rear tire has a developed tread on which the generator pulley jumps, constantly bounces and loses drive.
Do not use a solid-state relay regulator - the field winding of a car generator is rated for more power than the output stage of a motorcycle relay. In this way, I burned the relyuha from Java.

It is necessary to control the charging process using a voltmeter (for example, at least 6.5-7 V), an ammeter (± current) or a control lamp (some relays allow you to install it).
If you stopped to rest - remove the terminal from the battery, the discharge through the relay with the generator will quickly gobble up your labors.

In the network, there are mainly contact versions of bicycle generators based on the use of rubbing parts. The electricity generated by these devices is sufficient to charge the battery that powers the front and rear lights of the bicycle.

The disadvantages of such factory and homemade bicycle generators are the resistance they create when driving and the noise they create. Therefore, the idea of ​​a contactless bicycle generator seems useful and promising. An interesting idea of ​​such a bike attachment is presented in the video, which you can watch in the article below.

The author of the idea installed a coil on the rear wheel, past which a permanent magnet flies by while driving. When the wheel rotates, the magnet moves past the coil, as a result, a pulsed electric current of a fairly high voltage is generated, but with a very small amount of current that can be used to power an LED light. If you need a ready-made store-bought bike generator or neodymium magnet, buy from this Chinese store. Bicycle generators are also in it.

The coil is used from a small 220 volt aquarium compressor. Neodymium magnet - washer 4 mm thick and 1.5 cm in diameter.
Two 12 volt LED strips are connected in series to prevent the lamps from burning out, since the voltage generated in the pulse can be up to 40 volts, while the current is very small. If a capacitor of more than 1000 mF is included in the circuit, then the LEDs can be on constantly, but their number must be reduced several times in this case.

Magnic light

Let's pay tribute to the ingenuity of the author of an interesting innovation for a bicycle, but we must note that the idea of ​​a contactless bicycle generator is not new. Moreover, there is an original industrial development of such a device. Magnic Light is the first non-contact power source for bicycle lights with no additional components in the wheels. Energy is taken from the rotating wheels of the bicycle without any physical contact and thus frictionless.

Electricity is converted into light by using eddy currents created by strong magnets (International Patent Pending PCT / EP / 2012/001431). With this new technical solution, electricity can be supplied to the light sources completely without batteries and without external cables, and at the same time with high efficiency.

The mechanism of action on the official website is described as follows: "as the wheel moves, magnets rotate inside a tiny 60-gram generator and an integrated capacitor that keeps the light even when the cyclist stops."

A video dated 2014 shows some of the properties of the generator Magnic Light.

The idea of ​​the invention of an electric power generator, or dynamo machine, as it was first called, belongs to the Hungarian physicist and electrical engineer Anjos Istvan Jedlik, who since 1827 was successfully developing the concept of a dynamo machine, but did not patent it, because he thought that his idea was not new. The patent for the electric generator belongs to Werner Siemens.

More powerful homemade generator.

Can you 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 a small house with electricity for a whole day. The scientist hopes that Free Electric (as he called his invention) will help solve problems with power supply 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 memorize 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?

  • A bike. 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. Further, 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 final assembly and painting.

I made this bike friction bike generator to power the flashlight and rear lights. I found the idea and a lot of information for this pedal generator project on the Internet.



I recently bought a bike for commuting and city commuting and decided I needed a backlight for safety. My front light was powered by two AA batteries and the rear light was powered by 2 AAA batteries, the instructions said the front light would work for 4 hours and the rear light for 20 hours in blinking mode.

Although these are not bad indicators, they still require some attention so that the batteries do not run out at the wrong time. I bought this bike for its simplicity, single speed means I can just sit and ride, but constantly changing the batteries becomes expensive and makes it difficult to use. By adding a bike dynamo, I can power the batteries while I'm riding.

Step 1: collecting parts





If you want to assemble a dynamo car with your own hands, then you will need a few things. Here is a list of them:

Electronics:

  1. 1x stepper motor - I got mine from an old printer
  2. 8 diodes - I used a personal power plant I used 1N4001
  3. 1x Voltage regulator - LM317T
  4. 1x Development board with PCB
  5. 2x resistors - 150 Ohm and 220 Ohm
  6. 1x heatsink
  7. 1x Battery connector
  8. Solid wire
  9. Insulating tape

Mechanical parts:

  • 1x bike reflector holder - I took it off the bike when I plugged in the light.
  • Aluminum corner blank, you will need a piece about 15cm long
  • Small nuts and bolts - I used printer screws and some other used parts
  • Small Rubber Wheel - Attaches to the stepper motor and rubs against the wheel as it spins.

Tools:

  • Dremel - it is not entirely necessary, but it makes your life much easier
  • Drills and bits
  • File
  • Screwdrivers, wrenches
  • A breadboard for testing the circuit before putting everything on the bike.
  • Multimeter

Step 2: create the circuit







Show 10 more images











Let's make a diagram of a dynamo for a bicycle. It's a good idea to test everything before soldering everything together, so I first assembled the entire circuit on a breadboard without solder. I started with the motor and diode connector. I unsoldered the connector from the printed circuit board of the printer. Placing the diodes in this orientation changes the AC supplied from the motor to DC (rectifies it).

A stepper motor has two coils and you need to make sure each coil is connected to the same set of diode groups. To find out which wires from the motor are connected to the same coil, you just need to check the contact between the wires. Two wires are connected to the first coil, and two to the second coil.

Once the circuit is assembled on a solderless breadboard, test it. My motor used to generate up to 30 volts during normal cycling. This is a 24 volt stepper motor, so its efficiency seems reasonable to me.

With the voltage regulator installed, the output voltage was 3.10 volts. The resistors control the output voltage, and I chose the 150 and 220 ohm options for 3.08 volts. Check out this LM317 voltage calculator to see how I calculated my numbers.

Now everything needs to be soldered on the PCB. To make the neat connections, I used a small calibration solder. It heats up faster and provides a better connection.

In the .pdf file you will find how everything is connected on the PCB. The curved lines are the wires, and the short black straight lines are where you need to solder the jumpers. Files

Files

Step 3: Installing the motor






The engine mount was made from an aluminum corner and reflector bracket. Holes were drilled in the aluminum to mount the motor. Then one side of the corner was cut to make room for the wheel.

The wheel was attached by wrapping tape around the motor shaft until the connection was tight enough to slide the wheel directly onto the tape. This method works well, but needs to be improved in the future.

Once the motor and wheel were attached to the aluminum, I found a suitable place on the frame to mount everything. I attached the blank to the seat tube. My bike's frame is 61 cm, so the area the generator is mounted on is quite large compared to smaller bikes. Just find the best place on your bike to mount the generator.

Once I found a suitable spot, I made marks under the aluminum bracket with the reflector bracket installed so that it could be cut to size. Then I drilled holes in the bracket and aluminum and mounted the structure on the bike.

I finished assembling a 12 volt bicycle generator by securing the project box with two posts to an aluminum mount.

Step 4: hook up the wires





The dynamo for the bike is assembled, now all you need is to simply connect the wires to the bulbs. I pushed the ends of the wires behind the battery terminals to the headlight, then drilled a hole in the headlight housing to pass the wires inside. Then the wires were connected to the battery connector. Holes for the wires will also need to be made in the design box.

Share this