circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

Issue 115, February 2000
Launching the RoboatNavigation by GPS and Digital Compass


by Ricardo Rocca

Riccardo's first-prize-winning Design 99 project tests the feasibility of an autonomous GPS-guided model. Step aboard for this stem-to-stern review of everything from the details of construction to the software required for its maiden voyage.


Start Mecahnical Assembly GPS - Digital Compass Proportional Servo Circuit Description Software Test Modes Crossing the Atlantic Sources

Proportional Servo

The rudder is controlled by a proportional servo of the same type used in radio controls for models. The servo wheel turns under control of a periodic positive pulse and the amount of rotation (±90°) of the wheel is proportional to the pulse width (see Figure 5).

The pulse is generated at pin 4 of Port D, under control of Timer 1, which is set in a PWM-buffered mode. In this mode, the pulse width is under control of Timer 1, Channel 0, and Channel 1, alternatly. While one channel controls the pulse, the other channel can be updated. The change will appear in the next pulse only, so there is no danger of applying undesired changes in the middle of a pulse.

The alternating selection of channels is done automatically by the hardware. The software uses bit 1 of register T1SC1 as a flag bit. The bit toggles at every overflow of T1SC0 and its value indicates which channel is to be written next.

The unconventional use of T1SC1 is possible because the register isn’t used in buffered PWM mode. It is T1SC0 that controls both channel registers.