Introduction: DIY AC to DC Power Inverter
In this instructable you will be learning to make a DIY power inverter using a microcontroller. So go along to the next step and we'll get started.
Step 1: Materials
For this instructable the materials you will need are: A 9v battery, a 9v battery holder, a arduino or a Atmega 328 microcontroller(the chip for the arduino) with the arduino uno bootloader pre loaded, some wire and a computer. sorry no picture for this step my camera was not working.
Step 2: Build Your Circuit
In this step we will actually be building the circuit. So, First, we will connect the battery to the microcontroller. first, take the positive lead of the battery and connect it to the vcc or vin pin on the atmega. Then, take the negative lead and connect it to the ground or neutral pin on the atmega. You now have power to the chip. Next, connect your output. To do this take one wire and connect it to the D6 pin on the atmega. Next, take a wire from the ground pin to serve as a ground for your output. You can also connect these wires to a screw terminal but that is optional. A schematic for this step is included above.
Step 3: Program the Atmega
in this step we will code our chip to mimic the alternating current of AC current to the output pin.
step 1: plug your chip into your computer with the arduino or a programming board.
step 2: open the arduino software on your computer. software here-- direct download
step 3: copy this code into the software:
const int output = 6; //declares pin 6 as "output"
pinMode(output, OUTPUT); //tells the microcontroller that "output" is and output. }
delay(16.66666666666667); //waits 16.66666666666667 milliseconds
digitalWrite(output, HIGH); // turns on "output" delay(16.666666666666670; // waits another 16.66666666666667 milliseconds
digitalWrite(output, LOW); // turns off "output
} //loop repeates until stopped
step 4: upload the code to the chip.
Step 4: DONE!
you have just created a DC to AC inverter! congrats. now you can use this circuit on everything from EL wire to motors.
We have a be nice policy.
Please be positive and constructive.