An Ongoing Collection of References You May Find Useful

refThis is going to be a different kind of article - this is going to be a collection of links to reference materials, blogs and other information I have found useful and tend to recommend to others.  It will be an evolving article as I find various useful things, or you tell me about things you have found.  As much as possible, I will link to original sources, but if links for a particular reference are always changing, I'll save a local copy here.

check back, especially if you don't see anything interesting at the moment, that should change.  I'll try to keep things grouped in a logical way to me - I hope my organization will make sense to you.  I'm posting things randomly as I think of them or find them, so please don't think the focus today will be the overall focus of this article.

Revised: 7/25/2018

Read more: An Ongoing Collection of References You May Find Useful

Discuss this article in the forums (4 replies).

Gerber File Readme Generator

Teaser PicCircuit boards are wonderfully cheap to had made (even with the "president's ill-conceived tariffs).  Having custom circuit boards made is really open to everybody.  But there are a lot of steps between finishing a circuit board design and having it ready to send to a fab house.  I've developed a piece of software to make the process a little easier.

When the board design is finsihed, Gerber files must be generated.  A file is required for each layer of the circuit board.  Top and bottom copper - 2 layers.  That doesn't seem so difficult.  Actually, your board layout's CAM processor generates many more layers:  the silkscreen layers showing the labeling of the board, the soldermask layers, paste layers if you're having a stencil made, the Excellon drill file, various layers showing routing and Vscores.  The list gets pretty long.

The pcb fabricators like each of these layers to be the board name plus a particular extension for each.  I like to include a readme text file listing the board parameters, including the name of the file for each layer.  This gets pretty tedious!  I have created the Gerber File Readme Generator to make this process a breeze.  Enter in a few parameters, click a few boxes, and the file is written to disk.  A very tedious task is done in a few seconds.

Read more: Gerber File Readme Generator

Discuss this article in the forums (4 replies).

Display Bezel Idea

image copy copy copy copy copy copyOne of the issues to be solved in developing the Wake Turbulence Timers was bezels for the red and yellow 3 digit 7-segment LED displays.  The old-school traditional type clamped to the panel and provided long 4-40 threaded rods to support the printed circuit board in the proper position.  There are two problems with these - they only have red filters and they are over twenty bucks a piece!


image copy copy

Read more: Display Bezel Idea

Discuss this article in the forums (10 replies).

Isolated USB Interface Using the CH340G UART-USB Chip

USB TeaserThe monitor I've mentioned will be used to monitor faults in a piece of FAA equipment.  It has morphed from the initial concept of just providing some indicator lights to being a data logger to aid in determining the root cause of a failure.  The original concept was to "play back" the sequence of faults recorded on the board's LEDs; this expanded to having a USB interface to read out data serially.

In the past, I have observed problems when interfacing to installed equipment - most often grounds being at different potentials.  This can result in sparks, tripped circuit breakers and damaged equipment.  In this case, dealing with aircraft navigational equipment, I opted for an abundance of caution.  An isolated USB interface would protect both the computer connected to the data logger and the monitored equipment.

FTDI is the common choice for USB-UART chips but they have been plauged by fake chips and controversy with drivers being revised to not work with fake chips or to even destroy them.  Not a good way to keep people happy.

For this design, I opted to use the Chinese CH340G USB-UART chip.  It's cheap and popular (since many Arduino clones are using it) and the driver is readily available.  DreamCity Innovations have worked up a data sheet for this chip since the original is in Chinese.

My isolated USB interface design is based on an example in the DreamCity data sheet, with slight changes.  Their schematic shows an inverter on the microcontroller transmit line, lists the part number of a buffer with the note "... but helpful when the input pins cannot source too many current."  The PIC 18Fs that I work with can source many current (25mA), so this addition was unnecessary.

The resulting circuit is pretty simple and having it optically isolated didn't add much complication.  The schematic is shown below.  The CH340G is in a 16 pin SOIC package so it's pretty easy to handle.  I can't say the same thing about the micro-B USB connector!  The pins are extremely fine-pitched but the connector I used isn't too difficult to work with - it actually fits in a cutout in the circuit board so the tends to be aelf-aligning to the pins.

Read more: Isolated USB Interface Using the CH340G UART-USB Chip

Discuss this article in the forums (0 replies).

Building Tools to Aid Development

switch box 6 300pxFor development and testing of the fault monitor I'm working on, I need to simulate 8 0v/5v signals.  I used the PICkit 2 logic tool for some simple testing and I could have used jumpers to kludge something together but there will be a lot of testing as I get all the features together, so something a little more user friendly and robust was in order.  One way I could have done this was to use a 8 bit DIP switch, but fiddling around with the tiny levers is kind of a pain in the butt.

I decided the best solution was to build a switchbox with toggle switches that can quickly be set to desired patterns.  I had a handful of mini toggle switches purchased long ago on ebay that are of a quality such that I don't want to use them anyplace where I'm depending on the switch to work, so that was a starting point. My data lines are pulled high by 10k resistors, so I could just use a SPST toggle switch to short each data line to ground.  Nothing too complex to hand wire.

Close at hand was an enclosure I had ordered from iTead for $5.  This stylish box was overkill for this project but it worked well.  I have some measurements for a circuit board which I'll include at the end of the article.

Read more: Building Tools to Aid Development

Discuss this article in the forums (0 replies).

PICkit 2 Logic Tool Trap

PICkit 2 Logic Analyzer - 300pxThe PICkit 2 logic tool/analyzer is a handy tool to have around, especially since the price is right!  The analyzer mode can show the timing of signals, and the logic tool can be used to monitor the output status of a few bits or to exercize a few inputs.  The logic analyzer and UART tool are reasons why I don't upgrade to the PICkit 3.

I'm working on a simple monitor that will record and display the status of 8 test points.  In the piece of machinery being monitored, a number of conditions can lead to shutdown, but the only indication a technician troubleshooting the issue is that one or more of these conditions caused the shutdown but not which particular faults occured.  A couple of the fault conditions are temperature-related, so a technician arriving some time after  a shutdown has occurred has little to go on for troubleshooting.

The monitor I am building will show what faults have occured, and the sequence in which they occurred.  It should be a powerful tool for the technicians.

I need to simulate the fault conditions to develop the software.  As I get it refined, I'll need to generate 8 signals, but for the initial work, simulating a few inputs will be sufficient.  I am using port B of the 18F26K22 to monitor the eight signals.  RB6 and RB7 are the ISCP programming pins, but there won't be a programmer connected in the field.  Using the PICkit 2, I can easily exercise RB6 and RB7 without making any changes in connections.  It's pretty slick.

Read more: PICkit 2 Logic Tool Trap

Discuss this article in the forums (1 replies).

Using OpenBeam Extrusion to Create a Custom Enclosure

OpenBeam profile -300The FAA recently asked me to come up with a solution for mounting one of my Wake Turbulence Timers at a location with a metal console panel; they didn't want to cut a hole through the panel but preferred a surface-mount solution instead.  One hard requirement was that it use a standard timer with no modifications in case the timer had to be replaced at some time in the future.

T-Slots and Tabs

I have used t-slots in laser-cut acrylic before to make a stand-alone enclosure for use in a training center but I'm not sure that approach will stand up to day-to-day use and abuse past the point where I no longer care.  The technique is handy for some applications but perhaps not a heavy-duty industrial application.

Apparently I haven't posted about the t-slot method here before, so I'll touch on it lightly.  In a t-slot joint, one panel has tabs that fit into slots on the mating panel, and a t-slot that's (typically) sized to fit a 3mm nut across the flats.  A screw goes through the mating panel into the nut and is tightened to hold the joint secure.

Read more: Using OpenBeam Extrusion to Create a Custom Enclosure

Discuss this article in the forums (3 replies).

Octopart - A Handy Site to Know

banner - 300Whether you're designing something new, or building an existing design, Octopart is a handy website to know about and use!

Until recently, my biggest use of Octopart has been to track down needed components and to compare prices.  I checked the availability of a high side switch I'm considering for a USB charger is the car I'm working on.  I could go to Digikey and Mouser to check the price and availability, but an easier way is to type the part number into Octopart and you'll instantly be presented of a table with price and availability from a number of distributors.  Just a note - Octopart covers commercial distributors like Digikey, Mouser and Allied Electronics, but doesn't cover places like Jameco.  The table below shows the results for the high side driver.

Read more: Octopart - A Handy Site to Know

Discuss this article in the forums (1 replies).

Found Enclosures - Using What's Available

pic 2 - 300At some point, many of our projects should go into an enclosure so that it looks nice or is projected from damage and even weather.  Many styles of enclosures are available from Radio Shack (yes, they are still in business), Digikey and Jameco but cost can be high and finding exactly what you want can be difficult.  Often, with a little ingenuity, enclosures can be found at hand.  I've shown some different options here in the past for enclosures but you may be neglecting a great source of stylish enclosures as close as your bathroom - stick deodorant containers!

These come in different colors in a small range of sizes and some even have transparent end caps if you want to show some LEDs.  These containers are nearly air-tight too, so a water-tight enclosure can be arranged with some judicious use of silicon sealant.

The pictures here show a couple of Old Spice Deodorant containers.  A TAP-28 Plus board (98mm x 60mm) slides right in the larger container with about 12mm to spare in the length.

Read more: Found Enclosures - Using What's Available

Discuss this article in the forums (5 replies).

Piezo Beeper Volume Control - Sometimes Projects Aren't Easy

My FAA Wake Turbulence Timers have been installed at 10 test sites for a year.  The evaluations from the Air Traffic Controllers who have used them are favorable, but one requested feature was a volume control for the piezo beeper used to signal the end of the countdown period.  In some towers, the beeper was just the right volume, but in quiet towers, it was way too loud.  This didn't seem like a difficult problem to solve.

Floyd Bell Beeper - 300The beeper used was actually a magnetic beeper - it's an active beeper, requiring only the application of 5VDC to sound.  An active piezo beeper could just as easily be used, so I started with a search for controllable-volume piezo beepers.   There are indeed piezo beepers with a volume control - a mechanical shutter to control the size of opening of the sound exit.  Beepers of this type are huge and not suited to my application where the maximum beeper diameter is about 16mm.

Read more: Piezo Beeper Volume Control - Sometimes Projects Aren't Easy

Discuss this article in the forums (15 replies).

Forum Activity

Member Access