Hey, in my attempt to create a DCC controller, the only obstacle I'm not sure how to remove is producing a digital signal that can be either 12v or -12v capable of loads up to 5 amperes from my Arduino. Being more of a software guy, I'm not really sure how to do this.
The signal needs to be able to switch rapidly (at the fastest, every 58 microseconds, and transitions that cross the region between -4v and +4v need to occur at 2.5 volts per microsecond or faster), so that excludes relays and the like. If I have to use an external power supply (which I guess I probably do), that's okay. Op-amps looked promising for this, but I'm not sure if they're the right way to go...
I am sorry if I didn't express myself clearly. As I said, I am trying to create a DCC command station. DCC stands for Digital Command Control, which is used to control and power model trains.
The system needs to be able to power at least motors, LEDs and digital logic circuitry.
I know attempts have been made at this sort of thing before, but everything I have found has been either too complex, too general, or too german.
Yes, it is part of the DCC spec. Yes, I looked around the forum, and yes, I could widen the search. I'll keep reading, but I'm not too good at this, so I'd still appreciate any pointers.
Oh, and I'm Norwegian, actually. Still, that was a rather crude grammatical error, and has been corrected.
EDIT:
As for Richard's reply, thanks, I'll look into the H-bridge. The reason the signal is bipolar is because it transmits both power and data - it is rectified at the receiving end before being used to power anything.
A google search of 'arduino DCC controller' yielded over 3,700 hits. A DCC controller is not something a beginner would probably be successful at building from scratch. I would look for a kit that includes a PCB and all the parts, or of course a completed controller. A power supply is the least of your challenges. Here is one site that looked promising for you, but I didn't spend much time looking it over as I'm not into model RRing.
As for Richard's reply, thanks, I'll look into the H-bridge. The reason the signal is bipolar is because it transmits both power and data - it is rectified at the receiving end before being used to power anything.
Bipolar is probably not the correct term to use. A bipolar supply is a dual voltage output referenced to a common terminal (sometimes called ground) and has three terminals, positive, negative, common. The DCC uses a 12 volt DC PWM that reverses polarity for the forward and reverse of the train drive motors. Note that there are only two wires to the tracks, so not a true three wire bipolar setup, just polarity reversal, which a H-drive does using a single polarity DC power supply.
I am by no means a beginner in the fields of digital communications, digital logic or programming. If the problem allowed me to use 0v and 5v for transmitting data, I wouldn't have a problem - for me, the only hard part is getting the right power supply levels, namely the correct voltages and the high current requirements. That makes the power supply one of my greatest challenges
Thank you for pointing out the incorrect use of the term "bipolar."
Your best bet for power supplies where you only need one and not thousands for a production run is surplus electronic on-line stores or E-bay. Also many use modified PC power supplies that can supply both 5vdc for logic and +12volts for motors and things. There are lots of articals on the web on modding PC power supplies.
Having looked at different H-bridge designs, I have still to find a (non-IC) design that allows the control power (5v, which would be from the microcontroller) to be different from the engine power (12v). Does anyone know of any switches which would be fast enough and still allow for 5v to control 12v?
I could buy a H-bridge IC, but I have still to find one from any of my regular suppliers. If anyone knows of any in Europe, preferably near Scandinavia, I would love to hear about it.
As for the power supply, I will probably be using an old PC supply - fairy cheap, might even get an old one for free, and provides +5v and +12v. Also, I've worked with them before.
Unless I'm reading your schematic very wrong, it uses the LMD18200T IC. I don't know of any shop that sells H-bridge ICs that aren't located in America.
The only fast switches I've seen in an H-bridge is transistors, and I don't know of any way to make them control voltage. They only control current, right?
In the LMD18200 design... the 5V DCC signal is rapidly switching "DIRECTION" to create the pseudo bipolar signal containing the packet data.
I'm still unclear what you want the ARDUINO to do. The 12V source to the TRACK is not a LOGIC signal... it is a hybrid alternating polarity signal that contains the DCC information.
On the same page where that drawing came from, there is a discrete HBRIDGE design that uses more available parts:
It's the 12V SOURCE that you supply to the bridge that must carry that high current... the ARDUINO should remain well isolated from that and only supply the packet data as a digital stream...
I'm still unclear what you want the ARDUINO to do. The 12V source to the TRACK is not a LOGIC signal... it is a hybrid alternating polarity signal that contains the DCC information.
I realize that. What I want is to encode the Arduino +5 signal into a 12V DCC signal... Which seems to be exactly what those schematics you provided does.
It's the 12V SOURCE that you supply to the bridge that must carry that high current... the ARDUINO should remain well isolated from that and only supply the packet data as a digital stream...
Would those op-amps provide that isolation? Even if they don't, thanks for the great drawings!
If you don't think that H-bridges are available outside the US, then you really haven't been trying very hard. There are hundreds of people here in these Arduino forums outside America who have no problem finding all these sorts of things.
I didn't think that they weren't available outside of the US, I just don't know where to find them. I know of some electronics suppliers that sell a variety of ICs, but no H-bridge...
Then you haven't seen enough to make such a judgement.
Furthermore DCC is hardly "fast" by modern definitions.
Which is exactly why I'm asking for help And it would be too fast for, say, a relay.
Bipolar transistors are basically current amplifying devices. But we have been using them as switches and voltage amplifiers for over 50 years. It is hardly a new concept.
I will be looking up transistor voltage amplifiers, although I suspect that's what I'm seeing in the above drawings.
Are you "simply" trying to superimpose an RS232 signal onto a motor control circuit - if so you might not really need to meet the power switching demands you are asking for; or do you really need to meet the power switching rates you specified
If you only want to superimpose a signal then this can be relatively easily accomplished using techniques that are typically used to transmit digital control signals over the AC mains power system