Hope you are not activating both sensors at the same time, right? Be sure to give some time for the echo to decline enough before confusses the other sensor.
Ioannis
Hope you are not activating both sensors at the same time, right? Be sure to give some time for the echo to decline enough before confusses the other sensor.
Ioannis
I've added a PAUSE of 1/10sec between the front trigger and the side trigger. This noticeably slows down the flashing of the LEDs on the SRF05s. In the audible range I can easily hear echos in a room. I have no experience with ultra-sound in the range that the SRF05 emits. The spec shows a time line in which the pulses seem to be a square wave of 2usec cycles. That is a little burst of 500,000 cycles per second sound that appears to last about 20 usec.
This little project keeps gets interestinger and interestinger!
If there were five cars racing near each other on this gymnasium track, would their SRF05's get confused. I don't think so, but I am not sure....
Ken
They SURE would. That is what I noted on my previous post. Your sensors are hearing echoes that keep coming long after the transmission stopped. No matter which of the SRF05's did the transmission. Keep note of that.
Maybe an IR sensor would be more appropriate here. Also faster.
Ioannis
If I went with IR proximity sensing, the reflections would be from brick, wood and cardboard. Distance one to five feet should do it. Any suggestions?
Ken
I have not used them, but here is one that is within your measurement range GP2Y0A02YK:
http://sharp-world.com/products/devi...gp2y0a02_e.pdf
One thing that isn't so good, is that you will get a false reading if you are closer than 8 inches.
Today I took some cardboard boxes to my gymnasium race track. I arranged them in the middle of the floor about six feet from the walls.
The car did not behave as expected. It is futile to try to describe what it did. I shall video tape it (probably not for public consumption) and try to analyze what is happening.
The SRF05 flashing LEDs are constantly illuminated. That should be good.
My present code has only two 'regular' states.
1. Going forward being guided by the side looking SRF05. The forward pings are monitored for something close enough to merit turning hard left while still going forward.
2. Going backward and turning to the right because the front looking pinger sees something too close. The backward state is left by either timing out, or by the forward looking pinger saying that the obstruction is no longer there.
With the car on blocks and me manipulating a large piece of card board, the wheels move true to concept. In the gym was something else.
Interesting stuff, real time control code. I made my living in data communication hardware and software development. Nothing actually 'moved' in the common sense of the word.
Ken
I made this video of my car on my "race track"
As I speed up the car the behavior becomes less consistent.
Take a look see if you like. It's only a couple minutes long and the car does work correctly sometimes.
Ken
They're on 2mm (0.079") centers.
Digikey has a whole variety of them. Here's one flavor with 12 pins, right angle.
http://search.digikey.com/scripts/Dk...me=S5802-12-ND
Steve
Bookmarks