Log in

View Full Version : Maxbotix Sonar Testing


nadya1196
26-01-2012, 17:28
So we have been attempting to get a sonar working on our robot this year, and well we've run into a problem. We wired it by cutting off the male end of the pwm. Then we soldered it black to ground, red to +5, and white to AN (analog).

We looked through their diagrams and information for the maxbotix sonar and we figured out that if we tested it with the voltmeter, it would show about 9.8 mV per inch, but when we tried actually testing it, we couldnt get it working. Any suggestions?

billbo911
26-01-2012, 17:54
Are you using the example code to test it? If so, are you receiving anything on Analog 1?

Keyreaper
26-01-2012, 19:54
Our team has problems with the sensor as well, eventually we just fed the signal/voltage wire (AN Pinout) from the ultrasonic straight to PMW slot one on the analog controller and just pulled the voltage from there, and scaled the output accordingly to get the distance it was reading.

nadya1196
26-01-2012, 22:01
Actually we are testing it by just using the voltmeter to test if our sonar works in general. We might try running code just through the analog. It is currently plugged into one of the pins that are on the analog breakout in the cRIO. We read that we can get 5 volts from there. So in general, we arent getting any readings when testing if our sonar works.

otherguy
26-01-2012, 22:49
Actually we are testing it by just using the voltmeter to test if our sonar works in general. We might try running code just through the analog. It is currently plugged into one of the pins that are on the analog breakout in the cRIO. We read that we can get 5 volts from there. So in general, we arent getting any readings when testing if our sonar works.

Have you wired 12V to the analog breakout board as shown in the wiring diagram here (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2012_Assets/Robot%20Power%20Distribution%20Diagram%20%2812V%20 Solenoid%29.pdf)?

This connection is required to drive the 5V supply on the board.

nadya1196
30-01-2012, 10:36
Yes we have wired the 12v to the analog breakout, and we have measured 5v coming out of it, but it still doesnt seem to be working.

DonRotolo
30-01-2012, 22:38
OK, so you have +5 V at the "+5V" pin, and Ground on the GND pin, and using a voltmeter between the AN pin and GND you are not seeing any DC voltage, even though the target is, say, around 5 feet away? You should be reading about 0.060 volts for 60 inches.

BitTwiddler
30-01-2012, 22:59
Actually we are testing it by just using the voltmeter to test if our sonar works in general. We might try running code just through the analog. It is currently plugged into one of the pins that are on the analog breakout in the cRIO. We read that we can get 5 volts from there. So in general, we arent getting any readings when testing if our sonar works.

If this is the EZ-1 you might check on this tidbit I got from the datasheet.
RX – This pin is internally pulled high. The EZ1 will continually measure range and output if RX data is left unconnected or held high. If held low the EZ1 will stop ranging


Use your voltmeter to ensure that the RX pin is indeed being pulled up.

BitTwiddler
30-01-2012, 23:13
OK, so you have +5 V at the "+5V" pin, and Ground on the GND pin, and using a voltmeter between the AN pin and GND you are not seeing any DC voltage, even though the target is, say, around 5 feet away? You should be reading about 0.060 volts for 60 inches.

Don,
from the datasheet - Outputs 0- 2.55 volts with a scaling factor of 10mV per inch.
That would make it read 0.60 Volts for 60 inches.