Minimum hardware to amplify K8055 analogue outputs?

Hi Jan,

Whatever you find interesting, go ahead. I found an article on Push-Pull amplification :-

http://en.wikipedia.org/wiki/Push-pull_output

Do you consider a Push-Pull solution worth investigating?

It would be great if you will send me a p.c.b. solution to try this end. My address is in the website I mentioned where you found the Word document.

There is a SparkFun TB6612FNG single component motor driver solution that you might not have come across. I bought one but spoilt it by not obeying the static precautions!

Did you come to Britain this year?

regards,

John

John,

that push-pull circuit may be used instead of the relay to reverse the direction. But as you can see it requires a power supply with +V and -V. Do you have that sort of power, or do you just have a simple DC +12V supply?

No, I didn’t come to Britain this year. There was a conference I would have liked to go to in Cambridge, but unfortunately it wasn’t in the budget.

The sensitivity to static electricity is what I don’t like about MOSFETs. Bipolar transistors fit IMHO better into my pile of experimenting parts.

Regards,
Jan

Actually, why do it again? The solution was already posted on page two of this thread.

viewtopic.php?f=3&t=8365&start=15#p32143

Regards,
Jan

Edit: Point to correct post on second page. The first one doesn’t work.

John,

I have a question. What is the average duty cycle, you expect this circuit to run on. Good engineering would dictate to plan for 100%, but realistically one doesn’t run model train locomotives on 100% power for long (my old Märklin trains would have derailed on turns and switches at full speed anyway).

I finally found some suitable test equipment. An Ozark-Trail Quick Fill Air Pump, rated 12V and 6.5A (was sitting in the basement all the time). I built a test circuit on breadboard with a TIP142 NPN power transistor and ran it off my Jump-Start battery for 30 minutes at 80% duty cycle. Things got hot, but nothing overheated. A wiring mistake did cost me a BC337, T1 on the K8055 … no big deal, easy to replace. I’m just saying this because you mentioned damaging things yourself before. This happens to all of us. As we Germans say, “he who claims never having spilled a beer, doesn’t drink beer”.

The power transistor definitely needs a heat sink, and the 150 Ohm base resistor rated 1W is … well, let’s say uncomfortable to the touch. 150 Ohm at 12V is almost 1W. The TIP142’s datasheet says the voltage drop at 5A is about 2V, which means it needs to get rid of another 10W.

All that means that the circuit I have works, but needs to be installed in an open, ventilated area, not boxed in. I’m just wondering if I should go with the small or the big heat sink.

Regards,
Jan

Jan,

80% duty cycle seems on the high side - I’d have thought not less than 50% but apparently you have something that works and that is good. Certainly use a heat sink, I’d say.

If you know how to upload drawings onto the Velleman website I’d be interested to see your solution and so, I’m sure, would others. Otherwise as I mentioned, my website www.traincontrol.co.uk will provide an e-mail link to me directly. I don’t think V. should mind me mentioning this as it advocates the K8055 (and its larger and ready-made siblings) as an integral component in my train control system.

Peter Denton in England realised that Reversal can easily be accomplished by employing the spare DAC terminal DAC2 in his circuit that uses PWM1 to drive a FET. I feel that’s an important step because it’s a way of using more of the capacity in the K8055, anyway the digital outputs are all needed for driving ‘switch’ solenoids.

regards, John

Running at 80% was a deliberate stress test to see if anything overheats. 80% duty cycle means that the power transistor is delivering almost full power, but isn’t fully saturated all the time. It has to go through the linear region thousands of times per second.

50% won’t pose any problem at all.

I didn’t think of the second PWM output as a “spare DAC”. I thought that for a real implementation one would build two parallel circuits to control two separate sections of track with one card. If you want to run multiple locomotives, you need at least that number +1 of separate sections of track (assuming a classic block system). Since with this whole design there is no control logic on board of the locomotive, each section of track needs separate PWM controlled supply power.

You will also need sensors to detect that a train is on a section of track and/or is coming towards a signal so your software can ramp down the speed gradually before it comes to a stop.

If you need a lot of switches, why not add one or more K8090 to it? They come with the relays already, so you don’t need to worry about switching too much power and potentially damaging the digital output ports of the K8055.

Regards,
Jan

Hi Jan,

Seems like you have the motor amplifier sorted. My advice is that it isn’t possible to drive two trains with one K8055 as analogue model train tracks almost invariably involve ‘common return’ and the K8055, I’m told, would need extra terminals it doesn’t have.

