Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Science project idea

PWM speed controller for a 12 V DC motor with an IR tachometer

Fans, conveyors and e-rickshaws vary motor speed by switching power on and off very fast rather than wasting it in a resistor. The project builds a PWM controller, measures real rpm with an infrared sensor and plots speed against duty cycle.

What it shows

Fans, conveyors and e-rickshaws vary motor speed by switching power on and off very fast rather than wasting it in a resistor. The project builds a PWM controller, measures real rpm with an infrared sensor and plots speed against duty cycle.

The science

Pulse width modulation switches the motor fully on for a fraction of each cycle, called the duty cycle. The motor inductance averages the pulses, so average voltage, and therefore speed, is roughly proportional to the duty cycle. The flyback diode gives the inductive current a path when the MOSFET turns off, protecting it from voltage spikes. The IR sensor sees the stripe each turn, and counting pulses per second gives rpm.

Materials

Cost: under Rs 1,500. Many items come from home or from waste; spare parts such as LEDs, motors and wire are in the store.

  • An Arduino Uno or Nano
  • A 12 V DC geared motor (about 100 to 300 rpm)
  • A logic-level MOSFET IRLZ44N and a 1N4007 flyback diode
  • A 10 kΩ potentiometer and a 10 kΩ gate pull-down resistor
  • An IR obstacle sensor module and a slotted disc or a disc with a black and white stripe
  • A 12 V adapter or battery
  • A breadboard and wires

Safety

For this project: Use a battery or sealed 12 V adapter. Keep fingers and hair away from the rotating disc. The MOSFET can get warm. An adult must check the wiring.

Never use mains electricity: power models with cells, batteries or a low-voltage adapter. Sharp and hot tools, flames and lab chemicals need an adult or your teacher beside you. Keep magnets, button cells and small parts away from young children, and wash your hands after making.

All the safety rules

Step by step

11 steps. Do them in order, and test each part before you go on to the next. Write what you notice in a notebook as you go.

  1. Connect the MOSFET: gate to pin 9 with a 10 kΩ resistor to ground, source to ground, and drain to the motor negative. Motor positive goes to the 12 V supply.

  2. Place the 1N4007 across the motor with the stripe (cathode) towards the supply positive.

  3. Join the Arduino ground to the supply ground, and connect the potentiometer centre to A0.

  4. Write a sketch that reads A0 (0 to 1023), maps it to 0 to 255 and writes it with analogWrite on pin 9.

  5. Test that the motor speed follows the knob smoothly, and note the minimum duty at which the motor starts.

  6. Fix the disc with one stripe on the shaft and place the IR sensor so that it senses the stripe. Connect its output to pin 2.

  7. Add an interrupt that counts pulses and every second prints the rpm = pulses x 60.

  8. Record rpm at duty cycles from 20 to 100 percent in steps of 10, three readings each.

  9. Plot rpm against duty cycle and note the dead zone near the start caused by friction.

  10. Add a load by pressing a finger-friendly brake pad lightly on the disc and watch how rpm drops at constant duty.

  11. Write the report with the circuit, table, graph and a comment on open-loop control.

What you should see

Speed rises almost linearly with duty cycle after a dead zone at about 15 to 25 percent. The serial monitor shows rpm in real time and the motor slows under load, showing why feedback control is needed.

Viva questions

A teacher or a judge will ask how it works. Try to answer each question before you open it, then compare.

1Why not control speed with a series resistor?

The resistor wastes power as heat, whereas PWM loses very little because the switch is fully on or off.

2What does the flyback diode do?

It carries the motor current when the MOSFET turns off and protects the MOSFET from a voltage spike.

3Why is a logic-level MOSFET used?

It turns fully on at 5 V gate voltage, which the Arduino can supply.

4What is the PWM frequency of pin 9?

About 490 Hz on an Uno, although pins 5 and 6 are near 980 Hz.

Free ebook: Viva Questions for Science Projects

Take it further

Add a PID loop that adjusts the duty cycle to hold the rpm at a set value as the load changes.

Change one thing, measure what happens, and add a table or chart of your readings: that is what turns a model into your own investigation.

Free ebooks for this project

WhatsApp us