Arduino-based servo panel meter

Karl W4KRL W4KRL at arrl.net
Mon Mar 3 11:03:22 CST 2014


You may have seen my article in the latest AMRAD newsletter about using a
servo driven by an Arduino as a custom made panel meter. Since writing the
article I purchased some even cheaper servos on eBay from an American
source: 

http://www.ebay.com/itm/SG90-9g-Micro-Servos-For-RC-Airplane-/231171879400?p
t=Radio_Control_Parts_Accessories
<http://www.ebay.com/itm/SG90-9g-Micro-Servos-For-RC-Airplane-/231171879400?
pt=Radio_Control_Parts_Accessories&hash=item35d2eaf1e8> &hash=item35d2eaf1e8

I have no commercial interest in this product.

 

At less than $3 each I was willing to open one to see what was inside:

 

Small dc motor - the device at the bottom of the picture with two black
wires. 

Potentiometer - senses shaft position - hard to see under the orange and
white wires.

Drive electronics - SMT of course.

Plastic gear drive train - not visible.

 

And it still works after putting it back together!

 

Two odd things: 1) the pin outs are different than the servo I used in my
article, and 2) the direction of rotation is reversed! 

 

It is easy to adapt my code simply by changing the mapping function:

  val1 = map(val1, 0, 1023, 120, 0);     // map input to 120 and 0 degrees

 

73 Karl W4KRL

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://amrad.org/pipermail/tacos/attachments/20140303/cc32f578/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: servo_opened.jpg
Type: image/jpeg
Size: 559864 bytes
Desc: not available
URL: <http://amrad.org/pipermail/tacos/attachments/20140303/cc32f578/attachment-0001.jpg>


More information about the Tacos mailing list