I’m quite happy to use the 2nd PWM or DAC2 to do the reversing solenoid as my new analogue layout is only small and I’d be quite happy to have simple ‘cab control’ consisting of two locos - one driven by turning a knob and the other by working a cursor upon a virtual knob.

If I wanted to control more locos I’d maybe buy another VM110 (ready made K8055) which would help to keep Velleman finances happy!

It would be good if you can publish the circuit and DAC/PWM reversing or send to my e-mail address.

regards,

John

[quote=“John Broadley”]My advice is that it isn’t possible to drive two trains with one K8055 as analogue model train tracks almost invariably involve ‘common return’ and the K8055, I’m told, would need extra terminals it doesn’t have.[/quote]That is correct, it won’t work for a common return system, only for a single supply one. In case of a common return you will indeed need a separate K8055/N per locomotive with the circuit at hand (Peter’s or mine). I’ll think about it if it might be possible to built a two locomotive common return circuit for the K8055/N.

[quote=“John Broadley”]If I wanted to control more locos I’d maybe buy another VM110 (ready made K8055) which would help to keep Velleman finances happy![/quote]Note that the VM110/N has an SMD PIC soldered directly to the PCB. You won’t be able to replace that like you can on a K8055/N.

[quote=“John Broadley”]It would be good if you can publish the circuit and DAC/PWM reversing or send to my e-mail address.[/quote]I’m still experimenting with different circuits/parts. I will publish something once I settle for one or the other.

Regards,
Jan

John,

after thinking a bit about the problems arising from common return wiring I believe that it is very well possible to control two locomotives with one K8055/N. And the additional components would be required even if you wanted to use multiple K8055/N cards because in the end, their grounds are connected over the USB.

Here is a good explanation of all the different wiring choices: rail.felgall.com/crw.htm . Since electronic controllers don’t like their voltage reversed, it is clear that “split potential” wiring is not going to work. So we are left with figure 3, an individual transformer+rectifier per controller. The lower part of figure 4 makes it clear that you can never connect the individual transformer poles directly, and that is what would happen if you connected them to the K8055(s). All their minus poles would be connected through the K8055, your USB hub or computer.

The way a K8055/N can control two separate control circuits is via opto-isolators. That way the part of the controller, that handles the train supply voltage, is totally separated from the K8055(s). The relay’s coil is already isolated from the contacts, so nothing to worry about there. We just need one opto-isolator per control circuit.

Regards,
Jan

John,

this would be the circuit design that should allow controlling two locomotives per K8055 and multiple K8055s for up to 8 separate controllers. I don’t have optical isolators laying around, so it is impossible for me to put a breadboard test circuit together right now. For that reason I didn’t fill in any component types or values.

“Vcc” and “GND” are connected to a small power supply that is only used to drive the opto-isolators and the relays. This can be shared between all motor controllers because it is entirely isolated from the power sources that drive the locomotives. A small 12V 1A wallwart should do for up to 8 controllers.

“+12V T1” and “0V T1” are the terminals from the first transformer+rectifier that supplies power for this circuit only.

To add a second identical circuit, a separate, independent transformer+rectifier T2 is needed. This is entirely according to the way, common return with individual transformers and transistor based controllers is described on Steve Chapman’s page. Either MOTA or MOTB could be the common return for all controllers.

Let me know what you think. I would also be interested what Peter has to say about this design.

Regards,
Jan

Hi Jan,

Unfortunately Peter has had to go abroad for several weeks on business so is unable to comment on your design.

From my point of view I’m not looking for a solution for controlling two locos from one K8055 card because PWM1 to 1 loco, 1 card is fine with reversing from DAC2.

My only interest in having a solution at all for analogue control is to cover part of the DC option in my ‘Smartrax’ software, which is no longer on a website because the response level was not worth the outlay - 2000+ visits but only a few replies telling me about problems I have now fixed or their DCC systems that will not work anyway because they use a different protocol from the European ‘XpressNet’ for which my software was designed.

There is a possibility that the K8055 card will be phased out of the DC version anyway because a British system called CBUS promoted by the MERG Organisation of which I’m a member has had its firmware modified to accept input from ‘Smartrax’ which will likely include motor control.

I’m very sorry to put the dampers on your valuable input but my object is to get users for my software and if this is more likely with a completely different product than anything Velleman does, that’s the way it goes.

In fairness to users of this site you should contact me using my e-mail address in future.

Seasons Greetings to you and a prosperous New Year.

best regards,

John

John,

