• Welcome to 009 Society Members Forum.

Arduino Projects

Started by Neil McGrath, November 29, 2018, 21:36

Previous topic - Next topic

Neil McGrath

Is anyone building or has built an Arduino project for 009? I have created a few circuits for other gauges but not yet in 009. I have an idea for a simple small oval layout where the trains automatically park behind the back scene and enter the display area one at a time. I would also be interested to hear about any other members microcontroller creations.

Neil

Frank

Hi Neil,

I have not built any Arduino projects, I have dabbled in microcontrollers but with Picaxe controllers mostly, but no rail related projects so far.  Things like a bump and spin buggy and an iambic Morse keyer.

If I remember correctly though I think the Deltang radio control system is based on Arduino microcontrollers.   There is a chap on RMWeb (Robin2 I think) who dabbles in Arduino control systems.   He says you can reprogram the Deltang controllers if you know how to do it - not just changing the parameters, for which Deltang give the instructions on line, but actually loading new code. 

Some folk have built their own complete radio control systems for model rail use, using Arduino boards and the appropriate RF chips.

Frank

B.Meldon

Warning this is not 009.... 

The H0 side of my Westdorf layout is fully automated with section signalling, trains stopping in the stations and automated passing loops. It is double track with six trains on each track, at least four trains are out of sight in the storage loops and up to eight are moving at one time.

However, although this system is only a couple of years old now it is all done in 'old school' fashion with relays and magnetic reed switches in the track.
After a couple of problems with some 'fake' relays from China when new it is now 100% reliable and after working out the basic latching relay wiring it was quite easy to set up.

I can just set the trains standard gauge trains running and then operate the narrow gauge (H0e/009) end to end side of the Westdorf layout manually with the standard gauge trains running past.

I did it this way because I find relays easier to understand than electronics. But each to their own.

Brian Meldon


Brian Meldon

Hugh Norwood

I have used the picAXE in a few things.
Hugh Norwood
Angst-Lesspork

Graeme Dunbar

Quite a few Arduino projects, but nothing for 009 (yet).
Graeme Dunbar - 4441

Phil Court

Not OO9 specific but my layout is pure OO9
I am working on a number  of PIC microchip projects that are to ad interest to the scenery.
This is combining smoke, leds (fire/arc welders/flashing lights ect) and movement using a micro servo.
I first learned to program in Fortran in the late 1960s and progressed through to Basic, machine code and assembler.

Having retired i have taken time to learning/programming in C using microchip MPLAB and  Pickit 4.
Its been a long learning curve but hope to have

Hotel BBQ with fire and smoke
Animated signalman with flag
Fire breathing dragon with smoke and movement

Other projects are planed and will post details on above as they become show-able.

Neil McGrath

I have built some animations for our club kids OO layout. So far I have flashing lights on emergency vehicles and a Tardis. A building fire simulated using randomly flickering LEDs, a mechanics car lift (using a servo), a car transporter delivering a car (2 servos), a tipper truck (1 servo), a helicopter starting up (mosfet controlled motor), a vibrating road worker with a drill (relay controlled motor)  and a working crane (2 servos). The Chinese copies of the Arduino boards are very cheap as long as you do not mind waiting a few weeks for delivery.

Hugh Norwood

My picAXE projects my be found on the website;
the Witch on her broomstick here : http://hnorwood.co.uk/files/broom.htm
the working Popham semaphore here (I really must get round to finishing it...) http://hnorwood.co.uk/files/semaphore.htm

...and a couple of controllers http://hnorwood.co.uk/files/pwm2.htm and http://hnorwood.co.uk/files/pwm3.htm

