You're reading ...
Layout, Project Progress

First servo operated as planned via Koploper – ECoS – Arduino

Wiring_011Past weekend a lot of wiring work has been taken place, under the table. A 5V 0.6A supply is used to power the Arduino’s. Wires are spread to both the West and the East side of the table. A separate 5V 2A supply is used for the servo’s. They are spread all over the place, the wiring to power them is a 3 node star ‘network’.

Wiring_009Originally I planned to have only one optocoupler circuit to feed DCC to the Arduino’s (see the software page for details), but I could not get that to work. After a lot of testing and measuring (the new ā‚¬16,- Digital Multi Meter is put to good use! šŸ™‚ and trial and error, it seemed the long GND wires, coming from the central node where the GND of both power supply’s are connected, was too sensitive for interference.

The solution was to place the optocoupler circuit close to the Arduino. Which means I’ll need 2 of those circuits. Luckily I initially bought 2 of the fast 7m136 OC’s, no need for shopping. But also now, although it seems to work fine, it still is all quite sensitive. When I so much as touch a GND wire with my finger, the servo moves. I think I need to connect my 0V GND to a mains ground terminal … but that is not available in the sleeping room where the lay out is built.

Wiring_010When finally the Arduino DCC Decoder worked, new trouble arose with the servo’s. This time luckily I soon found the problem. I had connected the first servo to the Arduino at pin 0. But pin 0 and 1 are not standard I/O pins, they double as serial data TX and RX. Apparently that does not work well together with servo.attach. Once I connected the first servo to pin 3 the servo worked and the first junction on the layout switched! 22 more to go! That may take some time.

The video shows some of the current situation under the table, the optocoupler circuit and the Arduino, operation of the first actual layout-mounted servo, and the control of the servo via the ECoS and via PC (using the Dutch program Koploper).

About RudyB



One thought on “First servo operated as planned via Koploper – ECoS – Arduino

  1. how did you wirer the servo 5v.



    Posted by Alan | April 15, 2015, 22:20

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Archive of all posts


%d bloggers like this: