Edit: Boards have arrived! Well, gone and done it now - PCBs on the way for my servo controller

Hope I got it right - I only ordered 5 so if I did make a mistake I can fix them with some bodge wires and update the design before I order more.

I really wish one stop shopping was a real thing - PCBs are from JLCPCB, and you cna also dump your BOM and order the parts from LCSC, however they don’t have 3 of the values of ceramic capacitors in the footprint I used on the design. They exist, it wasn’t a goof on my part - I have an assortment of values I got a while back to stock my bench and all of the values needed for my circuit are in the footprint I used on the board, it’s just that the ones that LCSC carries in those values are the next size up - so if I want to one stop shop, I’ll have to respin the board.

Can only check so much - like making sure I have all electrolytic capacitors the right way round so nothing blows up in my face. nets were completed. Crossing my fingers, this is only the second PCB I’ve drawn, and it’s a WAY more complex circuit than the one I already did - which worked just fine.

Hopefully I’ll get it built up and working in time for the Reading Modelers Meet coming up Sept 13th. Last year I had my programmer board, plus the servo controller breadboard version.

And of course I didn’t order enough RJ45 connectors to make the control panels - oh well, I have to order some small perf boards for that anyway, I can just hard wire the panel end for a demo. I don’t have the right buttons anyway so I will use some tact buttons and LEDs instead of lighted pushbuttons.

As usual, shipping cost more than the actual PCBs. 5 board was I think $15 (they are pretty big, 217mm x 150mm or something close to that - the relays take up a lot of space. I want to try and get this done in the next couple of weeks, so I had to pick the DHL shipping option. Once sorted out, a production order I will just have shipped slow boat, it’s half the shipping cost, it just takes 10-20 business

Hi Randy,

I hope your PCBs work as planned. I admire your ability to create your own electronics.

Dave

you will be happy with the boards when they come … they have always done ‘right’ by me …did you go with the light green pcb, or ??

I did blue. My first one I did plain green, because any other color was an upcharge. Now most colors are the same. I gave up waiting for my friend to draw me a logo - TrainBytes Designs.

I’m sure JLCPCB will make EXACTLY what I sent them - and that’s the scary part [:D]

–Randy

yep, it’s like the lottery …

don’t find out if you’re a winner, for a while :slight_smile:

Not too long - I submitted the order not long before I posted that message last night - and my boards are already at the solder mask stage! They are FAT. There are some videos on YouTube which show the inside of their facility and how they make boards - simply amazing. Back int he day, I hand wired all my circuits because I could either mess around with a lot of messy chemicals an dmake a board - and then try to drill the holes correctly, or I could spend hundreds of dollars to have someone produce a small board. Even a single layer, single sided board. Now these various facilities do double sided, full silkscreen and solder mask in a day or two, for super cheap prices. And they can do 4 and 6 layer boards too. They may not be the ultimate quality boards, but for hobbyists they are plenty good - there’s almost no excuse NOT to built everything on a PCB any more.

The only waiting is the shipping, unless you pay through the nose - my first board fell in their 10 boards for $2 size, so I got 10 boards for $2 - plus nearly $19 shipping to get them in 3-5 days instead of 10-20 days. Shipping was actually slightly cheaper for these bigger boards, but the boards cost more.

–Randy

Congeratulations Randy. You are a couple of steps ahead of me with my coach lighting decoder. I am too a customer of JLCPCB. Great service at amazing price. However, my first order was scrapped since it has a design error. Since then I etch my prototypes, build them and test them to check the design before sending the order. I do not mess with all the chemicals, only the etching part. For design transfer I use my CNC laser engraver to avoid the developing step. It enables also using cheap copper clad boards instead of the coated ones.

Regards

Walid

Well, got the boards today as promised. Since I got all of the parts (except one capacitor, which they didn;t have in the form factor I used in the PCB library - but it exists, I have a bunch plus I found them on Amazon), I test fit everything.

1 minor problem, 1 major problem (will require a new board layout) and a few “it bothers me so I will fix it” issues.

Minor issue: I used side entry RJ45 jacks. Fit the board, the ones I ordered snap right in, the leads int he solder pads and the two plastic support pins in the hols drilled. However - once I plug an RJ45 cable in there - it’s not coming out again without a screwdriver, can’t press the tab by hand. I’m going to switch to top entry type.

Major issue - the schematic and PCB library object for the EXACT part number of the relay I used has the NC and NO contacts backwards! This would just be a code change for the frog POLARITY relay, but for the one that turns the frog power on and off, I want the NC to be power one, so the relay only energizes for a short time. I COULD make it work on these 5 boards by mounting the relays on the back side of the board, upside down.

Minor issue - I didn’t mark out nor did I really leave room for any mounting holes for the boards.

“I am OCD enough to want to fix this” issue - there are some traces that I see now that I have a physical board that I could route much more neatly. Also possibly make the board a tiny bit smaller, as I left excessive room in some places.

Overall, not bad - the one thing I worried about most, the custom footprint for the DC-DC converter module, is exactly right, the holes line up perfectly and there is plenty of clearance around it.

–Randy

Of course I am again second guessing myself. Having the frog relay switch at the mid point of the servo is a software no-brainer. I drew up a new PCB artwork with just one relay per turnout, squeezing that gets the price of the boards down by almost $1 each - in quantity (20+) it results in a board that costs under $2. And frees up 2 pins on the micro which I can use as position feedback. Cheaper than using a servo mount with a microswitch to handle the relay. And who am I kidding, the ONLY turnouts this might not work on would be old non-DCC Walthers/Shinohara - and I’m not using such things. Parts cost drops by about $2 per board.

–Randy

do you have photo of the boards ?? just curiosity, nothing more, lol

Thought I could cheat, the software allows exporting to various picture formats, however it looses all the detail when you do so. EasyEDA is free, and I have made my projects public, so you can sign in and open them yourself.

This is the newer one, with a single relay. TEST2 is the (mostly) completed board

https://easyeda.com/megaslug/single-relay-turnout-controller

ANd this is the one I already had 5 boards made from, TEST2AR is the board, although it already has the mistakes corrected.

https://easyeda.com/megaslug/Servo-Turnout-controller

There is both a photo viewer and a 3D viewer in the PCB layout menu. Photorealistic rendering of the board, or a 3D version you can zoom and spin around.

Anyone is free to make them, and once I have the program completed, that will be freely available as well. But note that I have not fully proofed these yet, especially the single relay version, so if you go ahead and get boards made, you are doing so at your own risk. The second link SHOULD be good, I have gone over it and checked each line to the micro and they all match my chart I made as part of the design process. The new single relay one, I haven’t decided if I want to use the extra two pins to provide position feedback or not.

–Randy

i went there , and used both the photo viewer, and the 3d modelling options …

i -assume- there will be later versions of the pcb as there is quite a bit of empty space …???

fwiw … i use an older version of protel, and a version of eagle [pre-autodesk]

It’s all thru-hole, I don’t do SMD. It would be a LOT smaller without the input protection - which it works perfectly fine without on a breadboard, but since there will be runs of around 2 foot for most turnouts fromt he controller to the pushbuttons, on a layout full of DCC signals and all sorts of other stuff… I’m not sure how much smaller I could make it and still keep the connectioons all at the edges. I can squeeze it all over on the right side a bit more, there’s plenty or room between the filter caps, and the relay drivers can be moved over a bit as well. The single relay version opened a ton of space on the right side, the original one had 2 more relays and 2 complete driver circuits in that space. Directly below the mico is always a dead space because the center pins on that side are a Vcc, GND, and the two crystal connections.

I’m open to ideas. The 4 relay version is already 20mm less wide and 10mm less tall than the ones I had made because after having a physical board and co,ponents in hand I could see I left far too much space between things, so I closed it all up when I fixed the error with the relay symbols (the contact shown as the NC contact is the NO side - data sheet is right, so whoever added the item to the schematic and PCB libraries drew it upside down). I also changed it to vertical entry RJ45 jacks but the footprint of those is the same as the horizontal ones, and i added mounting holes in the corners.

Eagle todat is next to useless without paying, thanks AUtodesk. I REALLY wanted to like KiCAD, but the UI is just so off to me, it’s hard just getting schematics done, then trying to do board layouts is really tough. But it’s a full blown package, closer to a higher end system than the entry level ojes, and runs on multiple platforms. ANd it completely free. Then I discovered EasyEDA. Pretty darn intuitive to me, and it’s a complete one stop shop if you want, boards directly from JLCPCB and parts from LCSC. But yo

I actually did another one, this time I got the board size down to 127x170mm. It looks buildable, just got to pay attention to which holes are for what resistor and capacitor in the input circuits.

In units of 30, the boards are under $1.50 each.

It’s in this project:

https://easyeda.com/megaslug/single-relay-turnout-controller

ControllerPCB_AR (except it’s 75% NOT autorouted - though for these simple 2 layer boards, the EasyEDA autorouter does a decent job). I do have to move the two servo connections down a bit, they are too close to the corner for labels. And to get the nets in the right order, I had to modify the schematic and I didn;t do it in a particualrly neat fashion. Still thinking about using my last 2 IOO pins for position indication outputs, that would be another 3 pin header over between servo 2 and frog 1.

–Randy

the version 2 pcb is quite a bit smaller …

would rotating the 328 save any space in the east / west direction ??

there’s not much you can reduce it in the north / south direction … maybe a little in the area of the bottom jack

Perhaps - then I’d have to reassign the pins again for cleanest routing. It would mostly have to go with pin 1 facing down, the 4 remote inputs for one use the analog inputs on pins 28, 27, 26, and 25.

Certainly a possibility. That may allow it to get a little narrower. Though witht he oscillator and stabilizing caps it’s almost as wide as it is long anyway.

Not sure I can push the edges in much further, and still have the mounting holes. Not sure what JLCPCB’s absolute limits are, but the holes are fairly close to the edge. The dimensions are currently something and .xxx mm so I might tweak it just to even numbers - it’s hard to judge but it looked like I was snapping the lines directly to the grid lines on the layout screen but obviously it’s a tiny bit off to get odd numbers out. Won’t change the price but it looks a lot better if the board is 120mm tall instead of 121.314 mm.

–Randy

OK, I optimistically labeled the newest one as FinishedPCB.

https://easyeda.com/megaslug/single-relay-turnout-controller

Very little spare space. I added the outputs for position indicators, so all pins are used again. I also shifted a couple around to make the layout easier.

Qty 30, these come out to $1.47 per board. I don’t think I’m going to spend much more time trying to make it any smaller. Validating the layout, and making the silkscreen neat - yeah, need some time yet to double check everything.

–Randy

used the editor to open up the last pcb there …

i’d call it good enough …

do you actually intend to get any, or was it just an ‘exercse’…

No, this is how I am going to drive the turnouts on my layout. I displayed the breadboard version at a meet last year, but got too sidetracked and didn’t get the board done until now, and the show is next weekend.

There’s also a CMRI node board I am designing that will go along with this (that’s what the ‘remote’ connection is for) and will also read block detectors and drive signals.

Guess I better get going - I just hired a contractor to rip all the junk out of my basement and build properly insulated walls with moisture barrier so I can start layout construction, although that won’t be done until the end of the year at the earliest.

–Randy

that basement is an ambitous project …

walls are reletively easy … kindof, lol …

what about the ceiling ?? do you have a rough track plan so you know where to pop in lights ??