Friday, September 30, 2016

Arduino - Using Servo Motor via the shield for a Pan-Tilt

Motor shield can connect two servos.  The marked locations on the shield are actually the reroute of pins on arduino, for convenience:
  • servo 1 is arduino pin 10
  • servo 2 is arduino pin 9
Yes, reversed. 

Expected value for the analog write ranges from 0 to 180 degrees, when using the servo library.

Example code can be found at
Arduino - Servo

I use them on a pan-tilt, works fine.

stack the joint before mounting the servo
use this little screws on the arm

 




Labels: , , ,

Sunday, August 28, 2016

Arduino Motor Shield: Soldering Stackable Headers

Got a motor shield for my robot car.

The shield comes with standard header unsoldered yet.  Optionally can put stackable headers on them.

Aligning headers maybe challenging.  If they are misaligned, the pins will not be insertable into other boards' headers.

Here shares a little trick - I have a probe shield handy, so use it as a platform to align the pins.

Probe shield top - basically nothing, make it perfect for a soldering base

probe shield bottom

Plug new headers (10pins x 1, 8pins x 2, 6pins x 1) onto the probe shield

Then the motor shield on top
Now pin-by-pin soldering... don't heat up too long time or the probe shield components get loosen up.

Ta-da!  This is how it looks when done

Test connectivity:  Stack all three together - probe shield on motor shield then on arduino 


Simple blinking LED.  Passed.

Labels: , ,