Step 6Prototype the circuit (Optional)
Pin 14 (PB0): Red 1
Pin 15 (PB1): Green 1
Pin 16 (PB2): Blue 1
Pin 17 (PB3): Red 2
Pin 18 (PB4): Green 2
Pin 19 (PB5): Blue 2
Pin 23 (PC0): Red 3
Pin 24 (PC1): Green 3
Pin 25 (PC2): Blue 3
Pin 26 (PC3): Red 4
Pin 27 (PC4): Green 4
Pin 28 (PC5): Blue 4
Hook each connection through a 300 ohm resistor, and connect the 4 LED ground pins to ground.
Connect the fan motor by putting a 1K Ohm resistor from Pin 5 (OC2B) to the base of the NPN transistor. Connect the middle pin of the transistor to a 10K Ohm resistor which then connects to the base of the PNP transistor. Connect the remaining pin of the NPN to ground, the middle of the PNP to the fan motor, and the remaining pin of the PNP to your 12V (or whatever you're using for a power supply, I breadboarded mine with a 9V because I had one lying around, still good enough for a test). Connect the fan's ground to the breadboard ground, connect the yellow wire to a 10KOhm resistor and also to a 1KOhm resistor. The 10KOhm goes to +5V while the 1KOhm goes to AVR pin 11 (T1). Also put a 1uF between pin 11 and ground to smooth out the signal.
Hook up your programmer to the AVR and download the code onto it (the code is at the end of this Instructable). See Step 11, you have to set the fuse bits on the AVR to disable the internal clock divider. The clock/8 bit is turned on by default and needs to be disabled before the code will work. After installing the AVR code onto the updated AVR, open up the client app and try turning on the fan. It should light up and spin perfectly. At this step you can either just shove your breadboard in your PC and call it done, or you can do it right and make a PCB.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|




















































