dirkjankrijnders / Servo_mount

PCB to mount a servo below a C track switch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Servo mount

Based on several threads on the dutch three-rail model railroad forum (for example here), I came up with the idea to combine a PCB of say a decoder with the mechanical mounting of a servo. (cheap to manufacture on small scale and very precise). The result:

Revision 1

First servo mounted!

The design is based on the PSSD, however using a different microcontroller (attiny84) for more memory options and smaller footprint. The construction also meant sacrificing the buttons, so another way of programming the decoder was needed. The ISP connector already planned also has the I2C lines available, so the decoder can now be configured by setting registers over I2C. An arduino sketch facilitates this process.

The decoder has not yet been tested on the PCB, but works on the breadboard. It support two servo's, so only half of the PCB's need their components placed, the second servo can be connected via standard servo wires.

Revision 2

I already found some issues with the electronics side of the decoder, so a second revision is planned. The second revision fixes most footprint issues as well as allowing mount in both left and right switches. Also all components have been moved to the back of the PCB so the build decoder should flush in the C rail ballast form. A good count of the I/O ports shows that there are three unused, these could be used for manual switch buttons.

Second revision boards

What is missing? Exactly, the hole for the servo. But a drill can fix that, the 3rd revision will have a hole with the proper shape. Drilling the hole however severed some traces, so those have to be botched, also fixed in the third revision.

After those mechanical problems the electronics all work! So the work on the firmware commenced in full, as per August 16th speed control and a programmer for the I2C interface have been implemented. The manual switch button remain to be implemented.

Revision 3

PCB's for rev.3 were ordered on December 2nd and the changes are:

  • Footprint for G-90 servo's
  • More I/O pads
  • Shape changes to fit under 2471? switches
  • moved the solder pads of C4 and the rail power as to not make short-cut contact when the lever passes.

Pictures follow when the boards arrive Cost/BOM

Part#Reichelt #price* (€)
IC11ATTINY 44A-SSU1.07
D11SMD DF 0050.18
U11µA 78L05 SMD0.15
U21BUZ 110.57
R*,C*20.50**
PCB1Seeed1.00
Total3.47
\* Estimate for orders of 10.
\** SMD 0805 Components from cost almost nothing in bulk (> 10)

Firmware

To make to PSSD firmware:

make BOARD=CSMD

To set the fuse and program both flash and eeprom:

avrdude -p t44 -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
make flash BOARD=CSMD

About

PCB to mount a servo below a C track switch


Languages

Language:KiCad Layout 100.0%