Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Programming Bulletin 873M Ultrasonic Analog Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=154000)

FRC Team CC 20-01-2017 22:53

Programming Bulletin 873M Ultrasonic Analog Sensor
 
Hey guys. We can't find any libraries or information on programming the Rockwell Automation Ultrasonic and Color mark sensor that was available through first choice.

(http://ab.rockwellautomation.com/Sen...sonic-Sensors).

Does anyone know anything?

Thanks!

Team 6560

arichman1257 20-01-2017 23:01

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Your link doesn't work.

Are you talking about one or both of these sensors?
Ultrasonic Proximity Sensor: http://firstchoicebyandymark.com/fc17-141
Photoelectric Sensor: http://firstchoicebyandymark.com/fc17-143

These are the two Rockwell Automation sensors on FIRST Choice

FRC Team CC 20-01-2017 23:12

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Yes! sorry about that. Your links are correct. Do you know how to program it?

arichman1257 20-01-2017 23:22

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Unfortunately I do not. We are getting the ultra sonic ones from FC I'm pretty sure. Once we figure it out I'll post something here. From what I've read about these they both have analog outputs so they will both connect to the analog in pins on the roboRIO. Presumably you can declare them in the code like any other analog input device.

In the mean time I'm also hoping someone posts on here what they've found.

FRC Team CC 20-01-2017 23:27

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Ok thanks

efoote868 20-01-2017 23:54

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
I'm a little surprised that anything Rockwell doesn't have a 300 page manual associated with it...

Anyhow, if you click the ultrasonic sensor link on AndyMark's website, you'll be taken to the sensor page:
http://www.ab.com/en/epub/catalogs/1...Selection.html

Which your sensor shows: Analog voltage 15…30V DC 0…10V DC 873M-D18AV300-D4

Need to give it 15-30VDC, and the output will be analog, from 0-10V DC. Since the roborio's analog in looks like it only supports 0-5V, you'll need to attenuate the voltage (figure out a way to safely scale the 0-10V to 0-5V) otherwise you'll risk frying the analog in ports.

Let me know if any of that makes sense, or if you need help with the circuit.

arichman1257 20-01-2017 23:57

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Quote:

Originally Posted by efoote868 (Post 1634314)
Need to give it 15-30VDC, and the output will be analog, from 0-10V DC. Since the roborio's analog in looks like it only supports 0-5V, you'll need to attenuate the voltage (figure out a way to safely scale the 0-10V to 0-5V) otherwise you'll risk frying the analog in ports.

You could create a voltage divider using a few resistors.

Here's an article: https://learn.sparkfun.com/tutorials/voltage-dividers

tr6scott 22-01-2017 12:18

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
We tried a voltage divider yesterday and was not able to get it to work. We only tried some resistors we had on hand... 4.7kOhm.

Our intent was to place two resistors in series, between the sensor signal, and ground, then wire the roborio signal from the common point between the resistors and ground.

All resistors we found when wired between the sensor output and ground the sensor went into an error state, and flashed red.

Was going to post our experiences today, but saw this thread. Please let me know if anyone else has success with a simple voltage divider, and what resistor values worked, pretty please.

efoote868 22-01-2017 12:50

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Quote:

Originally Posted by tr6scott (Post 1634763)
We tried a voltage divider yesterday and was not able to get it to work. We only tried some resistors we had on hand... 4.7kOhm.

Our intent was to place two resistors in series, between the sensor signal, and ground, then wire the roborio signal from the common point between the resistors and ground.

All resistors we found when wired between the sensor output and ground the sensor went into an error state, and flashed red.

Was going to post our experiences today, but saw this thread. Please let me know if anyone else has success with a simple voltage divider, and what resistor values worked, pretty please.

Were you able to read any voltage from the sensor? Do you have a voltmeter to debug the circuit?

On the introduction page:
http://www.ab.com/en/epub/catalogs/1...roduction.html

The red LED only flashes in teach mode, otherwise it is off. What were you doing with the white wire?

FRC Team CC 22-01-2017 12:58

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
We are using the 12v, 2 amp output on the VRM and a step up converter to amplify the voltage to 15v to power the ultrasonic sensor. We are yet to test it but we will reply with the results.

FRC Team CC 22-01-2017 13:01

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Now we have to figure out how to decrease the output voltage of the sensor so the RoboRio can process it.

tr6scott 22-01-2017 13:40

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Quote:

Originally Posted by efoote868 (Post 1634772)
Were you able to read any voltage from the sensor? Do you have a voltmeter to debug the circuit?

On the introduction page:
http://www.ab.com/en/epub/catalogs/1...roduction.html

The red LED only flashes in teach mode, otherwise it is off. What were you doing with the white wire?

We tested it wrong, now that I see the wiring diagram. We thought the white was the common for the analog output. We wired the resistors between white and black, now I see we should have done, black and blue.

Will test again on Monday and Post results, and what values of resistors we used for divider.

efoote868 22-01-2017 21:24

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Quote:

Originally Posted by FRC Team CC (Post 1634778)
Now we have to figure out how to decrease the output voltage of the sensor so the RoboRio can process it.

arichman1257 provided a simple solution:
Quote:

Originally Posted by arichman1257 (Post 1634316)
You could create a voltage divider using a few resistors.

Here's an article: https://learn.sparkfun.com/tutorials/voltage-dividers

Depending on the location of your roborio and the location of the sensor, you may consider an I2C or SPI analog to digital converter (ADC) chip and creating a custom circuit solution. Analog signals and distances don't mix very well.

Let me know if you need help with this.

tr6scott 24-01-2017 07:32

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
1 Attachment(s)
FWIW we tested yesterday with two 10k Ohm resistors wired in series between the black output and the blue 0V reference, and the sensor worked fine. The junction point between the two resistors ranged from 0-5v based on sensor distance, this test was done with a 24vdc power supply and a digital voltmeter, we did not install on bot yet.

Upon a more significant review of the data sheet, there is a small note that the the analog voltage sensors require input voltage of 15v-30v, which makes using this sensor on a robot more problematic, as you don't have easy access to voltages above 12v with the current control system provided.

We will be looking at a different solution to measure distance on the bot this year.

efoote868 24-01-2017 08:42

Re: Programming Bulletin 873M Ultrasonic Analog Sensor
 
Thanks for sharing your results!

This sensor is something I'd expect to find in a factory, wired to a relatively common 24vdc supply, not on a competition robot. It probably retails for way more than anyone would imagine.


All times are GMT -5. The time now is 21:13.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi