![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
A way to transmitting sensor signal 5 meter. |
Posted: Sun Jun 19, 2016 7:46 am |
|
|
A simple and cheap way to transmitting sensor (5 byte for about 5ms) signal 5 meters.
I use a SI700x sensor for reading Degree and RH. I have the sensor on a tiny sensor board I made, a pic and some other components.
The signal is feed back to my main unit there transmit it to a server on GPRS.
All it beta tested, therefore the wire is only 30cm at the moment.
My doubt is the 5 meter from the sensor board to the main unit.
I think 3.6v over 5 meters will be real sensitive for noise, the sensor hoard is supplied with 5v but the SI700x and the pic is running 3.3 or max 3.6v. I think it is too low signal to transmit 5 meter.
As for now the sensor board and the main board use my own slow custom one wire protocol (5 byte for about 5ms), with CRC check. It is in beta state and can be changed.
There is no money for a RSxxx or other high voltage or high current, or a differential solutions. The solution must be clean, simple and cheap.
Any hints on that. |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9177 Location: Greensville,Ontario
|
|
Posted: Sun Jun 19, 2016 8:33 am |
|
|
RS-485 transceivers do a great job....... |
|
![](templates/subSilver/images/spacer.gif) |
newguy
Joined: 24 Jun 2004 Posts: 1903
|
|
Posted: Sun Jun 19, 2016 9:31 am |
|
|
How many wires between sensor board & main (receiving) unit? Can either the sensor board and/or the main board be changed (hardware change) or are you looking for a software solution to your existing hardware?
I agree that a 1-wire type of solution (thinking about the classic Dallas Semiconductor 1-wire protocol) would be rather pushing it for 5m, but in all honesty, a 3.3V signal being sent 5m is not a problem if it was a traditional "driven" signal. ....Particularly if you slow down the data rate (if necessary and only if you run into problems).
Because you mention a 1-wire type of protocol, I take it that the master initiates the transfer. I'm going to assume that there's only 1 sensor on each data line. How about this:
- master initiates a request to the sensor by asserting the data line low for a "long" time - maybe 20ms. Master then stops driving the data line and starts listening to it (changes from driving it as an output to making it an input).
- sensor's default state is to make the data line an input.
- sensor periodically polls the data line. If it's low, then a reading has been requested.
- sensor schedules a reading to be transmitted on the data line 30ms from when it has detected that line low.
- data is sent in traditional/standard UART format, including a checksum of some sort.
- after sensor transmits the data, the sensor reverts to the data line being an input, and starts periodically polling it again.
You will have no problems getting a standard 3.3V level signal 5m using this technique for even relatively "fast" baud rates. My gut tells me that ~50-ish kBaud should be readily achievable, perhaps even faster. Depending on the environment, you may find in practice that noise will force you to reduce the speed. |
|
![](templates/subSilver/images/spacer.gif) |
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
|
Posted: Sun Jun 19, 2016 10:24 am |
|
|
@newguy. Just like what you describe it work. I will try it out over 10 meter on a cheap cat5 cable. The transmit protocol is homemade but work as you describe. In next week i run some field test. |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9177 Location: Greensville,Ontario
|
|
Posted: Sun Jun 19, 2016 5:52 pm |
|
|
Ok, I re-read your post...missed the 'can't use RSxxxx' line..., heck it's 33*C here and been a long day....
so
Option #1. Have a look in the FAQ section of the CCS C manual. They had/have a page about PIC to PIC using 1 wire, using 'serial communications'. It might actually work for you.
My energy control systems are true ONE WIRE(NOT DS at all) and very low speed... 24 Baud (yes 24 bits per second). data stream is 22 bits including starts, adrs, datain, dataout, stop, so your 5 bytes in 5 ms is 'fast' to me !
Twisted pairs like Cat5 will work for you, take 1/2 hour, wire it up and test. Now if you can use CAT5 premade cables, just buy the PCB connectors for easy, reliable communications. However... even simple 'stereo' mini phone jacks/plugs and shielded 2 C+Shld cable should work fine.
The big concern is the environment. Mechanical connections, what happens if cable unplugs, gets shorted, etc. Cost of the 'connections' can be high !
Jay |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|