In December 2013, I signed up for the Contextual Electronics class taught by The Amp Hour host Chris Gammell. The idea behind the board, called the BenchBuddee, was to advance the student’s knowledge of circuit design and PCB layout, and ultimately having a useful tool for the student’s lab bench long term.
The first session of the course was dedicated to the design and development of the PCB from initial schematic drawing through to plotting gerbers for a four layer board. The second session would use that official design for the construction of the final prototypes. Even though three boards were supplied for the class, I felt it would be most useful if I had my own design fabricated as well. That way I could build both the official board and my custom board in parallel and see if mine would actually work.
BenchBuddee Design Criteria
There were two primary factors chosen for the class, that would dictate large aspects of the design. First the board would be powered by a typical ATX power supply, providing +3V3, +5V, -12V and +12V with more current than we’d ever likely need. Second, the board would be controlled by an Arduino Uno R3. Because of those two decisions, there would need to be room for a nice chunky mini-ATX connector and an entire Arduino Uno pin array. With that much space in play, adding a set of terminal blocks on the other side of the board to access its features was no big deal.
Another design criteria chosen by Chris, was that the majority of the components used, would be surface mount. The smallest components selected were an 0603 LED, a SOT-323 Temperature Sensor IC, and a 20-Pin SSOP Analog Front End. For the most part, passives were sized 0805 or larger which turned out to be pretty easy once you get the hang of it. The SSOP and 0603 LED were definitely the hardest to solder down, the LED because it’s tiny and I was paranoid about melting the lens and the SSOP because we put down the wrong footprint and wound up having to bodge the chip onto a footprint that was far too narrow.
Such is the way of prototypes.
Circuit 1: Adjustable voltage from +/- 1.5V to +/- 12V
The adjustable voltage portion takes +12V and -12V input from the ATX, protects it with some PTC resettable fuses, and then uses potentiometers to vary the output of a pair of voltage regulators: LM317 for +12V and LM337 for -12V. (This circuit is duplicated to provide regulated voltage to the opamp used in the other circuits, so 2 x LM317 and 2 x LM337). Output is taken at the terminal block.
Circuit 2: Relay suitable for handling mains voltages
The relay circuit is fairly unremarkable, however the layout was interesting. Expecting a large amount of noise from the charging / discharging of the coil, the bounce of the contacts and the possibility of large, noisy voltages, this was the start of having to isolate ground and power planes on a by-function level. Fortunately, the board has four copper layers so we were able to use the front and bottom side copper layers for signal routing, and dedicated the inner layers to power and ground planes.
Circuit 3: Digital-to-Analog converter functioning as either a constant current or constant voltage source
The DAC system uses a SPI input from the Arduino to determine the voltage output. This is then fed into a constant current feedback system (using one of the four amplifiers in the opamp we chose), over a 1Ω sense resistor. Through the use of a MOSFET we could isolate that sense resistor and convert the output from constant current to constant voltage. Pretty neat really. A third MOSFET was used to allow a PWM signal to then vary the voltage into the system.
Circuit 4: Analog-to-Digital converter functioning as a thermocouple
Our ADC was probably the most signficantly complicated of the circuits in terms of theory. The thermocouple only generates a miniscule signal, on the order of millivolts / microvolts. This needs to be accurately amplified into a range that can be detected by the ADC, so we feed that voltage through an instrumentation amplifier with variable gain to achieve a signal strength in the sweet spot of the ADC. We included an LMT84 temperature sensor to act as the cold junction of the thermocouple circuit.
Circuit 5: LED driver
The LED Driver is the least interesting of the circuits, only because the schematic and part decisions were made by the IC manufacturer and we just copied them down and laid them out. After construction, I tested it with five 5mm “Cool White” LEDs with forward voltages of 3.5V and 20mA current connected in series with no issues.
PCB Layout and Routing
After we finished the schematic and spent several days reading through datasheets, we assigned matching footprints as best we could and began the process of board layout and signal routing.
As you can imagine, with a board of this relative complexity, we did do a fair amount of rip up at times. One of the most difficult complications was the need for physical separation of the circuits, and isolating their respective ground and power planes. I found the solution for the ground plane issue very practical, with four separate planes all joining at a star ground very close to the ATX ground we use for reference. In general, we tried to route the power planes over their matching ground plane.
It was difficult for me, not being very experienced in terms of different footprints and chip sizes, and never having done any surface mount work before, to know how close I could really space components on the board and have a reasonable chance of being able to get a soldering iron in there to tack the piece down. There were a few poor choices I made, specifically on the right of the board near the terminal block. The plastic shows a fair amount of melting from my heavy handed wielding of the soldering iron trying to place teeny pieces close to the body.
Another interesting aspect of the board is using exposed copper as a heatsink for the two mosfets that govern the control of the constant current circuit. The copper pours are surprisingly effective, because those mosfets, particularly during constant current loads, get very toasty. This led to another problem with the prototype: the copper pours with the spicy mosfets are on the top side, right above a thermistor that acts as a resettable fuse for the circuit. Essentially, the mosfet is dumping it’s heat right into a very heat sensitive component.