background image

The Servo Trigger consists of two major engineering deliverables, the 
hardware design, and the firmware. The hardware is actually the same for 
the regular and continuous rotation boards, but they’re loaded with different 
firmware, tailoring the board’s behavior to each type of servo motor. Both 
sets of deliverables are in the Servo Trigger Github repository.

On The Board

Let’s look at the components on the board and examine what they do.

The heart of the Servo Trigger is an Atmel ATTiny84 microcontroller, 
running a small program that implements the servo control features we are 
discussing here. Just because the Servo Trigger saves you from needing to 
write code doesn’t mean that there was no programming involved!

The servo control signal is generated using a 16-bit hardware timer. It runs 
off a 1 MHz clock, counting to 20000 to generate the 20 mSec (50 Hz) 
period and is configured to generate pulses that range from 1000 to 2000 
µSec (1 to 2 milliseconds).

The three potentiometers are connected as voltage dividers between VCC 
and ground. They are read using analog inputs ADC0, ADC3, and ADC7.

The switch input is read using PortA, input pin 1. It is debounced in 
software and can be configured to watch for a switch closure or a logic level 
pulse.

The board also includes the common 6-pin in-system-programming header, 
which we’ll discuss in the Servo Trigger Programming Guide. But we’re 
getting a bit ahead of ourselves – there are some configuration options you 
can use without programming.

Configuration

The Servo Trigger has a couple of configuration options. If you look at the 
back of the PCB, you’ll notice two solder jumpers that can be used to 
change Servo Trigger’s response.

Configuration Jumpers, SJ1 and SJ2.

When it first powers up, the servo trigger reads these jumpers and 
configures itself accordingly.

Modes

Page 6 of 13

Summary of Contents for WIG-13872

Page 1: ...wever reprogramming the firmware is somewhat tedious and users asked for a Servo Trigger preprogrammed with the continuous rotation logic You asked and we listened Introducing the Continuous Rotation Servo Trigger The name is a mouthful but if you re looking for an easy way to deploy continuous rotation servos it should be exactly what you re looking for The Continuous Rotation Servo Trigger Page ...

Page 2: ...rvo Motors A continuous rotation servo sometimes called a full rotation or 360 servo looks like a regular hobby servo While a regular servo motor only turns over a narrow range with precise control over position a continuous rotation servo has a shaft that spins continuously with control over its speed and direction The control is performed using a pulse train signal typically with pulses that var...

Page 3: ...Let s jump in and build a circuit to show how the Servo Trigger works Materials and Tools You ll need to following materials to build this example circuit found in this tutorial SparkFun Servo Trigger Continuous Rotation WIG 13872 Servo Generic High Torque Continuous Rotation Standard Size ROB 09347 Wall Adapter Power Supply 5V DC 2A Barrel Jack TOL 12889 Momentary Pushbutton Switch 12mm Square CO...

Page 4: ...opposite corners top right and lower left for instance you can be confident that you ll get a contact closure when you press the button Switch Assembly Next prepare the power plug pigtail Take a pair of wires and strip the ends Then screw them to the power jack adapter if you look closely at the adaptor you ll notice that there are a small and embossed in the plastic We used a red wire for VCC on ...

Page 5: ...ise and set T to the middle Finally apply power The servo should start to turn If not power down and recheck your work While it s running tap the switch The servo will take a couple of seconds to slow down stop then reverse Tap the switch again and it will go back to the original direction Now you can adjust the trimpots to configure the servo A sets the speed and direction of the motor before the...

Page 6: ...unting to 20000 to generate the 20 mSec 50 Hz period and is configured to generate pulses that range from 1000 to 2000 µSec 1 to 2 milliseconds The three potentiometers are connected as voltage dividers between VCC and ground They are read using analog inputs ADC0 ADC3 and ADC7 The switch input is read using PortA input pin 1 It is debounced in software and can be configured to watch for a switch ...

Page 7: ...etween the pads of the mode jumper Closing SJ1 to select bistable mode With the solder jumper closed the mode changes to bistable control the servo will drive at speed A while the switch is open and speed B while the switch is closed While the switch input stays in a state the servo drives at the corresponding speed it is stable in two different states Mode Jumper Cleared Bistable Control Input Po...

Page 8: ... counteracting the twist It drew 700 mA during this test a larger servo could draw even more These currents can get surprisingly high as you add more motors to the system you ll need to select a power supply with adequate capacity An Ampere per motor is a reasonable guideline For more information about powering servos please see the powering a servo section of our Servo Tutorial When in doubt grab...

Page 9: ...olymer Lithium Ion Battery 2000mAh PRT 08483 SparkFun Power Cell LiPo Charger Booster PRT 11231 SparkFun Servo Trigger Continuous Rotation WIG 13872 Servo Generic High Torque Continuous Rotation Standard Size ROB 09347 Jumper Wire 0 1 2 pin 4 PRT 10362 SparkFun RedBot Sensor Mechanical Bumper SEN 11999 Page 9 of 13 ...

Page 10: ... atop the Servo Trigger board Headers used to stack Power Cell on Servo Trigger The whisker switches were assembled as described in this hookup guide with one built in right hand orientation and the other left handed The whisker switches also needed a quick electronic modification to make them compatible with the Servo Trigger We desoldered the resistor from the PCB and replaced it with a blob of ...

Page 11: ...h had the desired effect Mechanical Integration With the electronics working we put them on the chassis The chassis itself consists of a platform with a couple of protruding M6 machine screws The axles are mounted to the screws with wingnuts The drive mechanism for the cart is a simple slip clutch We fashioned a double width rubber wheel onto the servo using Actobotics 2 wheels and a pair of servo...

Page 12: ...ntil the first switch closed then stall It turns out the battery was nearly discharged After a couple hours charging from a USB port it behaved as expected We adjusted the trimmers so it drove slowly in both directions with a medium transition time so it wouldn t skid or jerk as it turned around Resources and Going Further Resources For more background information on servo motors check out the Hob...

Page 13: ...ndard hobby servos we also offer the Standard Servo Trigger and a wide variety of standard servo motors SparkFun Servo Trigger Page 13 of 13 6 8 2016 https learn sparkfun com tutorials continuous rotation servo trigger hookup guide all ...

Reviews: