Mounting, SR HC04 ebay UltraSonic?
rwgast_logicdesign
Posts: 1,464
Im wondering if any of you have a decent method for mounting these things, the screw holes are so small not even the smallest of stand offs I have will work with them, not to mention the resistors are so close to the screw holes!
Ive all but given up on using the screw holes to mount them, but have been looking around at erector pieces, jb weld etc.. I was thinking about maybe cutting two holes in plastic or metal and sticking the transducers through, but I dont have a hole saw that small. I really do not want to resort to some ghetto method involving zip ties and tape.... I have 5 of these to mount on my sting ray. Im almost wishing I would have bought the 3 ping Ping kit for the stingray, when I had the chance.
Anyways Id love to see any examples you guys have used to mount these cheap UltraSonic sensors.
Ive all but given up on using the screw holes to mount them, but have been looking around at erector pieces, jb weld etc.. I was thinking about maybe cutting two holes in plastic or metal and sticking the transducers through, but I dont have a hole saw that small. I really do not want to resort to some ghetto method involving zip ties and tape.... I have 5 of these to mount on my sting ray. Im almost wishing I would have bought the 3 ping Ping kit for the stingray, when I had the chance.
Anyways Id love to see any examples you guys have used to mount these cheap UltraSonic sensors.
Comments
@
I've been able to carefully enlarge the holes on some to use #2 hardware as suggested. Another method I have used it mounting them through a plastic panel. For drilling the holes in plastic I have a few different unibits. If you don't have any of these you may want to invest in a set. They are very handy to have around. These are a must for working with some plastics as they easily and cleanly cut holes without damage. If you used a regular drill bit on plastic they can catch and you may crack or break the plastic. One source for inexpensive ones to try are here:
http://www.harborfreight.com/catalogsearch/result?q=unibit
I wouldn't use JB weld to mount these sensors. For the couple times I needed glue I've used GOOP instead. I like JB weld for certain applications but GOOP seems to work better for these and if needed you can remove it. Although it has a funny name it is great for lots of applications.
Robert
I do have a half inch unibit, the transducers are a bit bigger than that though. I had a 1 inch too, seems as though its been lost. I have another idea involving a proto board backing I may give a shot too.
Like i said i was just intrested to see what others came up with, im using the blue ones with two holes.
@
I think I would only use a spade bit on wood. I'm not sure what other materials it would be good on except for foam. If I were drilling plastic then I would avoid that bit. I would expect that to crack plastic.
Erco probably has a whole set though and would have no issues using them to mount these sensors on one of his plywood robots.....
The spade bit wouldn't be my first choice, but ya gotta go with what ya have. Not a recommendation, just a suggestion of what "can" work. :-)
Yeah... erco is a magician!
Amanda
(The ultrasound is pointing down and has small camera mounted on top of it.) Unfortunately these motors produce a lot of ultrasound noise and the setup wasn't useful (at least not useful when the motors were on).
Sorry, I forgot about the "no ghetto" requirement.
Double sided foam tape is great to attaching circuit boards so is Polymorph.
Hello Amanda,
You're right. If your careful I suppose it could work. I can see where it should do ok on the expanded PVC. Some if the other plastics can be pretty brittle and for those I've found the unibit to be the safest way to put a hole in there.
My plan is to connect the trig/signal plans togather and try to get it working with a standard ping driver but well see about all that...
Are you using the same sensor when testing on the Prop and BS2? I've had several of the cheap sensors not work but I haven't checked them with the BS2 to see if they work with it.
I doubt connecting the trigger and echo pins together will work. I'm not sure but I'd think the echo could cause the sensor to self trigger. I don't think I've tried this but I thought someone else had. Let us know how it turns out.
I have tied several echo lines together so instead of taking n * 2 I/O pins, the sensor uses n + 1 I/O pins. I think I've done this with four sensors at once (using five I/O pins). I'm not sure if I posted my modified driver that uses multiple sensors. If I haven't posted it yet, I'll find it and post it.
If a sensor doesn't seem to be working correctly, try getting rid of the resistor on the trigger line. I know I had problems with high resistor values (4.7K?) on the trigger line.
If you purchased your 5 sensors off ebay, chances are one of the 5 wont work. Odd Bit Collector mentioned a 20% failure rate on the sensors he's ordered. I've also had 20% of my sensor not work.
If I get anywhere with tying the echo and trigger pins together ill let you know, Erco said that this worked and linked to people using picaxes doing it with a 1k8 resistor, ive also seen a lot of arduino write ups on doing this with 3 pins only.
Anyways I got the thing plugged in and your objects along with the ping sensors object. Ill get to work on this after I eat some dinner and let you know If I find anything interesting.
Im sorry if this is a stupid question but is this where maybe you could implement a kalman filter to get more stable readings?
In my experience, when the sensors work, they work pretty well.
I've noticed a stray wire can get in the way of the sensor and causes a problem. You should also test the sensor with a very well defined target. If you pointing it at a wall that has a lamp in front of the wall, sometimes the lamp's echo may be strong enough to change the reading.
When I tested ultrasound sensors by pointing them up at the ceiling, I found they gave very consistent results.
There are lots of possible ways to filter the readings. I doubt you'd need a Kalman filter.
One filter would be to take several readings and throw out any that are far from the average. Even just averaging a few readings will reduce the problems caused by the bad reading (unless the bad reading is way off).
You could wait until three readings in a row agreed within a certain limit and only then accept the reading as valid.
http://forums.parallax.com/showthread.php/135899-Two-Buck-Ultrasonic-Sensor/page5?highlight=buck+ultrasonic
Erco verifys that jumping the echo/trig pins with a 1800ohm resistor works with a bs2 and picaxe. I left the 1k and 10k resistors attached and tried to jump them with a 1k8 resistor, I used both your code with both pins set the same and then the ping code. Neither worked... I then tried to stick a 5k pot in there and adjust it, still no dice, a little more luck but nothing usefull. So im not really sure how you can do this while still protecting the propeller pins.
Does anyone have any ideas?
One thing i was thinking, and this where i could be totally wrong as im not good with gates. But the trigger and echo are never hi at the same time right? If that is the case than maybe using a xor gate would be an option? They come in quad packages, so for those of using multiple sensors this may be a good option. Would it be possible to mux this with gates, more specificallay a xor. All i have are old 74LS packages but if if this is possible and ls gates are fast enough i can do a bit of testing that way too.
If they are the same ones I'm thinking of then the hardware that will fit native is #1-64. Tiny screws that I wouldn't wish on an enemy. I used a small drill press to enlarge them to #2-56 at least. ACE hardware is the best place to go if you need small numbers of fasteners. They have a much better collection of sizes and types than Home Depot. You do pay a significant price for the less commonly used sizes.
How are you powering the sonar sensors? Are you running them at 5V or the 3.3V supply of the propeller? I think they are meant to be run at 5V.
With the sensor running at 5V and the Propeller I/O at 3.3V the trick with the resistor may not work the same at the Stamp or PICAXE which are running at the same 5V supply as the sonar module.
Unless you are running out of pins you may just want to live with two I/O pins per sensor. I'm sure you can find ways to consolidate the pins but it may add a lot more complexity to your hardware and code. At that point you'll need to consider if it is really worth it.
I've used four of these sensors with five Prop pins. It requires a diode and I think there're also a need for a pull-down resistor with each sensor IIRC. I think I posted code to run four sensors at once. If not, I'm sure I have the code somewhere where I could find it (not that it would be hard for others to reproduce).
Duane your just talking about triggering multiple sensors at once right? Thats not really what im going for, I need independent triggering of each. Also when you said you had to add pull downs was this for the multiple sensor technique or just in general? Im having a hard time with the readings on these things, I mean when I hit the celing or a wall its just fine up to about 8 ft or so as it should be, but when Im just throwing random object in front of them, some time I have to move the object about 30 degrees out of LOS with the sonar for it to pick it up and all kinds of funky things.
The shared line would be the echo line. Each sensor would have its own trigger line.
Just when using multiple sensors. I'm pretty sure this was described in one of the other ultrasound threads. I think the thread was started by Martin_H and was about using multiple sensors with fewer pins. If you can't find the thread, I probably can.
Ultrasound does funky things. A nice hard wall will be invisible to ultrasound if the sound hits the wall at a shallow angle. Soft objects can also be invisible to ultrasound. Not really invisible, some things just don't return an echo. My S2 almost always runs into our couch since the upholstery doesn't reflect the sound.
I haven't played with these cheap ultrasound sensors as much as I've used a Ping and Maxbotix sensor, but I don't think the problems you're seeing are caused by these particular sensors but are just a limitation of ultrasound in general.
Because of these limitations it's very common to use other types of sensors along with ultrasounds to make up for the ultrasound's weaknesses. IR compliments ultrasound well. IR often sees what ultrasound doesn't and visa versa.