Lab 7 – DC Motors

J M
3 min readOct 21, 2021

--

Joanne Ma. Professor Ryokai. INFO C262, Fall 2021

Description

This week, we used DC motors as an actuating device, where DC motors convert direct current into rotational motion. We also learned to use a diode in the circuit to protect the transistor from spikes that are created by motors as they turn on and off. We used a potentiometer as the input device to control the DC motor’s speed of rotational motion. I had a lot of fun with this week’s lab as it was a throwback to the time I did robotics in high school.

Materials

  • Arduino
  • Breadboard
  • Wires
  • Resistors
  • DC motor
  • Battery holder + batteries
  • Transistor
  • Diode
  • Potentiometer

Building the Circuit

I built the circuit according to the schematic, which has been our most complex lab circuit to date, but still relatively straight forward in its construction.

I then loaded the Arduino sketch and turned on the battery pack, but the motor was not spinning. Using the serial monitor, I was able to tell that both the potentiometer and the DC motor was not reading in any values. I double checked my circuit and alas, I still managed to put the wire meant for 5V into the wrong pin. With Zeke’s help, we realized that the transistor was backwards, so we flipped that, and the potentiometer was finally reading in values. But! the DC motor still wasn’t working. We had to bust out the multimeter to check and see how much voltage was coming through the DC motor, and how much was coming through the battery pack. Should you also run into this issue, be sure to remove the battery pack from your circuit, turn on the battery pack, and match the red and black ends of the multimeter tips to the exposed red and black wires on the battery pack. The voltage all seemed correct, which drove us mad. At this point, we were both verbally shaking our fists at the Invention lab basement ceiling. We even double checked the diode and made sure it was inserted in the correct direction (it was) because polarity matters. However, it still wasn’t working, and later discovered that I was off by a pin for the potentiometer — what a trip. The motor started to HUM, and we were successful.

Values started to adjust to 1023, and it was finally time for spinny tiger. What is spinny tiger, you may ask?

After successfully attaching spinny tiger, I racked my brain for creative extensions or alternative ways to use the DC motor. One thing I would do if I had more time would be to laser cut wood, attach multiple potentiometers to spin the legs of a tiger for it to “run”, in a gotta go fast way.

--

--

J M
J M

Written by J M

Grad student @ UC Berkeley’s School of Information. Interests include social computing, usable security, Being Online™️ and reflective tech.

No responses yet