Author Topic: Good sensor to check if small hole exists.  (Read 1715 times)

0 Members and 1 Guest are viewing this topic.

Offline sona1111Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Good sensor to check if small hole exists.
« on: December 29, 2014, 11:20:27 PM »
Hello community. I have been working with an engineering club at school for a little while and we have been trying to make a robot out of a pretty nice RC car. The main help I am asking for involves the detection of the velocity of the vehicle, which is required to correctly render an area map that I am working on in the robot's code. One simple way I can find, judging from what I am working with, is to use some holes which exist on the wheels of the car. The wheel suspension is static relative to the wheel on the bottom and it would be possibly to mount a small sensor in line with the holes. The holes on the wheel are about 0.75cm in diameter. Most of the sensors I have come across have an emitter and detector fairly far away from each other and thus they would not be able to correctly 'look through the hole', has anyone seen something which might work better?

I am also open to other ideas of how to measure the car's current velocity!

Here are the pictures of the robot in it's current condition:



« Last Edit: December 29, 2014, 11:23:42 PM by sona1111 »

Offline bdeuell

  • Robot Overlord
  • ****
  • Posts: 189
  • Helpful? 15
Re: Good sensor to check if small hole exists.
« Reply #1 on: December 30, 2014, 06:34:10 AM »
I have seen a similar encoder setup used on the Boe-bot.
shown here http://www.parallax.com/product/28107
The sensor they use http://www.parallax.com/sites/default/files/downloads/32501-Sharp-GPA2025J0000F-Datasheet.pdf
However i'm not sure this sensor would fit within your wheels and it would only have a sensing distance of 3-7mm
Perhaps you can find a similar sensor with a different housing.

You can construct your own reflective sensor with a IR led and phototransistor.

Also consider using an IMU. It may be easier to implement. Also the the wheels will provide a relatively low resolution.


Offline Schlayer

  • Full Member
  • ***
  • Posts: 57
  • Helpful? 3
Re: Good sensor to check if small hole exists.
« Reply #2 on: December 30, 2014, 04:22:13 PM »
I'm not sure if this will work well for your purposes, but the same detection method for RPMs that you seem to want is used on bicycles. They usually mount a permanent magnet to a spoke of the wheel (in this case, you'd fix it onto the wheel hub with epoxy or something else nice and secure) and have a solenoid or similar in line with it. The magnet will generate a current in the solenoid or similar sensor when passing by, and you simply measure the time in seconds between two passes. However, I would caution you on sticking with this type of velocity measure, for reasons I'll detail below.

Doing this math is easy for a micro controller. That is 1R over n seconds, for RPS. Say you want meters per second or m/S; take your wheel diameter d and get the circumference with pi*d or 3.14159*d for a good approximation. That is obviously the distance covered, using whatever unit you chose to measure d with, per 1 rotation. So, (pi*d) * RPS = distance/second, or meters per second if you used meters for the diameter. This may seem obvious to you but it helps clarify my following points.

If you are going to be navigating a map, however, since you are using a fast moving, quickly accelerating and decelerating RC car as your robot, you may want to know distance travelled more than the current speed. Any measurement system that gets you your speed or velocity in the manor described above will not be great for this task. Any measurement system that detects the wheel once per rotation will have a distance resolution of only the circumference of your wheels. I'm not sure if you intended to do this, but if you did, I'd have to say it's an awful idea with that car body. Your wheels look to be around 5-66cm in diameter, meaning a circumference in the ballpark of 15-18 cm. That's already 1/6th to 1/5th of a meter of travel per rotation. 

The fact that you have those tires on the car might also mess with distance and even velocity measurements if you are on uneven terrain or change directions quickly. Relying on rotations to judge distance and velocity is only accurate while your tires maintain the same radius, and soft foam- or air-filled tires will certainly deform from different weights or vertical movements, and if your wheel that has the sensor attached comes off a bump and spins freely for a second you've just wrecked your data. Basically, if you need wheels like those for the terrain you're on, and velocity detection method based on the wheel itself is useless. If you are dead set on this method and are on flat, even terrain, then switch to a harder wheel with good contact on flat surfaces. Otherwise, I'd strongly recommend an accelerometer for velocity data mounted on the body of the vehicle.

http://www.adafruit.com/products/2019?gclid=CjwKEAiAt4mlBRDXwt_m9ICU4DcSJAAS_X0WOCKQVg9bYzPufCkhQYHtaeeD7fFhl2gjUV76XXQFGBoC0anw_wcB
$7.95 analog
http://www.adafruit.com/products/163?gclid=CjwKEAiAt4mlBRDXwt_m9ICU4DcSJAAS_X0W4jAhC9ejDgislhY_EENT7VPt1ASS4um6BkkuJ5FKxRoCHNfw_wcB
$14.95 digital
http://www.ebay.com/itm/like/270989205712?lpid=82
$2.55 made in and shipped from China

I don't mean to be insulting and I'm sorry if any of this sounded accusatory, but I wouldn't want you making an easy mistake which would be avoided with an even simpler solution.

If you have any further questions, feel free to message me. I happen to be working on a project on a similar platform myself, so maybe we can compare notes ;)

Offline sona1111Topic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Good sensor to check if small hole exists.
« Reply #3 on: December 30, 2014, 07:06:50 PM »
Hey guys, thanks for the replies!

No it does not sound accusatory at all. For the magnetic measurement, that was actually a first idea I had but I generally concluded that one measurement pre wheel revolution was too low of a resolution, but eight measurements might be more acceptable. The bot is already fairly 'inaccurate' (rack and pinion, powerful motor without geardown) , so I think from an initial perspective that this measurement might be enough.

The accelerometer measurement was my first logical thought as well: with a known initial velocity of zero, we should be able to 'integrate' over a few measurements and calculate the current speed. (Actually, I would prefer to use this method because we already have an adafruit 10DOF mounted and working) However, on initial research I came across some pages with this attitude:

http://www.chrobotics.com/library/accel-position-velocity

If you think that it would be possible to a fair degree of accuracy to calculate the velocity this way, that would be better overall for me and I would be happy to help.

Offline bdeuell

  • Robot Overlord
  • ****
  • Posts: 189
  • Helpful? 15
Re: Good sensor to check if small hole exists.
« Reply #4 on: December 30, 2014, 10:35:34 PM »
Thanks for the info regarding IMU localization challenges ... as you can tell I haven't done much work with them myself.

Seems as tho you are already headed in the right direction.

I did a little searching for sensors similar to the sharp sensor mentioned in my post above here are a couple other options:
longer sensing range
http://www.digikey.com/product-detail/en/GP2A240LCS0F/425-2529-ND/1302207
shorter range but smaller package
http://www.digikey.com/product-detail/en/GP2A231LRSAF/425-2043-ND/720177
http://www.digikey.com/product-detail/en/EE-SY410/OR526-ND/76666

Additional ideas:

you could mount the sensor to the outside of the wheel so it has less distance to travel

you could construct your own encoder ring and glue it to the inside of the tire/rim. this would shorten the detection distance, allow for higher resolution, and could be white to improve reflectance.

 


Get Your Ad Here