This page created 11-23-2002

Back to Index

Trippy's sensors

Click thumbnails for a larger view.


Another super day in RSOH land. My wife thought it was a noremal RSOH day so she planned on going to a friend's house after Peter went to bed, so I invited Jeff over to try and get a peizo rate gyro and an analog Dinsmore compass working with Trippy.

He usually does the connector soldering while I try and figure out how to talk to the particular sensor using the motorobots library.
Six hours later....

We had the gyrocompass working. And it only took this much code:

void
setup_gyro() {
    PTAObjectP pta;
    ServoObjectP servo;

    /*
     * Configure TPU channel #3 to generate a 1 millisecond pulse
     * every 20 milliseconds or so. These are the default settings
     * for the servo routines.
     */
    servo = servo_init(3);
    servo_powered(servo,TRUE);

    /*
     * Configure TPU channel #2 to capture the time the input pin is
     * low, and call the routine catch_period(time) with that time.
     */
    pta = tpu_pta_init(2,MODE2,TCR1,1,&catch_period);
    tpu_pta_execute(pta);
}

void
catch_period(uint32 value) {
    /*
     * Print out the time that TPU pin #2 has been low
     */
    printf("%d\n",value);
}


Adding a rate gyro

rsoh01.jpg
A peizoelectric rate gyro
from a model helicopter.
rsoh02.jpg
A Dinsmore analog compass
with long wires.
rsoh03.jpg
Another shot of the gyro
rsoh04.jpg
A beautiful 1 millisecond
pulse pretending to be a
model helecopter reciever.
rsoh05.jpg
The captured pulse wisths
from the rate gyro after I
shook it around a bit.
rsoh06.jpg
Gyro and MRM with LCD panel
removed.


Back to Index

Back to Alan's home page http://www.pobox.com/~kilian

Back to Jeff's home page http://www.pobox.com/~jsampson

Visit Twin Cities Robotics Group

This page is currently maintained by Alan Kilian