Pages: [1]   Go Down
Author Topic: SRF485 ultrasonic ranger and Arduino Uno  (Read 782 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I recently bought an SRF485 ultrasonic ranger which I want to interface with an Arduino Uno.
I went through the technical specifications, but I am not sure exactly how to send commands to the SRF485 via the Arduino.
1) How do I send a break ?
2) Are digital pins 0,1,2 used to send/receive data to the SRF485 module?
3) If so, how would I send the commands using digitalWrite/digitalRead?
I would imagine they need to be sent serially, not with digital pins.
4) I connected A to RS485+ and B to RS485-, is that right?

Thank you.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24430
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How do I send a break ?

Quote
Break - is defined as a continuous low in excess of 22 bit periods, followed by a high of 2 bit periods. Each bit is 26uS at 38400 baud, so 22 * 26uS = 572uS, it's ok to be longer.

Why chose such an interface, when simpler ones with less rigorous specs are available?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to try this interface because of the capability of placing many sensors on one bus.
Logged

Toledo, OH
Offline Offline
Sr. Member
****
Karma: 19
Posts: 455
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to try this interface because of the capability of placing many sensors on one bus.

Good point, RS485 can support multiple devices on one bus.  But, with the high cost per sensor, it seems it would be cheaper to go with multiple SRF05's and just use hardware with more pins available.  Keep in mind that the SR04 and SRF05 can be wired to use only one pin each when used with the NewPing library.  Also, they are extremely cheap, like 1/10th the price of a RS485.

Tim
Logged

Arduino Uno - Teensy 2.0 - Teensy 3.0 - Raspberry Pi Model B w/512MB RAM
My libraries: NewPing library - LCDBitmap library - toneAC library - NewTone library

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24430
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or even I2C like an SRF02 for medium length cables.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone. So I guess nobody ever tried SRF485 with Arduino?
Also note I am using DFRobot's expansion board V5.0
Logged

Toledo, OH
Offline Offline
Sr. Member
****
Karma: 19
Posts: 455
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone. So I guess nobody ever tried SRF485 with Arduino?
Also note I am using DFRobot's expansion board V5.0

Just not popular I'm sure due to the high cost.  SR04 sensors can be purchased for <$3 on eBay.  And if your project will use multiple sensors, the difference in price is even greater.  How many sensors do you plan on having?  How many pins do you have available?

Tim
Logged

Arduino Uno - Teensy 2.0 - Teensy 3.0 - Raspberry Pi Model B w/512MB RAM
My libraries: NewPing library - LCDBitmap library - toneAC library - NewTone library

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not sure how many sensors yet. I just want to interface two for the time being for the sake of testing them.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello again,

Just making a note that I want to use the SRF485 not only because of the capability of placing many sensors in one bus, but also because of the capability of driving 3 LEDs at once.
Logged

Toledo, OH
Offline Offline
Sr. Member
****
Karma: 19
Posts: 455
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello again,

Just making a note that I want to use the SRF485 not only because of the capability of placing many sensors in one bus, but also because of the capability of driving 3 LEDs at once.

You can drive 3 LEDs with any ultrasonic sensor.  There's nothing magic about the SRF485 that allows you to use more LEDs.

Tim
Logged

Arduino Uno - Teensy 2.0 - Teensy 3.0 - Raspberry Pi Model B w/512MB RAM
My libraries: NewPing library - LCDBitmap library - toneAC library - NewTone library

Pages: [1]   Go Up
Jump to: