SMA12 - 17 Channel Configurable Multifunction $5 DCC Decoder For Servos

geoffb's picture

One of my earlier entries:  SMA10 – Build a 17-Function DCC Decoder for about $5 ( http://model-railroad-hobbyist.com/node/19070 ) generated a considerable amount of interest regarding the possible enhancement for controlling Servomotors (Servos). This is my next version of a 17 Channel Multifunction DCC Decoder based on a low cost $2.56 Arduino Pro Mini. This version supports configuring each of the 17 function pins for On/Off (LED/TTL) Control, or Configurable Blinking Control, or Configurable Servo Control, or Configurable Pairs Blinking Control. Yes, that does mean it can support 17 servos, each with rate, start point, and end point setting via DCC CV’s, per pin, as well as new LED configurable functions. Read On. Additional doc found here: http://model-railroad-hobbyist.com/node/19775 There is another decoder version added herein. Look for "New Decoder Version to Control Lighting Groups" in Page 12 of the Comments: http://model-railroad-hobbyist.com/node/19446?page=11   The most recent Update can be found here: SMA20 New Low Cost 17 Channel DCC Decoders with PC Boards & Dual Motor, LED, & Servo Control    http://model-railroad-hobbyist.com/node/24316

Comments

@Geoff: zipfiles uploaded

Hi Geoff,

I just finished a version of the PCB, can you please have a look at the files and let me know what your opinion is on the following:

1. 2 versions are available: one on a 10x5cm PCB (uploaded) and one on a compact 6x5cm version: what do you prefer?

2. I made F15 and F16 available on the same pinheader type (1x3) as the other outputs: is that ok or you want else?

3. F15 and F16 are to be taken from A4 and A5: these pins however have different locations depending on the version of the Pro-Mini, so I took liberty to use a wire from these pins to the board (marked A4 / A5): is that ok or you want else?

4. I included a 7805 1A regulator instead of a straigth 5V inpuit: ok?

5. Is the spacing of the pinheaders ok or too wide?

6. I still have to rearrange the top silkscreen to avoid vias interrupting text.

Looking forward to your comments,

Erik

/sites/model-railroad-hobbyist.com/files/users/Erik84750files/Geoff%20Bunza(1).zip

 

geoffb's picture

@Erik re: Questions

Hi Erik,

1. 2 versions are available: one on a 10x5cm PCB (uploaded) and one on a compact 6x5cm version: what do you prefer?

I always prefer smaller board sizes because the production cost is proportional to the board area, and I am normally trying to fit these into small places for concealment.

2. I made F15 and F16 available on the same pinheader type (1x3) as the other outputs: is that ok or you want else?

This sounds like a good idea.

3. F15 and F16 are to be taken from A4 and A5: these pins however have different locations depending on the version of the Pro-Mini, so I took liberty to use a wire from these pins to the board (marked A4 / A5): is that ok or you want else?

This sounds like a reasonable solution to the Pro Mini variations problem. This may be difficult to implement.

4. I included a 7805 1A regulator instead of a straigth 5V inpuit: ok?

This is fine too. But... are you sure you want and can get a 200uF capacitor at at least 8 Volts in a SMD 1206 package (C2)  and a 100uF cap (c5) at a higher voltage in a SMD 1206 package?? The higher voltage needs to be whatever voltage you will feed the regulator plus 25% margin. For a typical 7805 regulator that is likely to be 8V + .25*8 = 10 Volts minimum.

5. Is the spacing of the pinheaders ok or too wide?

They look fine.

It looks like you have some problems with the board layout:
1. Grounds are not connected to the F0-F16 pin triple pin headers
2. The "-" to the X1 connector is not connected to anything
3. It looks like you intend to populate the board with all the LEDs per function. If you do this and try to connect these to servos, you will likely find the servos will not operate correctly in all situations. Also remember that you have a LED on the Arduino board as well
4. If you can get a set of design rules from the PCB fabrication house you will use, you may be able to load these into Eagle to help you check for board layout errors. Run the Eagle error checks for the schematic (ERC) and Board (DRC) before you fab the board.
5. Ground is not connected to pin 5 on the 6N137.
6. It looks like there are many other ground lines not connected on the board layout.

These are major errors. You need to closely examine your board before fab. There may be more errors. I did not perform a comprehensive review. Also remember to check your parts availability and costs.

Have fun!  smiley
Best regards,
Geoff Bunza

@Geoff: PCB review

Hi Geoff,

many thanks for your professional review!

For the caps I use 1206 sized components, they are rated to 16V. But indeed for the input of the 7805 I will try and revert to a regular elco. As a consequence I may have to bring the pinheaders at closer spacings: I will see what can be done.

The LED's and their resistors are optionally installed, not required.

I will make two versions: the current one (which has the advantage of 2 mounting holes present) and the compact version.

For the A4 / A5 issue, please let me know if you have an alternative solution. I have a number of boards where I use this solution, so any different way of mounting will be worth looking at.

Concerning the ground (GND) issue: I use a polygon GND plane on the back of the PCB. When opening the file in Eagle you may have to apply the "Ratsnest" command which will show all ground connections including the "missing" GND (ground tracks). You may also close all layers except "Dimension" and "Unrouted": you will see no unconnected components are present.

I will rework the present board and upload both for your review.

When fabricated I will upload a picture of a finished (soldered) board, and send you one by mail. Parts are (at least for me here in Europe) readily available although for the SMD they may have to be purchased by the 100 (but at a cost of about €1 or €2 per 100).

Kindest greetings!

Erik

 

 

 

 

geoffb's picture

@Erik

Hi Erik,

For the A4 / A5 issue, please let me know if you have an alternative solution. I have a number of boards where I use this solution, so any different way of mounting will be worth looking at.

Given that there is no one way of accounting for the A4 / A5 layout on the Arduinos, I would try to assume each would need a small length of wire. I would probably try to put the attachment holes on the board outside of the Arduino outline near the edge of your board, or some place where soldering the two wires would be easy.

Re: Grounds -- very nicely done! This is the first time I've seen a modeler use this technique. Bravo!

Have fun!  smiley
Best regards,
Geoff

@Geoff: board/PCB update

Hi Geoff,

thank you for your kind comments.

Attached are two files: 1. the gerber files for this board and 2. the .sch, .brd and .lbr files for the updates per your comments

I used the cam processor, ERC and DRC settings for Elecrow, a Far East company that I use for several years; they produce good quality, at about USD 5 plus shipping for 5 boards of 100x100mm. Since my board measures 60x50 they can panelize to 10 decoder boards per order.

Following changes were applied:

1. board size reduced to 63x49mm

2. managed to include one M3 mounting hole

3. had to reduce spacing between headers to 150mil

4. All LED and their resistors are optional

5. Track size for power routes: 40mil

6. A4 is connected to F15, A5 is connected to F16. There is a small mix-up on this in the schematic but the board is ok. When male pinheaders are used on the Pro Mini and on the board then 2 pairs of Dupont female connectors on wires will do the job. Due to space constraints I had to change F15 and F16 to 2-pin headers.

7. A large elco (470uF or larger) can be fitted at the input of the 7805.

Unless you would like additional changes I will place an order for this board. Once received I will populate a few and send you one: can you please pm me your postal address?

Kind regards,

Erik

EDIT: I corrected the small mistake (see 7.), uploaded version v2a.; and oriented all LED's same direction.

/sites/model-railroad-hobbyist.com/files/users/Erik84750files/decoderSMA15_Bunza_v2a.zip

/sites/model-railroad-hobbyist.com/files/users/Erik84750files/decoderSMA15_Geoff_Bunza_v2a_schematics.zip

 


>> Posts index


Journals/Blogs

Recent Blog posts: