Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

300 baud data over 12v power

Status
Not open for further replies.

dr pepper

Well-Known Member
Most Helpful Member
I need to have a pic communicate with another pic over 10 meters of bell wire powering the transmitting end with the same wire.
So I 'borrowed' the data transmission and power suppy regs from this vellema circuit (schematic at the end):

https://www.electro-tech-online.com/custompdfs/2013/02/illustrated_assembly_manual_k8023.pdf

I'm transmitting 300 baud rs232, the rs232 is modulated on the power line by switching a 220 ohm resistor accross 12v, and picked up by a current sensing resistor and tranny at the receiver/power supply end.

It works on some characters but not others, seems to be corrupting, even with a 12" croc clip cable.

Any ideas how I can improve the circuit, or any links to a better idea for transmitting data over 12v power without a box of components.
 
That seems pretty simple - what EXACTLY is at your transmitting end?, the design works by it being very low current until the 220 ohm is switched in - can you scope across the 22 ohm in the receiver and see what the relative voltage drops are.
 
I think I found it, being short of i/o I used this to get 2 switch inputs onto 1 pin:

gate bsf status,rp0 ;setup for portb,7 as o/p
movlw b'01110000'
tris portb
bcf status,rp0
;
bsf portb,7 ;set bit 7
btfss portb,7
goto lowp ;clear so low switch must be on
;
bcf portb,7 ;clear bit 7
btfsc portb,7
goto hip ;still set so high switch must be on

Setting a pin high, seeing if its shorted low, then setting it low and seeing if its shorted hi is a crafty way of getting 2 i/o's on one pin, however when the other end of the line is monitoring data superimposed on the current shorting a pin against its will isnt good - current spikes caused by this are messing up the receiver.

Need to find another way to get an extra input without going analogue.
 
Sussed it, mux'd an o/p for an led, works well now.

The tx has led's, had to incresase the limit resistor to burn the led's a bit less so as not to upset the demod.

The sites still been usefull, good to have a sounding board.
 
Yep.

The interface works really well, for a couple of trannys 100meter or so data over power is cool, wish I could have done that when I was 13, would have made a cool slot car system.

What software package would you reccomend for posting schematics, I use design spark which doesnt as far as I know produce bmp or site compatible images.
 
Yep.

The interface works really well, for a couple of trannys 100meter or so data over power is cool, wish I could have done that when I was 13, would have made a cool slot car system.

A slot car is somewhat of a more hostile environment, and wouldn't work using that method - there is a system for trains though, which you can do with a PIC, that provides individual control on the same track.

What software package would you reccomend for posting schematics, I use design spark which doesnt as far as I know produce bmp or site compatible images.

I use sPlan for circuits, and Lochmaster for vero layouts, and export the pictures.

Doesn't really matter now as you've sorted it :D
 
Yep.

The interface works really well, for a couple of trannys 100meter or so data over power is cool, wish I could have done that when I was 13, would have made a cool slot car system.

What software package would you reccomend for posting schematics, I use design spark which doesnt as far as I know produce bmp or site compatible images.

Details, Details, man. What does the data do on the other end? Is it just running lights or is it running the motor, slowing, speeding up etc.

Working at a Shooting Range Company, they used 700v on a Trolly System. (Like at a ski resort.) The 100yrd steel cable ran through a toroid the cable was charged to 700v and at the Trolly stepped down to power a 12v motor and a light for shooing at night.

The Motor on the Trolly, would edge (Not facing the Shooter) then Target would turn facing the shooter then edge, and reverse face to show a non lethal and edge etc.

Operators in a booth could control the system or it was programmed to deliver varying stages, it was all rs232.
 
Last edited:
Doing a bit of searching DCC seems popular for model trains, where a squarewave is applied to the track, and the ac cycle lo/hi width modulated to provide data, presumably manchester encoded to keep the average dc zero so you can use standard motorised trains.
An interesting idea and I'll remember that for future ref, the current modulated rs232 system will do fine for my needs and needs little code or hardware.
I've installed siemens asi bus safety network systems on some of the machines I maintain, you can put severla stop buttons, light curatins and devices all on the same net which comprises of just 2 wires, that probably uses a similar system, only one thats certified to the required silly levels for safety gear.
 
Doing a bit of searching DCC seems popular for model trains, where a squarewave is applied to the track, and the ac cycle lo/hi width modulated to provide data, presumably manchester encoded to keep the average dc zero so you can use standard motorised trains.
An interesting idea and I'll remember that for future ref, the current modulated rs232 system will do fine for my needs and needs little code or hardware.
I've installed siemens asi bus safety network systems on some of the machines I maintain, you can put severla stop buttons, light curatins and devices all on the same net which comprises of just 2 wires, that probably uses a similar system, only one thats certified to the required silly levels for safety gear.

I was just an assembler, manufactured the Toroids and special transformers. The main Trans 700v was purchased to spec. Developers Engineers and Programmers did the rest and I loaded all the chips with their designs.

The signal was encoded sent through the cable and decoded at the Trolly. Only the keypad and Computer controllers were rs-232. I do know the control board hooked to the power board was zero Cross, pulse width modulated.

But, I think that was to control the light in the shooter booth. It was setup as a dimmer control I think there were 10 steps. Low to High.
 
I need to have a pic communicate with another pic over 10 meters of bell wire powering the transmitting end with the same wire.
...

Unless you are forced to use 2 core cable, there are tons of sources of very cheap 4 core and >4 core cable, for a couple of projects I have used a 20 metre telephone extension lead (4 core) which you can often buy on special for as low as $2.95.

Having cheap 4 core cable on hand means it easy to run two wires for power and two for comms, even bidirectional USART etc.

And congrats on getting your comms over the power wires, it's a cool way to do it too.
 
I have bell wire plastered into the walls, and I would like to use it instead of chasing out nice new wallpaper.
I've been testing the project using some cat 5, one twisted pair joined up as one conductor and another pair as the other - to try and defeat the benefit of being twisted.
Its all over the house, wrapped round as many interference sources as possible, it works well, the wife and the dog are getting tangled up in it so I'd better pack it up now.

Been reading more on DCC, seems like a good system, looks very much like fsk.
I think a Manchester coded version of rs232 would work just as well, with listening points between bytes for half duplex like dcc.
A project for the future, I'd like to send data down an electric fence, to control said fence and operate electric fence cattle gates (just a big spring with a solenoid release connected to the fence).
 
Last edited:
ive got a train set that uses DCC there a few different types that basicaly work the same. there is also one that MERG (model electronics railway group) do that is based on CAN bus. i have tried a few times to get data over power to talk to my trains, i wanted to put a pic in a train and use DCC to talk to it but i cant get it to work. not that i have given up. the main problem with the different DCC systems is they do work with each other each is slightly different.
 
ive got a train set that uses DCC there a few different types that basicaly work the same. there is also one that MERG (model electronics railway group) do that is based on CAN bus. i have tried a few times to get data over power to talk to my trains, i wanted to put a pic in a train and use DCC to talk to it but i cant get it to work. not that i have given up. the main problem with the different DCC systems is they do work with each other each is slightly different.

A long, long time ago, Maplin did a kit based on a PIC for adding DCC to trains.
 
i will need to read how you put a square wave over AC. i will have a look at maplin might have been a velleman kit in wich case i should be able to find it :D
 
i will need to read how you put a square wave over AC. i will have a look at maplin might have been a velleman kit in wich case i should be able to find it :D

No, it was long before Maplin did Vellman kits.

I've probably still got the magazine somewhere that it was featured in (The Maplin Magazine), but finding it would be a different matter, and I don't think they provided the software listing.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top