Week 10: Output Devices

Video of Servo Motor Controlled By PCB Board

Above is a video of a servo motor (4.8-6V, ~1.3kg torque) being controlled by my PCB board, which was boot-loaded with the capability to use Arduino IDE software for programming.

Connecting A Servo Motor To My PCB Board

The assignment for this week was to add an output device to a microcontroller board I designed, and program it to do something. 

So, this week I decided to connect a lower-voltage motor (H-King HK SCM 16, 6V, single chip digital motor). This motor works with voltage anywhere between 4.8V - 6V, so the 5V powered from my existing PCB board worked just fine. Below are a few additional specs for the motor:

HKSCM16-6 Single Chip Digital Servo (6V)
Spec.
Torque: 1.3kg @ 4.8v, 1.5kg @ 6v

Weight: 16g

Speed: 0.23 / 60deg @ 4.8v, 0.19 / 60 deg @ 6v

Voltage: 4.8v~6v
Plug: JR
Gear Material: Plastic
Type: Digital
Motor: Brushed
Spline: 20

I don't know yet whether the torque in the force but this motor applies is sufficient for my final project, but I suspect it might possibly be within the right range. In the case that it is not strong enough to power my final project, I will need to remake my PCB board with an external power source. For example, a 9 V or 12 V external power source or external battery which then connects to a footprint trace on my board that then connect on its own as a new trace line around the board to supply that power. If I want to, I could add additional regulators to the board so that the 9 V or 12 V power converts to 5 V or 3.3 V to supply power to the microcontroller and the button. 

The motor has three different lines, one for power (VCC), one for ground (GND), and one for digital pulse width modulation input (analog pulse width modulation input also would work). For the input, this means connecting one of the appropriate pins on the microcontroller via traces, and connectors, to the motor VCC wire. Below is a diagram of how I connected the motor to my PCB board.

Below is the Arduino IDE code I used to control the servo motor: 

Group Project

The group project for this week was to measure the power consumption of an output device. To do this, I used a multimeter on different settings (voltage setting, current setting) to measure the voltage and to measure the current supply to the motor, while the PCB board was plugged into the power source. Specifically, I connected one of the multimeter wires to GND of the motor and the other wire to VCC of the motor. Below are the values that I read from the multimeter as well as images of how I measured these values:


For measuring voltage: 

  1. Connect red lead of the multimeter to VOhmmA port and black to COM 
  2. Set multimeter to V--- setting (grey/white color) 
  3. Connect red lead tip to VCC (5V) and black lead tip to GND on the PCB board 

(I measured 5.16 V) 

For measuring current: 

  1. Connect red lead of the multimeter to 10AMax port and black lead to COM 
  2. Set multimeter to A--- setting (yellowish color) 
  3. You'll need to have the multimeter intercept the circuit so current flows through the multimeter. So, disconnect VCC 5V wire on the PCB board and connect the red lead tip of the multimeter to it. Connect GND to where you just pulled out the VCC 5V wire. 

(I measured 0.05 Amps) 

Power Calculation: 

For the Amp & Volts values I got, the power is P = I * V = 0.05 Amps * 5.16V =  = 0.258 Watts (which TA Anthony says is on the low side for this servo motor) 

However, on a different (higher quality) multimeter, the current fluctuates more in actuality as the motor receives pulses. The fluctuations went up to 0.5 Amps. 

Thus, the power is P = I * V = 0.5 Amps * 5.16V = 2.58 Watts (which TA Anthony said is more reasonable for this servo motor) 


Learnings / Advanced Applications: 

Learnings: 

  • ***If you suspect that your circuit will be using close to or more than 200mA, switch your probe to the 10A side, just to be safe. Overloading the current can result in a blown fuse rather than just an overload display (source).
  • In general, measure DC, not AC (you shouldn't have to measure AC in most all cases when measuring resistance) 
  • Current is measured in series (e.g. the multimeter is in the path of the voltage connected to the output device).
  • Note that it's very easy to blow up your multimeter when measuring current. All the voltage goes through the multimeter. So, use a higher quality multimeter that will beep at you if you do something wrong, and make sure to be careful about how much current / voltage is expected versus what you are measuring. For example, using a 5V power source is unlikely to do much damage, whereas higher (e.g.12V) power sources can cause serious damage if you use the multimeter incorrectly! 

Advanced Applications:

  • Alternatively, another method to measure power for a motor/output device is to put a 1/4 ohm resistor on the PCB board along the connection to 5V for the motor, and use an oscilloscope to measure what's actually going on.
  • Note that it is easier to measure power for a DC motor, that keeps spinning, as opposed to a servo motor which is not continuous.