Automate Power Control

JungleSkipper

Registered
18 Feb 2021
40
4
43
UK
Best answers
0
Country flag
I have a tiny G-Scale LGB track in my back garden, it's mainly there to entertain my kids, and I've built some custom software for it to play sound effects (powered by a pi-zero and battery pack). I have simple control of the power via a smart switch and a web interface.

I would like to upgrade the power to handle speed, forward, backward and off. Originally, I was looking for a way to control the analogue knob using some smart switch bots or a servo motor, but before I go down that rabbit hole, is there a better solution?
 

dunnyrail

DOGS, Garden Railways, Steam Trains, Jive Dancing,
Staff member
GSC Moderator
25 Oct 2009
26,219
4,998
75
St.Neots Cambridgeshire UK
Best answers
0
Country flag
I have a tiny G-Scale LGB track in my back garden, it's mainly there to entertain my kids, and I've built some custom software for it to play sound effects (powered by a pi-zero and battery pack). I have simple control of the power via a smart switch and a web interface.

I would like to upgrade the power to handle speed, forward, backward and off. Originally, I was looking for a way to control the analogue knob using some smart switch bots or a servo motor, but before I go down that rabbit hole, is there a better solution?
Someone in hear has done much of which you speak about, if only I could find his thread?
 

korm kormsen

Registered
24 Oct 2009
2,768
298
Country
Paraguay
Best answers
0
Country flag
on my last (DC) layout i was experimenting a bit.
while mainly depending on the epl system to automate direction (where using loops) stop and go to alternate trains (magnets + reeds +switchmotors)
i had some slowing and speeding effects in tests by replacing rail connectors with diodes as jumpers (i use mainly 1ft track)
i am still braining about what to use as timers for shorttime stops.

btw when using automatic speedcontrol the stronger ones of my salvaged computer-powerpacks did work fine for Stainzes and Playmobil (at 12V)

trafo06.JPG

trafos19b.jpg
 

John Russo

Registered
24 Sep 2015
197
21
66
PA
Best answers
0
Country flag
A few years ago I fiddled with the Arduino IDE on the ESP8266 chip.

I had working prototypes of Loco control including speed, start, stop, acceleration, deceleration smoke, light.

I used both a web page and a phone App to control it. I used MIT App Inventor to develop the App.

The primary control protocol was sending URLs via WiFi to ESP2866 servers. The servers interpret the URL and the appropriate code is executed.

I used the PWM pins to control the motors.

I also had a prototype of track feedback. This video shows it:



Another one was controlling a switch motor.


I had gotten as far as using OTR to updated various parameters (A.k.a. CV Settings in DCC)

It was fun. When I revisited things a year ago and many of the IDE libraries had changed and the code would not worked. I have not had the time to update the libraries and code to get back working.

If this is the kind of thing you are talking about, I'd be happy to share the code. I may have it up on Github.