Wiring a ultrasound sensor (HC-SR04) to a spark max break out board?

Is it possible to wire an ultrasound sound sensor, or a beam break, to a spark max break out board?

I don’t think you can use the Spark Max with any arbitrary sensor like that. Are you having trouble using it with the roboRIO?


No we were just trying to reduce the distance we had to run the wires on the arm of our robot

1 Like

Spark Max accepts an analog input. Does your US sensor put out analog in the range that is useful to you and the SparkMax can accept?

Analog Input

The Analog Port on the SPARK MAX can measure voltages up to 3.3V with 12-bit resolution. The SPARK MAX Data Port Breakout includes a 5V to 3.3V amplifier circuit so that 5V signals can be sensed with the Analog Input pin.

Analog input is supported on firmware versions 1.4.0 and newer.

You have to watch the current draw for anything you power off of the SPARK MAX. This type of sensor often draws a big spike of current, so you might need to include a capacitor if you were to attempt this. It’s most likely not worth the trouble. Are you using this for a limit switch, or anything else that the SPARK MAX is using for feedback?

As a rule, I avoid powering devices from any source that is not on the same power feed as where the I/O signals are going. This is to avoid ground loops, unintended power feeds, and possible problems with exceeding ratings due to voltage drops.

I would stick with plugging the sensor into the roboRIO, the amount of effort to run the wires from the roboRIO will be a lot less than trying to figure out how to make the connection to the Spark Max work.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.