Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Simple sensor recommendation

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
5 postsPage 1 of 1
5 postsPage 1 of 1

Simple sensor recommendation

Post by subpilot » Sat Mar 18, 2006 10:05 pm

Post by subpilot
Sat Mar 18, 2006 10:05 pm

Here's a cheap and simple way for people to get started with adding external sensor functions. Pick up a Sharp GP2D120 Infrared sensor http://www.acroname.com/robotics/parts/ ... 2D120.html
It has an analog voltage output representing the range from the front of the sensor to an object. All you have to do is add a plug and plug it in to an unused analog port.
For the board connector I use Digikey part# WM2801 with WM2555 pins.
http://rocky.digikey.com/scripts/Produc ... 50-57-9003
You can use a Radio Shack crimper to do the pins if you're careful but I recommend getting a Universal Crimp Tool (Molex)
Wire the connector with the red wire in the center and the black and yellow wires in the other two holes. Plug the connector into port AD0 (see page 42 of the manual) with the yellow wire inboard and the black wire outboard.

Here's a bit of code to make the robot backup if he senses something in the sensor range.

a=AD(0)
IF a > 100 THEN GOSUB k12

You can add more sensors and just plug them into more AD ports. Note that AD6 is used for battery voltage sense and AD7 is used for the IR link.
Here's a cheap and simple way for people to get started with adding external sensor functions. Pick up a Sharp GP2D120 Infrared sensor http://www.acroname.com/robotics/parts/ ... 2D120.html
It has an analog voltage output representing the range from the front of the sensor to an object. All you have to do is add a plug and plug it in to an unused analog port.
For the board connector I use Digikey part# WM2801 with WM2555 pins.
http://rocky.digikey.com/scripts/Produc ... 50-57-9003
You can use a Radio Shack crimper to do the pins if you're careful but I recommend getting a Universal Crimp Tool (Molex)
Wire the connector with the red wire in the center and the black and yellow wires in the other two holes. Plug the connector into port AD0 (see page 42 of the manual) with the yellow wire inboard and the black wire outboard.

Here's a bit of code to make the robot backup if he senses something in the sensor range.

a=AD(0)
IF a > 100 THEN GOSUB k12

You can add more sensors and just plug them into more AD ports. Note that AD6 is used for battery voltage sense and AD7 is used for the IR link.
subpilot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 146
Joined: Sat Feb 25, 2006 1:00 am
Location: Lake Arrowhead, Ca,USA

Post by rep001 » Sat Mar 18, 2006 10:32 pm

Post by rep001
Sat Mar 18, 2006 10:32 pm

Perfect just the start i needed thankyou i will gather the bits and report soon.Which socket would you plug a gyro in ??
Perfect just the start i needed thankyou i will gather the bits and report soon.Which socket would you plug a gyro in ??
rep001
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 193
Joined: Thu Mar 09, 2006 1:00 am
Location: HERTS UK

Post by subpilot » Sat Mar 18, 2006 11:22 pm

Post by subpilot
Sat Mar 18, 2006 11:22 pm

I haven't done any experiments with gyros and can't really comment other than I would think that would be a more advanced control problem and the RC gyros I've seen are fairly large.
I haven't done any experiments with gyros and can't really comment other than I would think that would be a more advanced control problem and the RC gyros I've seen are fairly large.
Last edited by subpilot on Sun Mar 19, 2006 2:48 am, edited 1 time in total.
subpilot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 146
Joined: Sat Feb 25, 2006 1:00 am
Location: Lake Arrowhead, Ca,USA

Post by Pev » Sat Mar 18, 2006 11:45 pm

Post by Pev
Sat Mar 18, 2006 11:45 pm

The gyro implementation actually takes 2 of the AD ports. One for input to the gyro and one for output from the gyro. These are detailed on page 138 of the RoboBasic manual.

Right now I am unaware of anyone who has implemented a gyro yet but I am awaiting delivery of mine so will update the forum as I move forward.

Hope that helps

Pev
PS sorry to thread hijack again subpilot but wanted to answer the gyro question
The gyro implementation actually takes 2 of the AD ports. One for input to the gyro and one for output from the gyro. These are detailed on page 138 of the RoboBasic manual.

Right now I am unaware of anyone who has implemented a gyro yet but I am awaiting delivery of mine so will update the forum as I move forward.

Hope that helps

Pev
PS sorry to thread hijack again subpilot but wanted to answer the gyro question
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by crmfghtr » Sun Mar 19, 2006 4:19 pm

Post by crmfghtr
Sun Mar 19, 2006 4:19 pm

Thanks! Im gonna give it a try too, most appreciated
Thanks! Im gonna give it a try too, most appreciated
crmfghtr
Robot Builder
Robot Builder
User avatar
Posts: 21
Joined: Tue Feb 28, 2006 1:00 am


5 postsPage 1 of 1
5 postsPage 1 of 1