What’s actually slowing this PC down?
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Pick the symptom - the matching free tool is one click away.
ThatPainter is reader-supported. When you buy through links on our site, we may earn an affiliate commission. Learn More
Arduino Project 9 uses a pushbutton to switch a motor on and off: the button connects to digital pin 2, while pin 9 controls an IRF520 MOSFET that switches a separate 9V motor circuit. Build the circuit with the diode in place, connect the Arduino and battery grounds, then mount a paper pattern on a CD and hub to make the pinwheel.
Parts and tools for the motorized pinwheel
The Arduino Projects Book lists these electrical parts for Project 9:
#1 Best Overall
- High-Performance Motor: The TT DC gearbox motor features a 1:48 gear ratio, perfect for Arduino smart car and robotics projects, delivering reliable power output for various applications.
- Wide Voltage Range: Rated for 3-6V operation, this motor ensures efficient performance across different voltage levels, making it versatile for multiple projects.
- Superior Speed and Torque: Operating speeds range from 90 RPM (at 3V) to 200 RPM (at 6V), with a torque range of 0.15Nm to 0.60Nm, meeting diverse power requirements for your builds.
- Easy Connection Design: Each motor comes with two 200mm long 28AWG wires featuring breadboard-friendly 2.54mm connectors, allowing for quick and hassle-free connections to breadboards or terminal blocks.
- What You Will Get: 4 X TT motors with welded cable, 4 X wheels, ideal for DIY projects and educational purposes, empowering you to bring your creative ideas to life effortlessly.
- Arduino board, breadboard and jumper wires
- 10-kilohm resistor and momentary pushbutton
- Motor and 9V battery, with a battery snap
- IRF520 MOSFET and 1N4007 diode
- CD, hub and die-cut paper pattern for the spinner
The official project instructions show the parts and circuit in the Arduino Projects Book. The maintained Arduino example also identifies the switch on pin 2 and motor control on pin 9: Project 9 example.
How to wire Project 9
The pushbutton is an input to the Arduino; the motor draws power from the separate 9V battery circuit. The MOSFET acts as the switch between that power source and the motor. Connect the Arduino ground to the battery circuit ground so the control signal has a shared reference.
Rank #2
- TT Motor: Rated Voltage: 3-6V;Gear Ratio: 1:48;Wires Length: 200mm 28 AWG;Stall Torque (6V): 0.8kg.cm
- Easy to Install: TT DC Gearbox Motor Comes With 2x 200mm Wires (Connector:Male 2.54mm), Easy to Plug into a Breadboard or Terminal Blocks
- High Quality: Motor Set made of Premium Environment Friendly Materials, Durable and Longer Wheel and Motors Service Life
- Application: This TT DC Gearbox Motor Set Can Use for DIY Smart Robot, Car Projects,Distance Measurement, Velocity, Educational Learning, Smart Robot Car Competition and Entertainment etc.
- Package Contents: You will get 4pcs TT DC Gearbox Motor and 4pcs Wheels ,Perfect for DIY Car Projects and Smart Robot
- Place the pushbutton on the breadboard and connect its output to Arduino digital pin 2.
- Connect a 10-kilohm pull-down resistor between the switch input and ground. This holds pin 2 LOW when the button is released.
- Connect Arduino pin 9 to the IRF520 gate. Check the pinout for the specific MOSFET you have; do not assume its legs match a different transistor’s layout.
- Wire the motor into the 9V battery circuit through the MOSFET, following the Project 9 circuit diagram.
- Connect the Arduino ground and the battery circuit ground together.
- Wire the 1N4007 diode in parallel with the motor: its anode goes toward motor ground and its cathode toward motor power.
Use the manual’s circuit diagram to verify the transistor connections and battery path before applying power; a reversed or misidentified MOSFET connection can prevent the motor from working.
What the sketch does
The Project 9 sketch sets pin 2 as an input and pin 9 as an output. In each loop, it reads the button: a HIGH reading writes HIGH to pin 9, activating the transistor and completing the motor circuit; a LOW reading writes LOW, so the motor is not driven. The maintained example uses switchPin = 2 and motorPin = 9.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- Type 130 Mini DC Motors for 1.5V to 6V, 3V is recommended
- Come with 6 inch (15cm) black and red wire leads for easy connection
- Motor size: 15 x 20 mm, Shaft diameter: 2.0 mm, Shaft length : 9 mm
- Reference current: 0.35-0.4A, Speed : 16000 RPM (at 3V)
- Perfect for robotics projects, solar/battery-powered cars, brush-bots, fans/windmills, and more.
Why the diode is essential
A motor keeps turning briefly after power is removed. As it slows, it can generate voltage in the opposite direction—called back-voltage in the project manual—which may damage the transistor. The diode across the motor gives that voltage a safe path. Install it with the specified orientation before testing, rather than treating it as an optional extra.
Assemble and run the pinwheel
- Attach the die-cut paper pattern to a CD.
- Snap the CD onto the hub and secure it with a drop of glue.
- Power the Arduino over USB and connect the 9V battery snap to the motor circuit.
- Press the breadboard button to spin the motor and observe the pattern.
Secure the CD and hub before switching on. The manual warns that a loose rotating spinner can fly off and cause injury; keep faces and eyes clear of its path. You can try different paper patterns to change the visual effect.
Rank #4
- Product Description: Our product includes all the accessories on the main picture (about 465pcs), you can refer to our colorful instructions to assemble, at least 16 projects can be assembled, you can also free to create, and share good ideas to other children!
- Benefits of DIY Handicrafts: Keep your children away from electronic products, Improve hands-on ability; Cultivate patience and perseverance; Improve creativity and imagination; Enhance self-confidence; Improve the ability of your children to learn and develop their own skills. They will be very happy when they see the project they assembled move successfully.
- DIY STEM SCIENCE EXPERIMENTATION KIT: This is a very popular electronic science experiment kit that can be a great way to inspire and motivate kids to learn science. We offer a very wide range of accessories for kids to turn new ideas and inventions into reality, and it is also perfect for children's school science, STEM engineering programs.
- PERFECT GIFT: This electric motor kit is suitable for curious kids, which can develop their imagination and creativity as well as exercise their hands-on skills. Cultivate your child's practical ability, so that knowledge is no longer theoretical knowledge
- Pay attention:Suggest to read the instruction manual in detail for assembly,Please control the usage time, use time should not exceed 5 minutes each time, to avoid short circuits. When your project is completed or unattended, it is recommended that you turn off the switch, remove the battery, and store it properly.Tools for super glue or hot melt adhesive for bonding are not included in the kits. Be careful of scald caused by short circuits. The kids must use it under the supervision of adults
Troubleshoot a motor that keeps spinning or will not start
If the motor runs continuously
- Check that the button’s output wire actually reaches pin 2.
- Confirm that the 10-kilohm resistor pulls the input to ground when the button is released. Without a reliable LOW state, the input may not behave as intended.
- Verify the IRF520 pinout and connections against the circuit diagram.
- Make sure the battery circuit ground and Arduino ground are connected.
If the motor does not spin
- Check the 9V battery path and battery snap connections.
- Confirm that pin 9 reaches the MOSFET gate.
- Inspect the motor wiring for continuity and confirm the motor is connected into the intended power path.
- Check that the diode is in parallel with the motor and oriented with its anode toward motor ground and cathode toward motor power.
These checks follow the documented Project 9 circuit; they are wiring diagnostics, not results from a separate hands-on test.
Quick Recap
Best Value
- 30+ Guided Electronics Projects: Start with LEDs and build toward LCD1602 displays, RFID access, motion detection, distance sensing, motor control and environmental monitoring for STEM learning, coding clubs, classrooms and hobby projects
- 200+ Components Across 63 Types: Includes an ELEGOO UNO R3 controller, LCD1602, RC522 RFID, RTC, HC-SR501 PIR sensor, ultrasonic sensor, DHT11, GY-521, MAX7219, keypad, joystick, relay, SG90 servo, stepper motor, breadboard and more
- Begin Without Soldering: Pre-soldered modules, a solderless breadboard, organized storage case and small-parts box reduce setup time and help beginners move from lesson to lesson while keeping LEDs, ICs, wires and sensors easy to find
- Learn, Modify and Create: Program the ELEGOO UNO R3 board with Arduino IDE using the included PDF tutorial and example code, then adjust sensor thresholds, timing, display text and motor behavior to turn guided lessons into original projects
- Flexible Power and Project Setup: Includes a 9 V, 1 A power supply, breadboard power module, 9 V battery and USB cable to support controller, breadboard and module experiments without sourcing basic setup accessories separately
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




