propeller c sensors
Patrick222122
Posts: 30
I am building a robot that integrates Robotics Operating system. I recently converted over to propellor c because this will be very string intensive( as in manipulating strings). However I need information to program and build some of my sensor. I will needing wheel encoders for odometry and sharp Ir senor. How should I build these.
Comments
I recommend the following for the wheel encoder:
- Research reading an encoder. One of the old 'stamps in class' articles in nuts and volts has a groovy article on this. This was posted on the old parallax site which is still accessible.
There is a nice download here: http://www.parallax.com/downloads/digital-encoder-applications-basic-stamp
- Look at SPIN and PASM encoder readers in the OBEX and use the SPIN2CPP utility to port the object over. If you go this way, and it has worked for me, then make sure to set Simple IDE to "C++" mode to use the converted object.
As far as the sharp IR sensor, I don't know anything about it. Do you have a data sheet?
http://www.parallax.com/sites/default/files/downloads/28995-Sharp-IR-Datasheet.pdf
As a follow up to the last post on this thread, I also need directions on how to build the encoder and wire the GP2Y0A21YK0F(I have yet to see a satifactory explanation on who to wire this specific model). Perferrably in the form of wiring diagrams
http://forums.parallax.com/showthread.php/137220-Sharp-IR-ranger-sensors-and-the-prop?highlight=GP2Y0A21YK0F+propellor It says I should use an ADC. i think you should know that I using the sensor in a poor man Lidar and I think I need exact distance data for it. I do belive that in a pinch I could hard set the range to maximum
A few links to keep you busy...
http://www.philbot.com/projects/TMG_encoder/
http://www.philbot.com/projects/BOB/BOB-E.htm
http://www.robotmarketplace.com/products/sensors.html
http://www.pololu.com/catalog/category/79
http://www.robotshop.com/sensors.html (very expensive shipping!)
http://www.robotshop.com/encoder-pair-tamiya-twin-motor-gearbox.html
http://letsmakerobots.com/node/29002
http://www.nubotics.com/products/ww02/index.html
http://www.seattlerobotics.org/encoder/200109/dpa.html
http://www.seattlerobotics.org/guide/index.html
http://www.dshinsel.com/components-and-sensors/
http://www.futurlec.com/HardwareMain.shtml
Will it work with dark objects? My experience with infrared was that dark objects (matte black or felt black) were not visible.
You're probably better off with a parallax PING))) sensor.
The turn around time of a beam of light is faster than the speed of a prop. However if you use the technique of this thread, you just might be able to do it. http://forums.parallax.com/showthread.php/117806-Anybody-played-with-Time-domain-Reflectometer-usin-a-prop.
The velocity of electricity in a cable is lower than that of light so you would have to use different timing constants, but it might be worth playing with.
Edit: if my math and memory are correct, 3.33333333333333e-12 or 3.3 pico sec is 1 mm at the velocity of light.
Jim
Assuming you are using SimpleIDE, you could look in "Simple Libraries/Sensor/libcompass3d/" where you can find sample code, "libcompass3d.c" which will show you how to use the compass sensor to get headings in radians. That code is a good example even if you are not using SimpleIDE and are just looking for code examples. Documentation is: "Documentation compass3d Library.html" in the same directory.
You'll also find the function "pulse_in (int pin, int state)" if you look into the simpletootls library at: "Simple Libraries/Utility/libsimpletools/". Look for the excellent documentation URLs such as: "Documentation simpletools Library.html" in the same directory.
dgately