go_away

Author Topic: How many HC-SR04 sensors  (Read 851 times)

0 Members and 1 Guest are viewing this topic.

Offline headingwestTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
How many HC-SR04 sensors
« on: February 17, 2013, 12:42:53 AM »
Hi All,

My first attempt at a robot has 2 ultrasonic sensors slightly off to the left and right. They are run by a Picaxe 20X2 and the robot is managed by an IOIO / Android. They seem to work... sometimes. I always get a good signal when the robot is idle or being tested, but when it zooms across the room it tends to have a lot of crashes.

Can anyone guide me on a good number of sensors and where it's effective to place them please?

Thanks for your help, Jim.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: How many HC-SR04 sensors
« Reply #1 on: February 17, 2013, 09:17:03 AM »
Quote
but when it zooms across the room it tends to have a lot of crashes

The robot 'crashes' into objects?
or the processors 'crash'?

Are any of the wires getting loose when the robot moves? Vibrations can cause this.

Offline headingwestTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: How many HC-SR04 sensors
« Reply #2 on: February 17, 2013, 03:06:45 PM »
So far I've only tested in our lounge room which has plenty of soft furnishings. But I guess the sensors often fail to see chair legs (30mm wide), angled surfaces and soft furniture.

My guess is I need a 3rd sensor facing directly forward as well.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: How many HC-SR04 sensors
« Reply #3 on: February 17, 2013, 05:41:45 PM »
Soft and narrow objects can be a problem with the US sensors.
It can still be a a loose wire or other problem so try setting up a controlled environment to pin point the issues.
Even some cardboard set up as walls would be helpful to determine if the sensors and code is working or if there is a hardware problem.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: How many HC-SR04 sensors
« Reply #4 on: February 17, 2013, 11:36:06 PM »
Also, only run one sensor at a time! Wait some amount of time (say, 30-50 milliseconds) before running the other sensor, and do them ping-pong style, else you may get crosstalk.
You can mount them so they sense in an "X" pattern -- turn the leftmost to face right, and rightmost to face left. This gives you some amount of "center" sensing, hopefully enough to avoid a crash.
Also, try going slowly, not allowing a very fast top speed, until it's all tuned and working well. Then slowly increase max speed.

Finally, to compensate for the shortcomings of US sensors, you can also use a Sharp IR sensor, which works great for soft textiles, but is narrower in its sensing pattern. I use both on my rover robot.

 


Get Your Ad Here

data_list