Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Netduino RS-485 Pelco-D protocol


  • Please log in to reply
1 reply to this topic

#1 Nick Holt

Nick Holt

    New Member

  • Members
  • Pip
  • 1 posts

Posted 27 November 2012 - 08:50 PM

Ok, so let me start out by saying I'm having so much fun playing with Netduino and i'm getting a ton if info from this forum so i appreciate you guys very much. Also i'd like to add that I have no idea if what i'm talking about is even possible, or how much trouble it would be. Just thought i'd post it and see what happens anyhow.

I've recently built <a href="http://forums.netdui...d-app/>this</a> project, and I've got it all working pretty well!

It was for a client who operates an impound lot here in town. His gate is controlled by a glorified garage door opener. Sometimes, insurance adjusters need to get in while he isn't there, and with this app he can open the gate from anywhere.

I've also installed some security cameras for him, and we put in a 22x PTZ camera that he plays with constantly. The PTZ camera receives commands from the iPhone app through a dvr that communicates over RS-485. So when someone needs in, he opens the android app, opens the gate, exits the android app, opens the DVR app, and watches them while they're inside. Which brings me to my idea...

What if the Netduino+ could receive RS-485 commands? The app has several functions that the camera doesn't support, like iris adjustment for instance. So, if i could somehow "read" what that command was and assign it to the Netduino+, then have it open the gate, he could open the gate straight from the android app without having to switch back and forth.

Actually, i'll probably use one of these:
http://www.ebay.com/...y-/130346129177

Edited by Nick Holt, 27 November 2012 - 09:15 PM.


#2 DaveRVW

DaveRVW

    Advanced Member

  • Members
  • PipPipPip
  • 37 posts

Posted 28 November 2012 - 05:35 AM

Receiving 7-bit or 8-bit RS-485 at a supported baud rate is pretty straightforward. Just wire up a MAX485 or similar to be always receiving, with the data out wired to D0 (Netduino's RX) for receiving as serial input. Then code up your stuff on the Netduino using a SerialPort object that is looking for available data. If you are just receiving, and the data format is known this should be simple.

If you need to send data back, that is more tricky, because you need to activate the transmission, but release it soon enough to be listening again. If the protocol is straight forward and only 7-bit or 8-bit, you may be able to use a standard RS-485 shield designed for Arduino.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.