(I too have flickering firelight in one of my buildings - but I use a trio of astable multivibrators and some diodes to produce the effect - as, too, in the "eyes" in the sewer pipe.
Hugh Norwood
Angst-Lesspork

Neil McGrath

I like your animations. Very imaginative.

Steve Lomax

I have been messing around with Arduinos  and pics for several years now and I have incorporated quite a few Arduinos into my 009 layout. I have 3 arduinos (pro-minis) each  controlling 8 point motors (servos) and 6  under track IR sensors for loco detection and automatic point throwing.  2 arduinos send  i2c signals to these point controllers  from a mimic switch panel. I have 1 arduino controlling a stepper motor turntable,  another controlling a 3 servo dockside crane that unloads slate from a rake of 6 wagons into a longboat barge . I'm currently developing one to control servos and stepper motors to  allow automatic loading of slate ( re-cycled from the longboat barge) into wagons that enter the "mine" empty and exit loaded via any one of 3 mine tunnels  by gravity feed (Arduino controlled magnetic braking)  these then  collect in a siding to await a loco to take them to the dockside crane.
I'm using an arduino mega to process the  DCC control for my locos, (DCC++) and JMRI  from an old PC and android phones as portable wireless throttles. The Arduino mega has about 60 general puropse input/output pins which can be triggered by Addresses for signals, sensors, points/turnouts lights etc within the JMRI software. As these are merely "on" or "off" signals they are effectively switches so DCC isn't necessary for the arduino controlled stuff to work, just a switch. but its nice to be able to throw points and operate the turntable from a portable phone or tablet as well as a fixed mimic,  I have a 3D printer so I design print as much as possible, rather than scratch building or buying off the shelf, I have posted a few designs onto Thingiverse, (3D printing forum)  and included arduino sketches. https://www.thingiverse.com/bluetobits/designs.
If anyone would like any of my other sketches and circuits please let me know. I can upload stuff here  as I develop it  if anyone is interested.
Cheers
Steve (bluetobits)

Phil Court

#10
Well your posting has moved me to action and i have completed the first phase off "Frederic The Friendly Dragon" at Castle Valley.
It took some doing but finally managed to get the software and mechanics sorted.
Eventually he will have flames (red LEDs) in the nostrils and (orange LED) in the mouth and hopefully some smoke but there are other tasks(domestic) pending so don't hold your breath.

Video  on you tube here

https://www.youtube.com/watch?v=D7tLT5p2PlE






Scottish Modeller

Quote from: Steve Lomax on December 29, 2018, 03:08
I have been messing around with Arduinos  and pics for several years now and I have incorporated quite a few Arduinos into my 009 layout. I have 3 arduinos (pro-minis) each  controlling 8 point motors (servos) and 6  under track IR sensors for loco detection and automatic point throwing.  2 arduinos send  i2c signals to these point controllers  from a mimic switch panel. I have 1 arduino controlling a stepper motor turntable,  another controlling a 3 servo dockside crane that unloads slate from a rake of 6 wagons into a longboat barge . I'm currently developing one to control servos and stepper motors to  allow automatic loading of slate ( re-cycled from the longboat barge) into wagons that enter the "mine" empty and exit loaded via any one of 3 mine tunnels  by gravity feed (Arduino controlled magnetic braking)  these then  collect in a siding to await a loco to take them to the dockside crane.
I'm using an arduino mega to process the  DCC control for my locos, (DCC++) and JMRI  from an old PC and android phones as portable wireless throttles. The Arduino mega has about 60 general puropse input/output pins which can be triggered by Addresses for signals, sensors, points/turnouts lights etc within the JMRI software. As these are merely "on" or "off" signals they are effectively switches so DCC isn't necessary for the arduino controlled stuff to work, just a switch. but its nice to be able to throw points and operate the turntable from a portable phone or tablet as well as a fixed mimic,  I have a 3D printer so I design print as much as possible, rather than scratch building or buying off the shelf, I have posted a few designs onto Thingiverse, (3D printing forum)  and included arduino sketches. https://www.thingiverse.com/bluetobits/designs.
If anyone would like any of my other sketches and circuits please let me know. I can upload stuff here  as I develop it  if anyone is interested.
Cheers
Steve (bluetobits)
Hi Steve,

As someone about to get into Arduino and the things it can do...

I'm interested in how you use the Arduino to operate the point servos very much!

Not so worried about the other things that can be done, but making the points work is a must!

Thanks

Neil McGrath

There are two servo driver examples in the Arduino IDE. These are a good starting point and will give you an idea of how to structure a sketch to operate a servo. Once you get the basic idea, it is not too difficult to modify the sketches to move a servo to a fixed position at the touch of a button.

Neil

Dave Cooper

In March's "009 News", David and Sue Griffin's "Hillside Mine", there is mention of an Arduino-controlled NG line which sounds very interesting (a future project I think).

I have been looking at Arduino (and Raspberry Pi) for some time, but, so far it is a solution looking for a problem...Now though, on my diorama layout, there is a rope-worked incline. This unloads a canal boat and moves the goods up to a higher level 009 siding. I think the 'rope' and associated truck(s) can be on an endless loop with automatic starts and stops at each end. Operating under Arduino - in a random fashion - this would make for ideal background interest.

Has anyone tackled such a thing ? I have programmed in DOS and Basic many years ago, but, not down to Assembler level. Could do with some guidance on what's involved.
Dave
"High Water" Diorama ("Dŵr Uchel")
- the inveterate tinkerer

Graeme Dunbar

Hi Dave,

A "solution looking for a problem" is not a bad way to make a start.

The choice of device depends what you want to do. The Arduino is a microcontroller development board ideal for interfacing and controlling things. The Raspberry Pi is a single board computer. It can control things but its strength lies in doing the sort of thing you might on a (low power) PC (graphics, data processing..) without the worry that if things go haywire you've not lost all the things you might have access to and stored on your PC.

If you have experience of programming in BASIC on a PC then Arduino should not be too unfamiliar. The syntax is C and a bit odd at first but an IF statement is an IF  statement etc. in pretty much any language.

There are plenty of low-cost Arduino clones from the Far East and I've not come across one that has caused problems. There are also some excellent starter kits with a prototyping board and a selection of components. There are also some very comprehensive kits too.
Graeme Dunbar - 4441