General design considerations
I've been busy designing a board for the train layout, along with getting parts I needed for prototyping . Considering what all I've accomplished on the design, I'm going to cover some of the tidbits & hints related to hobbyists getting parts for another post. As it is, I'll be splitting the thoughts behind the board design into more then one post so I don't feel limited by post length.
Since I hand previously decided I was liking PCB Artist and the capabilities of Advanced Circuits, I've been using their tool for laying out my circuit as I've been designing it.
For the hobbyist, I've been keeping in mind:
- Use through hole components. Many hobbyists won't have the skill or patience for surface mount work
- Avoid specialty parts. The parts needs to be easy to find and inexpensive.
- Avoid high tolerance parts. They are more expensive and the greater the usable values used, the better the chance they may have a usable part already.
- Use discrete resistors instead of SIP modules. Hobbyists are more likely to have the normal resistors and it's easier to adjust the values
- Try to reduce the number of different component values when possible. This makes assembly easier and might help lower costs by getting larger quantities on common values. I'll get more into this when I get back to getting parts.
- Size is not an important factor. Cost & easy of assembly are much more important.
- Think about modifications and build time options. This can make final design much more flexible and usable in other situations.
- Stick to double sided boards when it comes to layout. I won't be saving money or effort by going to single sided since they will be manufactured for me. Having internal layers will make them more expensive and harder to modify if the internal layers need to be modified.
- Plated through holes for ease of assembly and fewer problems. With the manufacturing facilities available, you won't save money skipping this. This would apply to home made boards only.
- Solder mask to reduce the chance for shorts during assembly. Same thing as plated through holes above, but even more important.
- Silk screening and labeling. If the PCB is being manufacture for you, why wouldn't you? In most cases you will save little to no money skipping this with the high amount of automation involved and the
- Try to avoid having component leads too close together. Hobbyists can make solder shorts very easily.
- Don't assume the components will be a specific size or lead spacing. Make sure there is elbow room. For example radial capacitors have different lead spacings and even size for the same value from different manufactures or old vs new parts. Even something as simple as bypass caps for TTL chips can vary from 0.1" to 0.4" spacing with 0.2" and 0.3" both being very common.
- When in doubt, allow for excess capacity in specifications. For example, we know we need to expect 3A surges and maybe up to 5A surges. For example, that means the power connectors & runs should handle 3A to 5A of continuous current or more.
- When in doubt, add stuff and mark it optional.
- Don't be locked in on anything for now
Project design considerations
The first project I want to work on will be a circuit board to assist in running the relays/motors used in turnouts/switch machine operations. For now, I'm keeping my father-in-law's requirements in mind, but as I work on the design I want to keep more general rules in mind.
- Only need to worry about two position turnouts at this time. His design doesn't include anything other then two directions a train could go and other peoples designs will have many more of these then all the others combined. This keeps the circuit much simpler.
- Need to be able to run two wire and three wire switch machines. He has a mix he will be using and having the option to not be worried about what type of switch machine goes where will help during the build and maintenance.
- High current coil switch machines and slow motion switch motors. He's been accumulating parts for many years, most are used, all have been real cheap deals. So far, all of his coil/snap/relay style switches are three wire and the motor switches are two wire machines.
- 10V-12V DC operation. His snap switches will work with AC or DC, but his motorized switches are DC only. By designing to DC only, I can keep the circuit simpler and then install low current or high current parts in the output stage. When in doubt, high current parts that can also run at low current.
- Allow for higher voltages. We don't need it, but other people may need to drive a 24V relay or motor? If I can accommodate a modification that allows for this if the proper components are used without adding to the cost, I will!
- 3A or more surge. Coils need a lot of current to work, but for a short period of time. most of the time you must limit powering them to 1 second or less to avoid damaging them. Fraction of a second works very well.
- Many layouts might suffer from under powered DC power supplies after taking long wires into account or trying to use multiple cheap power supplies. That means allow for excess capacitors to help handle the high current surges. Cheap power supplies often can only handle 1.5A, but we need a 3A surge.
- Low current motorized machines may need to be on for 8-15 seconds and are often on all the time.
- Two wire or three wire inputs. Since both types of switches are common, might as well try to support either type of input if I can do that without driving the cost up. Three wire uses a common and two separate signal lines (one for each direction). Two wire either reverses how power is applied, or has a common on one line and then applies positive or negative voltage on the other line to select the direction (both effectively do the same, the difference is when multiple machines are in use and wired together). Two wire with one being a common can help reduce the amount of wiring needed.
- Momentary vs. throw switches at the control panel. Snap style switch machines usually are connected to momentary switches or three position switches and the switch MUST go back to neutral usually within 1 second to avoid burning out they coil. Motorized switches are usually connected to throw switches (single or double pole, double or triple throw). What controls are used can sometimes depend on what is available at the time it is built. At the same time we need to protect the switch machine from mistakes if possible.
- Switches bounce! Relays and motors tolerate that, but if we can debounce it, they will work that much better.
- Don't require calibration beyond components being installed into the board. Trim pots are nice for somethings, but something going out of spec timing wise it not something they need to worry about. It is a plus if it can be adjustable for other uses, but initially fixed values that are easy replace if we want to change the timing is good enough.
- Don't turn on both directions at the same time! This will either do nothing or risk damaging something even to the point of a risk for fire.
- Future upgrade to DCC. While I'm not going to build in a DCC controller, we need to easily be able to connect to a DCC or digital controller of some sorts in the future. There are commercial DCC switch control units which may replace this or be hooked up to these boards in the future. KISS, and keep the cost down here! Maybe in a future design I can include DCC decoding if needed, but we don't need this currently. Not all DCC systems will use DCC switch machine controllers either. for this specific layout, he doesn't have a budget at this time for DCC other then working to convert the locomotives to DCC. Allowing for future DCC or digital controls though means that if we can accept either 5V or 12V DC low current on the input controls, we can future proof the design.
- Turnouts often happen in groups or pairs. Since the cost of the circuit board isn't affected significantly by the size, allow for more then one switch machine driver on a single board. Allow for only populating half the board if only one switchout will be required.
- Try to minimize the wiring needed from the control panel. Have you looked at the price of copper lately? Long runs from control panels can get expensive and train layouts can spread over a large area.
- No moving parts. Those are more likely to wear out. I've seen too many bad micro-relays back in my days as a technician. Granted, those were used more then these will be, but relays still are more expensive then the options available using transistors or MOSFET's.
- Train layouts are electrically noisy. I don't want to see what the EM spectrum looks like or the power spikes & noise on the wires. Wee need to operate in that environment and reduce our contribution to the problem when possible.
- Probably be mounted directly to the train layout with screws, not in a box. This is a safety vs cost trade-off but we do need to account for that. This means allowing for #4 or #6 screws to be used, even wood screws to mount the board!
- Safety! Other then the risk of things blowing up when you first turn it on and test it out, we need to minimize the chances for short circuits and fires. Most model train layouts are very flammable and in the basement, attics, or spare rooms. In our case, it's in a basement and a lot of pine & plastic is being used. That last thing you want is a fire! This means in the long run I won't be building a high current power supply for example. We'll either build or buy multiple low current ones or buy a commercially made high currently supply with all the required safety features.
Enough for now. I think I've setup whats going through my head related to the hows and whys of some of the design decisions. In my next post I'll go into the actual design and details I've been working on.
Thanks a lot for step by step guide about circuit board making and its design process. Printed Circuit Board
ReplyDelete