I did notice that the web sites are gone. I still found your email address on the MERG site though.

One or two locos per K8055 makes little difference. The problem of the common return rail system would remain even if you tried to use one K8055 per loco. The GND of all cards will be connected via USB. For that reason the loco supply power must be isolated from what the K8055 is getting connected to. I do have a solution for that using opto-isolators. The design I have can support both configurations. One loco using PWM1 and DAC2 or two locos using both PWM and two of the digital outs. This flexibility only requires one extra transistor and another diode per motor control circuit. I will upload that final design after my main devel VM finishes upgrading to FreeBSD 9.2 (this will take several hours still).

That said, as you may have seen in another thread I discovered one more problem using the K8055N in this context. The relatively high PWM frequency of 46.87 KHz causes the protective diode to get seriously hot when using a 6.5A motor. So hot that the leads of the diode start blackening after a while. The undocumented SetPWM() function only allows to go to 1/4 or 1/16th of that. Both are audible frequencies and while the diode stays cooler, one can hear that beep coming from the motor. Hacking my Open8055 firmware a bit I found that 18 KHz would be a nice compromise. At least I can’t hear it (any more) and the diode remains at a temperature below causing 3rd degree burns. Unfortunately the stock K8055(N) cannot produce such PWM signal. This would require changes in the firmware.

At this point I believe that using a K8055(N) for anything >2A isn’t going to work well. Since the K8055 is no longer available, any “solution” would need to support the K8055N and its 46.87 KHz PWM frequency. I’ll send you an email and we may discuss alternatives off forum.

Happy holidays and “Guten Rutsch” as we Germans say
Jan

PS: “Guten Rutsch” translates to “slide well”, a German idiom meaning “get well and smooth into the new year”.

Hi Jan,

What you say is very sensible and no doubt quite true. I wasn’t thinking of controlling locos with a current draw exceeding 2A anyway but am impressed that you have spent so much time on this topic - I still believe Velleman should offer a kit (+ readymade) covering motor amplification with respect to the K80XX family of Input/Output Experiment cards because they are so versatile and reliable - and the after-sales service is astonishing! [Are you reading this Mr Velleman?]

I have already done extensive work on single-channel computer control using a British educational box called “Smartbox IV” which used to be3 supplied to schools in the U.K. and elsewhere. It needed no electronics expertise at all but suffered from lack of reliability in model railway applications because this is a harsh operating environment not envisaged by the manufacturers (Economatics [Education] Ltd of Attercliffe Rd, Sheffield, England) although they did for a while feature VIth formers on their catalogue cover of about 1996 using a Smartbox to control Hornby trains.

The reason I wasn’t looking for more than one channel, apart from the neatness of employing both variable outputs (Peter’s design uses PWM1 for FET control to the motor and DAC2 for the reverse relay and so is, arguably, a little more sophisticated than your design which just uses a Darlington array - but not much more) is that a feature of model railways known as ‘cab control’ where (in its most basic form) variable motor power is supplied to a bank of DPDTCO switches, which then supply track sections so you can set up a route for one loco keeping to the same knob throughout.

I used a DPDT toggle switch to changeover from computer control to variable transformer control thus enabling manual control or automatic train control on one channel. Greater sophistication i left to others more interested in the more sophisticated ramifications of model train control.

As I have said, and thankfully without offending you, the Velleman element may disappear from my software but it may not! I’m in the hands of fate as are we all.

Once again, Merry Christmas and a Prosperous New Year to all readers and I sincerely hope to continue this dialogue by e-mail with you, Jan, later on and off site.

regards John Broadley M2273

Hi John,

I am neither offended nor disappointed. Electronics is a hobby of mine. Solving these problems is how I keep learning new stuff. Designing circuits for use with milliamps allows one to be rather sloppy. Going for 5A or more requires a much more careful design (the circuit below actually works with a 6.5A motor). And I get more ideas from doing this. I now know that I definitely want my Open8055 firmware to support arbitrary PWM frequencies, since I learned that for this application 18 KHz would be the best compromise.

Anyhow, here is my final design. It allows to use either the second analog port or a digital port to control the relay for reverse. And it is actually capable of controlling multiple locos on a common return rail system.

Regards,
Jan

Hi Jan,

This is astonishing. I will place it before Peter next January when we have our first meeting of 2014 of the Yorkshire Area Group of the Model Electronics Railway Group at Doncaster (where else if it was good enough for “Flying Scotsman” and “Mallard” to be born) Signal School, Network Rail.

regards and seasonal wishes to all,

John