+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Mounting, SR HC04 ebay UltraSonic?

  1. #1

    Default Mounting, SR HC04 ebay UltraSonic?

    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.

  2. #2

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    I brought mine to the local hardware store and found that small metric screws worked. I made my own standoffs using a pipe cutter and aluminum tubing, but I bet nylon spacers would work.

  3. #3
    ajward's Avatar
    Location
    Directly above the center of the Earth
    Posts
    873
    Blog Entries
    4

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    I enlarged the holes slightly with a small needle file to accept 2-56 screws. Made the standoff from a 3/16" OD nylon spacer, notching one end slightly to clear the resistors. Files, screws and spacers all available at my local Ace Hardware.

    @
    Founder of the "Society for Aimless Tinkering and World Conquest"

  4. #4

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    There are a couple different variations of these sensors floating around on ebay. Some have 2 screw holes and others have 4. Also, some have a green solder mask and others use a blue solder mask. Of course they all are using the same part #....

    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/catalog...esult?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

  5. #5

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Intresting, maybe I will pay Home Depot a visit. I found a few screws the size I needed in my scrap Hardware bag, but I figured this stuff was much to small to source at the hardware store! I thought of reaming the holes also but didnt think it would make to much of a difference.

    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.

  6. #6

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Another option would be to try some heavy gauge copper wire which you could solder into the holes. You could have it come straight off the back and then at the end bend a loop and then bend that 90 degrees so you could put a screw in that.

  7. #7
    ajward's Avatar
    Location
    Directly above the center of the Earth
    Posts
    873
    Blog Entries
    4

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Depending on the material, you "might" get away using a spade bit. A 5/8" bit is just a little smaller than the transducers on the sensor, but a bit of sandpaper will remedy that.

    @
    Founder of the "Society for Aimless Tinkering and World Conquest"

  8. #8

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Quote Originally Posted by ajward View Post
    Depending on the material, you "might" get away using a spade bit. A 5/8" bit is just a little smaller than the transducers on the sensor, but a bit of sandpaper will remedy that.@
    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.....

  9. #9
    ajward's Avatar
    Location
    Directly above the center of the Earth
    Posts
    873
    Blog Entries
    4

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    @RobotWorkshop - It will work with a ==light== touch. I primarily use the spade bit on PVC (solid and expanded), though I've successfully used the bits with styrene sheet. Again... high speed and a very light touch!
    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
    Founder of the "Society for Aimless Tinkering and World Conquest"

  10. #10

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    This picture kind of show one of these sensors attached to my small quadcopter.



    (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.
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	QuadHkSmall121024a.jpg‎
Views:	492
Size:	308.5 KB
ID:	99580  

  11. #11

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Lol the first thing I though was I should order some polymorph. I just reamed one out and got a 4/40 screw through it with stand off, im gonna test it out in a bit and then use a rubber washer or something on the stand off, if the screw isnt shorting out c3, well see if it worked or I trashed a sensor

  12. #12

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Quote Originally Posted by ajward View Post
    @RobotWorkshop - It will work with a ==light== touch. I primarily use the spade bit on PVC (solid and expanded), though I've successfully used the bits with styrene sheet. Again... high speed and a very light touch!
    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. :-)
    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.

  13. #13

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    @Duane ok im sitting down now to test my pile of sonar sensors and the one Ive modded. I tested one on a Bs2 with no problems. I noticed you wrote a propeller driver for these HC04s, but in the thread you mentioned you were getting wacky readings? Is this still the case? Just so I know if something like this goes awry its the driver and not the sensor?

    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...

  14. #14

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Quote Originally Posted by rwgast_logicdesign View Post
    @Duane ok im sitting down now to test my pile of sonar sensors and the one Ive modded. I tested one on a Bs2 with no problems. I noticed you wrote a propeller driver for these HC04s, but in the thread you mentioned you were getting wacky readings? Is this still the case? Just so I know if something like this goes awry its the driver and not the sensor?

    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.

  15. #15

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    I had them all mixed up in a box I have no idea which one I originally tested, if I have issues ill just go back to the Bs2 and test. So are you telling me you bad readings were from a faulty sensor and too high of a resistor, not 3.3v comm with the sensor. The issue in the thread sounded a bit like it could be the 3.3v communications.

    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.

  16. #16

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Duane I downloaded your code, then plugged in all my sensors to test them. All 5 seemed to be working correctly but I can have it totally stationary pointed at stationary items and the time will bounce between 800ms and 1100ms. It only flickers in to the 800s a few times, is this normal, do better quality sensors do this, i.e ping or the maxbotix you use sometimes.

    Im sorry if this is a stupid question but is this where maybe you could implement a kalman filter to get more stable readings?

  17. #17

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Quote Originally Posted by rwgast_logicdesign View Post
    Duane I downloaded your code, then plugged in all my sensors to test them. All 5 seemed to be working correctly but I can have it totally stationary pointed at stationary items and the time will bounce between 800ms and 1100ms. It only flickers in to the 800s a few times, is this normal, do better quality sensors do this, i.e ping or the maxbotix you use sometimes.

    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.

  18. #18

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Ok well heres the deal reading page 5 of the original post

    http://forums.parallax.com/showthrea...uck+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?

  19. #19

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Ok so i did a bit more research on how this 1 pin setup works. Basically you have to pull down the pin as soon as you send the trigger, im assuming that none of the code ive been using does this, and thats why i cant get it working right, ill take a look at this tommorow.

    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.

  20. #20

    Default Re: Mounting, SR HC04 ebay UltraSonic?

    Quote Originally Posted by rwgast_logicdesign View Post
    Intresting, maybe I will pay Home Depot a visit. I found a few screws the size I needed in my scrap Hardware bag, but I figured this stuff was much to small to source at the hardware store! I thought of reaming the holes also but didnt think it would make to much of a difference.

    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.
    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.

+ Reply to Thread

Similar Threads

  1. QuickStart with cheap eBay ultrasonic sensor
    By birdmun in forum Propeller 1 Multicore Microcontroller
    Replies: 14
    Last Post: 07-06-2014, 04:43 PM
  2. Replies: 9
    Last Post: 10-30-2012, 03:33 PM
  3. HB 25 Mounting
    By NWCCTV in forum General Discussion
    Replies: 4
    Last Post: 10-19-2012, 08:31 PM
  4. LCD Mounting
    By TomS in forum BASIC Stamp
    Replies: 4
    Last Post: 02-12-2006, 01:00 AM
  5. PCB mounting
    By Archiver in forum BASIC Stamps Archive
    Replies: 1
    Last Post: 07-15-2000, 07:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts