Completely OT, any electronics advice?

Little or nothing to do with distillation.

Moderator: Site Moderator

Post Reply
User avatar
Steve Broady
Distiller
Posts: 1433
Joined: Thu Aug 25, 2022 9:52 am
Location: NC Piedmont

Completely OT, any electronics advice?

Post by Steve Broady »

This has nothing to do with distilling (at the moment— you never know how knowledge might be useful in the future), but I know there are some really smart people here who know a buttload about virtually anything you can imagine. So hopefully someone can point me in the right direction.

I’m working on a homebrew circuit to control lights for my young son’s Lionel trains, based on track polarity (I’ve converted them from AC to DC). My circuit works well on the bench, but with the motor connected I see some intermittent activity on the reverse side of the circuit which makes me think I’m seeing a fair bit of BEMF from very basic motors. I don’t know enough to mitigate that, and searching on line yields mostly information about how to use BEMF in a DC motor control circuit, which is not what I need. I don’t want to use it, I want to eliminate it. Blindly throwing various ceramic capacitors at the motor leads did not solve the problem, surprisingly.

I would be very grateful for any pointers to web resources where I can learn more, or of course anyone who wants to discuss things in more detail either publicly or privately.
Learn from the past, live in the present, change the future.
User avatar
Steve Broady
Distiller
Posts: 1433
Joined: Thu Aug 25, 2022 9:52 am
Location: NC Piedmont

Re: Completely OT, any electronics advice?

Post by Steve Broady »

lionel_circuit.jpg
This is the circuit I'm working on. I'm posting it here mostly because I cannot seem to add an attachment to a PM, so I figured I'd try this.
Learn from the past, live in the present, change the future.
User avatar
Yummyrum
Global moderator
Posts: 8920
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Completely OT, any electronics advice?

Post by Yummyrum »

To get things straight .
Are you using a PWM controller ?

In your diagram , are pin 1. & 2 connected yo the track and also go direct to motor ?

Is the purpose of the light controller to make the light n each end of the train change depending on direction it’s travelling ?

What is connected to the 8pins connector ?
I assume the lights or LEDs?
But what is connected to what ?
User avatar
Yummyrum
Global moderator
Posts: 8920
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Completely OT, any electronics advice?

Post by Yummyrum »

I’m also assuming that either Q1 or Q2 turns on depending on track polarity . But I also guess that the transistor turns on for the “On” period of the PWM .

Thinking maybe a capacitor across the Base and emitters might help bypass any quick commutation hash but also have the transistor stay on instead of switching in time with PWM

Regarding the Back EMF . You could try adding a suppression coil next to the motor . The inductance stops the high frequency of the spike getting back .
A lot of motors i. Audio equipment used to have a tiny toroid feeding the motor with caps across the supply leads and motor connections

On the actual controller itself , are there Diodes from the output to each supply rail to clamp any spikes ?
User avatar
Steve Broady
Distiller
Posts: 1433
Joined: Thu Aug 25, 2022 9:52 am
Location: NC Piedmont

Re: Completely OT, any electronics advice?

Post by Steve Broady »

Yummyrum wrote: Sun Nov 24, 2024 4:14 pm To get things straight .
Are you using a PWM controller ?
Nothing that fancy! It’s a Lionel transformer (variable AC, 0-20V, up to 10A on the largest version we have) with a bridge rectifier on the output. So it’s 60 Hz AC rectified and run through a DPDT for direction.
In your diagram , are pin 1. & 2 connected yo the track and also go direct to motor ?
Correct. I apologize, the diagram was never meant for publication. It’s just my rough scratch of an idea, good enough to use to have a PCB printed.

On the 4 pin connector on the center, pins 1 & 2 go to the track, and there is also a very basic motor in parallel with this circuit. The motors are mostly universal AC motors with a field winding in series with the commutator. I’ve converted them to DC by putting either the field or armature on a bridge rectifier and leaving the other in series. Not sure if that matters or not, but for the sake of completeness.
Is the purpose of the light controller to make the light n each end of the train change depending on direction it’s travelling ?
Exactly. Or in some cases to change color, by having both red and green LEDs in the same housing. I’ve also added the trim pots so that I can have lights which alternate between full and partial brightness, rather than on and off.
What is connected to the 8pins connector ?
I assume the lights or LEDs?
But what is connected to what ?
Yes, LEDs all around. Though I suppose I could run any 5V load within the limitations of the transistors.

Pins 1-4 are directional outputs that are either on or off. Pins 5-8 are directional and either bright or dim, with variable brightness for the dim setting via the trim pots.
Learn from the past, live in the present, change the future.
User avatar
Yummyrum
Global moderator
Posts: 8920
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Completely OT, any electronics advice?

Post by Yummyrum »

Thanks for the extra info Steve .
Thats quite the modification .

I still think I would try a capacitor across the base and emitter of the transistors . It will form a low pass filter which will prevent the high frequency hash from the motor causing false triggering . Maybe try around 100nF .

Also while you are at it , put a resistor of around 10k across the Base emitter of each transistor .. it is not normally done to just have the base driven via a single resistor.

I know you are invested in this circuit . But I’m seeing that at low speeds , the lights are not likely to work until the peak track voltage gets to about 8 volts .( 1.2 - 1.4v drop in the bridge rectifier , + a couple of volts headroom on the 5v regulator )


If it were mine , I would make a PWM controller . That way , even at the slightest application of power , the peak track voltage is say around 12-15volts . ( obviously its a very quick pulse of 12-15v but rectified and charging a cap , basically you have the full voltage available )

It would make lighting very simple . A diode feeding a capacitor to run the lights in each direction.

Also PWM makes the train behave much smoother at low speeds . Old rheostats do nothing as you wind them up , then suddenly , the train takes off like a startled rabbit .

PWM works better because the motor is getting bursts of full voltage . It makes it much more torquier at low speeds .

Incidentally I did play with electric choo choo’s when I was younger . Always hoped to get back into it .

DCC has always tickled my fancy . The cost not so .

:
User avatar
Steve Broady
Distiller
Posts: 1433
Joined: Thu Aug 25, 2022 9:52 am
Location: NC Piedmont

Re: Completely OT, any electronics advice?

Post by Steve Broady »

Thank you so much for the advice, Yummyrum. It is greatly appreciated, and I will most definitely be trying it wherever I get a chance to play next. The modifications I’ve made have been surprisingly minimal for the most part, although I’ve gone overboard on a few just for the hell of it. Kids seem to like lights, and it’s a simple form of animation. I started replacing the light bulbs with LEDs because I didn’t have any bulbs handy and don’t like changing them, and the DC is mostly for direction control and quieter running.

I have to admit, even though I know how the magic works, watching the tiny market lights change from red to green when the train reverses is still fun for me. Part of me is just amazed that something I designed and built actually works like it’s supposed to!
IMG_6553.jpeg
IMG_6554.jpeg
Regarding the minimum voltage, these old motors don’t even start moving until they get at least 5V. In fact, a lot of the old Lionel transformers don’t even go below that, since there’s no point. So in practice, I’m able to get away with a bit of a cheat here. Usually, the lights come on well before anything starts moving.

I played with PWM in HO scale quite a while ago, for all of the reasons you mentioned. I probably won’t bother here simply because a 10A PWM control is probably overkill for these old trains. Smooth running is not something that 75 year old Lionel trains are known for no matter what you do. :lol: And yeah, DCC is the bees knees, but way more expensive than I want to mess with for a young boy’s toys. If he’s still into it when he’s older, that’s a different subject.
Learn from the past, live in the present, change the future.
User avatar
Yummyrum
Global moderator
Posts: 8920
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Completely OT, any electronics advice?

Post by Yummyrum »

Thats a sweet old train set Steve .
Is that gonna be a boys Xmas gift ?

Don’t recall Lionel being available when I was a youngster in NZ , but I remember a few 3 rail tracks . I guess it took the plastic industry a few years before train set companies could make insulated wheels and switch to two track without the need for the centre rail pickup .

How olds is it ? Is that O gauge ?

That is was originally an AC train is interesting .
Do you think it was a technology thing at the time ?

My old Hornby controller was DC but had a Selenium rectifier in it .

Cool topic.
User avatar
Steve Broady
Distiller
Posts: 1433
Joined: Thu Aug 25, 2022 9:52 am
Location: NC Piedmont

Re: Completely OT, any electronics advice?

Post by Steve Broady »

Yummyrum wrote: Tue Nov 26, 2024 12:26 am Thats a sweet old train set Steve .
Is that gonna be a boys Xmas gift ?
Absolutely! Early this year I gave him all my old trains from when I was a kid, but he’s complained (as only a 5 year old boy can) that he doesn’t have a matching passenger train. So I scrounged up a bunch of old stuff off eBay, made a few repairs, painted it, added lights and a few special touches, and he’ll find it running under the tree on Christmas morning.

If anyone has wondered why I haven’t been making as much booze lately, this is why. I’m putting most of my free time into getting this done for him.
I guess it took the plastic industry a few years before train set companies could make insulated wheels and switch to two track without the need for the centre rail pickup .
Believe it or not, there were 2 rail electric trains right around the turn of the century, but they failed quickly because of a lack of plastic insulation. 3 rail meant that the only insulation needed could go on non-moving parts.
How olds is it ? Is that O gauge ?
Yes, O gauge. These particular models are only 40-50 years old (Damn it hurts to realize that. They from the ‘70s and ‘80s). His oldest date from the late ‘40s and also recently got a new paint job and LED lights.
IMG_6434.jpeg
Maybe it’s the dad in me, or the modeler, or just the little boy who always knew that my favorite trains were a little old and faded and rough, but I’m a bit proud of how these turned out.
That is was originally an AC train is interesting .
Do you think it was a technology thing at the time ?
I think it was mostly the ease of stepping down line voltage through a variable transformer. I’ve had one open, and the entire control circuit is just a transformer with exposed coils and a carbon wiper on a rotating arm. The REALLY fancy ones has two transformers, 4 wipers (to run 4 trains at once), and a pair of rectifiers to inject a little DC bias on the track to blow a whistle.
My old Hornby controller was DC but had a Selenium rectifier in it .

Cool topic.
I’m glad you enjoyed it! I certainly didn’t expect anyone to be interested in the trains, I just hoped someone might be able to point me in the right direction to lean how to solve my problem.
Learn from the past, live in the present, change the future.
Post Reply