Multiple Sensors On One Uart

Luis Vazquez

USA
robot video thumbnail

Ok this is going to be awesome!

So here is my Idea:

1 Sure DC SS503V100 Dual Axis Compass . used for robot orientation and also I will snap shot the angle the ping was pointed when it was shot.

User-inserted image

4 Ultrasonic Ping Sensors HC SR04

User-inserted image

1 one Arduino Pro Mini

User-inserted image

Connect all 5 Sensors to the Arduino then connect the Arduino to the EZB4.

User-inserted image

I have done some testing all this will work nice. I'm going to be working on putting them into a single package.

I'll get it all wired up and working and will update this thread in a few days.

By — Last update
Jump to end

ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

#10  

@Rich Since i am moving this to the UART port.

I will have command that will allow for pinging for each or all sensors.

Also i have not totally wired up all 4 . I think i can use a single pin for ping. and have the echo pins separated.

have you or anyone else trying to trigger multiple sensors on a single digital pin for Trigger?

United Kingdom
#11  

I haven't tried that and I haven't noticed anyone else say they have (but I may have missed it).

In theory I can't see why it wouldn't work since it's the echo which is needed as far as I am aware (I'm no expert in how they work mind you). In theory it would trigger all at the same time, the only issue I can see may be that the time delay between receiving on the echos may make the readings inaccurate on sensors 2 to 4. It may also cause interference on sensors depending on what they are aimed at (ghost signals or something like that I think they call it).

Does the Arduino have enough pins for 4 triggers and 4 echos? If it does I would do it that way personally but only because I don't understand enough about the sensor to know one combined trigger wouldn't cause any problems.

#12  

I don't think anyone has tried using a single trigger into multiple sensors mainly due to the fact that the resultant info returned back would need to be fed into different ports.

United Kingdom
#13  

A simple test would be to try it on the EZ-B or Arduino. Wire up for 2 sensors, put both triggers on one port, echo 1 on another port and echo 2 on another port. Try reading one then the other then both. See if the both result is the same as the first two.

#14  

You won't be able to get the correct values from the arduino until the issues with the UART is fixed. I've tried .

#15  

I did some testing and yes I can use the same trigger pin for all Sensors. Woohoo my responses are all in the rang of 1 - 127.

Right now I am taking the project off the bread board and doing some soldering , wrapping and the such to make it more permanent.

Some one was asking why would you want to do this and even though good answers have been given .. here is why i need it.

User-inserted image

I am building this car for JD. when he sits in it. all i have to do is plug the car into the 4 pin UART.

Now the car is part of JD. So when he is in the car and moves forward , he will not walk but soon as you unplug the car the know he should go forward.

now that he is hooked to the car he can use all servos and sensors on the car via commands to the arduino board via UART!

Just think .. you can make tool and accessories for him .. and all you have to do is plug it in..

make a script that will poll that uart port and when it finds something it knows how to use.. then bingo!

Im going to make him a ray gun too!