Go Down

Topic: Display 4 distances from 4 HC-SR04s from 1 board (Read 589 times) previous topic - next topic



I participate in (ver amateur level) Motorsport. One thing that would be of huge benefit would be the ability to measure the ride height of the car at all four corners whilst moving... This will help me see how much roll I am generating in the corners and tweak various bits accordingly. As well as seeing how effective aerodynamic aids really are at different speeds.

This is what starting my googling and four HC-SR04's seem like the ideal solution. From there I found the Arduino which I'd never heard of before, to save me a lot of time searching can anyone let me know if this board has enough inputs/outputs to connect to 4 sensors and output the results simultaneously?

Assuming its possible what other components am I looking at purchasing and how easy would the programming be for someone that's never written in Java before?

Thanks in advance for any help!!!


The HC... would have to be polled sequentially, there's no 'simultaneous'.
I wonder whether they will operate in your environment, there could be a lot of ultrasonic noise.
An Arduino has more than enough I/O to accomodate.
Arduino is not programmed in Java, it uses C

NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5

I guess you'll need a display, too, minimally.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!


Thanks for the reply

when I said simultaneously what I mean is I don't want to just be able to display the input from one at a time and have to manually switch between them. A "polled" request would be fine as long as this could happen at more than say 20Hz (so 5Hz for each sensor)

My planned output was 4x 4digit 7segment displays. So would I need anything else? Single Arduino board, 4x HC-SR04's and the 4x displays?


I think I would try to get a single sensor working, with a single arduino and display - then try mounting the sensor at the various corners, and see what happens. The main concern here would be whether you can communicate with the sensor over your wiring to the sensor back to the arduino in such an environment; automobiles aren't very forgiving to electronics, and slapping something together and sticking it to your car may or may not work the first time out (or one or more sensors may work, but the others don't, plus noise issues from the car's electrical system, voltage spikes and sags, etc - ugly).

I think if I were doing this, I would set up each sensor with a standalone arduino (a simple ATTiny84 or 85 would be fine, I think), then communicate back to a "master arduino" via some kind of serial interface and protocol (RS-485, CANBUS or something similar would be ideal). Of course, that would necessitate more parts, more programming, more complexity, providing power for each sub-module, etc; but at least the likelyhood of the measurements coming through properly would be increased.

Just something to think about - it may be that a simple solution will work just fine; with proper routing of the wiring, and perhaps using some kind of shielded cabling between the arduino and sensors, along with either some very good filtering of the power to the Arduino (or a separate battery) - there won't be any problems. I'd just do some experimentation first...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up