| Electronics > Beginners |
| Digital signal on the +5V line? |
| (1/3) > >> |
| SlowBro:
I’d like to transmit a low bit rate half duplex digital signal from my PC to an ATMega328P with a motor 100’ (30m) away using only two unshielded untwisted wires. The device would be powered from those two wires. 1-Wire should be able do this but seems overly complicated and doesn’t seem to be able to deliver enough current for my needs. And RS485 requires three wires. Could I just add the signal to the 5V line then pull it off at the destination using a zener? And yes I am aware of the noise issues when using a non-differential signal over unshielded untwisted pair. |
| ejeffrey:
Transmitting under these poor conditions over 100' to a motor driver? I think you are gonna have a bad day. Especially since if you consider just using 1-wire "overly complicated" then I think you probably don't want to go through the design effort to do this yourself. One-wire is designed for this, but because it uses open drain signalling, the power available is fairly low since it has to go through the pull-up resistor. Do you need bidirectional half-duplex, or is unidirectional signalling OK? With unidirectional signalling you could just use a totem pole output on the master for higher current, and size an appropriately big capacitor on the receiver to supply power when the signal is low. You can look up how 4-20 mA current signalling in industrial systems work -- that is similar to what you want to do. Also, current mode signalling eliminates a lot of the noise problems with unshielded pairs. If you want to almost completely separate the power delivery from the signalling you can use a standard 5V regulator, but then AC couple your signal in and out via a bias tee (capacitor + inductor) at each end. You need to use signalling that is DC balanced such as manchester encoding. This allows potentially very high bandwidths and is how e.g., powerline networking works. |
| SlowBro:
By the way, I said Arduino but I meant an ATMega328P. Will edit my OP. --- Quote from: ejeffrey on May 24, 2018, 05:25:09 pm ---I think you probably don't want to go through the design effort to do this yourself. --- End quote --- Not true. I was considering the zener circuit at the same time, and 1-Wire seemed overly complicated compared to that. But also as mentioned, the current problem. I'd be willing to design a system 1-Wire if it really is the best choice. --- Quote from: ejeffrey on May 24, 2018, 05:25:09 pm ---Do you need bidirectional half-duplex --- End quote --- Yes I do. --- Quote from: ejeffrey on May 24, 2018, 05:25:09 pm ---You can look up how 4-20 mA current signalling in industrial systems work -- that is similar to what you want to do. Also, current mode signalling eliminates a lot of the noise problems with unshielded pairs. --- End quote --- Can 4-20 deliver more than 20mA to charge a capacitor? The motor doesn't need to run very long, about 30 seconds, twice a day, and uses about 300mA when running. Maybe an appropriately-charged capacitor could work? Or maybe it could be 4-500mA? (Motor + ATMega + whatever else.) --- Quote from: ejeffrey on May 24, 2018, 05:25:09 pm ---If you want to almost completely separate the power delivery from the signalling you can use a standard 5V regulator, but then AC couple your signal in and out via a bias tee (capacitor + inductor) at each end. You need to use signalling that is DC balanced such as manchester encoding. This allows potentially very high bandwidths and is how e.g., powerline networking works. --- End quote --- Off to Google bias tees and manchester encoding. Do you have an example circuit? Edit: Okay, here's one. By the way, this application can tolerate low baud rates. 300 bps is not too low. And I could also use CRCs, resend on failure. Hence I am not terribly concerned with noise. |
| SlowBro:
I'm liking the idea of using a current loop. Maybe not 4-20 but some other current scheme e.g. 20-50mA or something like that, to permit the ATMega to run 24x7. I could put the motor on batteries and use the current loop for powering the ATMega. The MCU needs to be on at all times, but the motor does not. Six AAs should give me enough juice for about six months of operation. But I would prefer the neat+clean of just running a pair of wires. |
| SlowBro:
Knowing what to Google is valuable. I didn't know the right term, but I do now. For those who may have the same question, search these terms: * Digital over two wires * Two wire power and data * UART over DC power * Data over DC power I really like this solution. Edit: Ah no. It’s only simplex. https://electronics.stackexchange.com/questions/194452/very-simple-signalling-over-12v-dc-power-wire |
| Navigation |
| Message Index |
| Next page |