Category Archives: Electronics

HT Controller : Overview

Ok, this is a quick post to index the previous posts relating to my Home Theater controller build for later reference.

Project Goal(s):

  1. Mostly to use the CNC machine to make something new, with materials other than wood.  Learn in the process.
  2. Fix a previous project that broke.  I had a power strip that turned on my amps sequentially but the voltage regulator burned up (no heatsink)
  3. Address the problem that my cable modem is behind my theater equipment rack, and when it needs to be reset it’s a pain to get to.

With that in mind, here are the posts covering the basic steps – in order:

  1. Learning to make a circuit board.  Isolation routing one and two.
  2. Cutting the front/back panels out of acrylic.
  3. Assembling the innards of the controller, and connecting input/outputs.
  4. Troubleshooting the things that went wrong.
  5. Final pics and video of completed project.

HT Controller : Troubleshooting

So I had some issues when putting the final product into use.  Which is to be expected, but this bugger had me opening the case at least 6 seperate times..

Issue 1 : when the 5v relays would kick in, it my 7805 voltage regulators didn’t have the reserver to engage them both at the same time.  I needed to add a capacitor.  I did it the easy way, and just screwed it into the terminals.  The +5v is wired in parallel so both relays benefit.

Issue 2 : I used digital pins 0 and 1 on the arduino to control the relays.  Turns out those pins are used for serial communications.  So when updating the board the relays woudl clickclickclickclick like no tomorrow.  No good, had to use different pins.  Obviously I didn’t account for that on the board creation, so they got solder to the pins directly.  Picture is a little out of focus, but it is the orange/yellow leads in the foreground.

Issue 3 : In the external power strip where 6 seperate relays live and are controlled by the arduino here, I made a mistake in that I didn’t have any 10k pull-down resistors on the 6 control lines.  I should have put them in my original circuit, and instead I added them via a little ‘daughter’ board I added to my original circuit board.  Oh, and if you actually jump to read about the external power strip know I took the power supply and arduino out as they are replaced by this build.  All that is left is the transistors and relays.

Ribbon cable removed, and ‘riser’ pins installed:

Daughter board freshly machined:

And installed:

Lessions Learned :

* Patience.  I had to keep telling myself that there was no way I would get everything right on the first try.

* That a 7805 regulator needs a headsink in most cases.

* That a 7805 also needs filter capacitors.  You can’t just plop it in a circuit and expect clean output.

HT Controller : Assembly

Installing the various components to get the HT controller to work was probably my favorite part of the build.  Something satisfying about seeing everything coming together.  At a high level these are the key components:

Arduino : Brains of the operation

Custom circuit board : Connections out from arduino and 5v power regulation

Relays : control each of the 2 outlets (cable modem and router)

Scavanged switching power supply : 120v ac to 12v dc

DB9 : connection out to the power strip where a relay controls each of 6 outlets/amps

So everything was installed on nylon spacers, with small machine bolts coming up through the bottom.  That can be seen well on the relay installation:

And here is the custom circuit board I created in my isolation routing tutorial.  All wired up to the front panel, buttons, db9, and relays:

Overall unit in early assembly:

And (almost) final:

Primary lesson learned on this assembly was when routing a circuit board that you are going to attach ribbon cables to, ensure the holes are lined up straight.  Do not stagger them as I did, it makes it very difficult.

I also learned that when soldering to plain copper boards you really need Flux – more than than what is in your solder.  I had good luck with some acid-based plumbers flux I had laying around.  I put that on the board where the pads where, and then tinned them.  Don’t forget to clean it of with rubbing alchohol or acetone.

Ring light for CNC

I recently put LED strip lights under the cabinets in the kitchen, and had a few left over.  They are pretty basic white 12v LED lights, similar to the ones you see here.  While milling a circuit board the other day, I found myself using a flashlight to see how things were progressing.  It was also hard to photograph the process, so I thought I would install some lights.  Pretty straightforward process.  The strips are made of small segments which can be cut off the roll.  I cut 4 sections off, and arranged them in a square.  Soldered the corners up and left a longer lead which would go through my cable raceway to the computer running the show.

The LED’s I had are backed with a 3m adhesive, so mounting them under my z-axis was pretty easy.  Peel and stick!

From there, I opened up the computer case and cut the leads off one of the molex connectors.  The power things like cdroms/hard drives, and contain both a 5v(red) and 12v(yellow) power source.  I connected the Leds up to the 12v, and now whenever the computer is on the LEDs light up the work piece.

 

Isolation routing

I had very good success with my isolation routing endeavor.  After having to remember how to do things in eagleCAD, the actual manufacturing process was very straightforward.  To start with, I got the eagle files for an arduino board from adafruit.  I needed this to ensure the through-holes would line up so my board would end up being an arduino ‘shield’.  From there I laid out my components.  I won’t get into the actual circuit, but a few things to note:

  • You will be well served by increasing the trace width to .032″.  The smaller traces I have (seen below) will machine, but are a little small for comfort.
  • When you do the wire layout wizard tell it to put wires on the bottom of the board.  One-sided.
  • For optimal wiring I needed a few traces that ‘crossed’.  Normally you would bring them to the top of a two-sided board.  I wasn’t ready to mill two sides and try to get them to line up.  So I basically put in a 0-ohm resistor as a ‘jumper’ to cross over traces.

So this is my diagram:

From there to get the gcode to mill your board you need to run pcb-gcode.  This is a eagleCAD addon that does a wonderful job of creating gcode.  Installation is well documented on their site, so I won’t cover off on that.  There is no shortage of options to configure, but I didn’t change anything other than my machine type (mach3).  To run the setup options you type “run pcb-gcode-setup” in eagleCAD.

From there you can do your configuration.  Mine is included here, FWIW.

After you have everything configured, you have it work its’ magic by typing “run pcb-gcode”.  The output will e a file showing what the board output will look like.  Remember it will be ‘mirrored’ as its the bottom of your board.  You can close the preview, and the actual gcode will be in your eaglecad folder.  There will be two files, a boardname.bot.etch.tap and a boardname.bot.drill.tap file.

I ran the etch file with a 60 degree 1/4″ v-carve bit.  I ran it on 1″ pink foam first to verify it wouldn’t crash, but then ran it on my copper circuit board.  The etch file was awesome, and everything went smoothly.

The drill file was a little weird though.  It kept going back to x0,y0.. I think maybe for bit changes?  Sometimes it would go back to x0,y0 with z0.. so it would drag the drill bit lightly along the surface.  So I ended up hand editing the gcode a bit.. removing all the tool changes.  I have never edited gcode before, and this was very easy to do.  Its basically just three steps that get repeated:

G00 Z0.1000 (raise bit)

G00 X-2.0000 Y1.4000  (move to new hole)

G01 Z-0.0320 F10  (drill new hole)

You just take anything extraneous out.  And then run it on your machine with the bit zeroed an inch up (air carve!) to verify everything looks good.  My drill/etch files are attached at the bottom of post so you can check them out.  Only other change was I must not have had the material thickness setup right in pcb-gcode, so the drill depth didn’t go all the way through.  Easy search/replace on the drill file to replace the depth with a new one.  That’s the (G01 Z-0.0320 F10) above.  Just change the -.0320 for example to whatever depth you want.

I used a .9mm drill bit for this task, and all my components fit well in that hole.  From resistors, to regulators.

BRIEF VIDEO

Snapshot of the board below.  You’ll see some scratches going to bottom-right (0,0) from the problem I noted above.  You will also see the size difference in the traces.  I will ensure I use all larger ones in the future.

Here is another photo after a light sanding to clean up the burrs.. pretty good!

Gcode:

motherShip_daughterboard.bot.drill.tap

motherShip_daughterboard.bot.etch.tap

Isolation routing

Working on a little project for the home theater cabinet, and wanted to make a small circuit board to remove what would otherwise have been a point-point wiring mess.  I am a rookie at eagle-cad, but can cobble together a schematic/board eventually.  In the past I have sent my boards off for manufacturing, but I wanted to try my hand at milling one.  There is a great plugin in called pcb-gcode that works well with eagle cad.  While it has tons of configuration options, don’t be daunted.. using the defaults and a 60 degree 1/8″ v-bit the results look as though they could be impressive.

I ran the trial on 1″ extruded foam to get a feel for the process.  PCB-gcode kicks out two files, one for routing, and the other for drilling.  The image above is just the routing, which includes  a small ‘dot’ on the pads which would be useful for centering a drill bit later.  I have not yet run this on copper, as I didn’t have any small enough drill bits.  I ordered up two #65 or .90mm bits from Midwest Circuit Technology.  As soon as those arrive I will route/drill the board.

After it is completed, I am sure I will recall a few things I left out of the schematic…

Sequential on/off power strip

In my home theater I have 6 separate amplifiers to power everything and unfortunately they don’t have IR inputs to turn them on or off.  While it is fun to run your hand down the front to turn all the rocker switches on and off I really wanted them to turn on with my pre/pro processor so everything would work via remote.

My approach was to take the 12v ‘trigger’ output of the pre/pro and trigger relays in a power strip turning the amplifiers on.  Where things got tricky is I didn’t want all the amps to turn on at once.. I was looking for a more satisfying *click* *click* *click* as they turned on/off sequentially.

So, I picked up a power strip at a Big Box retailer and removed two of the outlets making room for a power supply, arduino mini, and a circuit to operate the relays.  I used a piece of copper I JB-welded in place to cover up the outlet holes.  The copper came from a roll of roofing flashing I got at the same big box many years ago.. super cheap and handy to have around!

Covering the removed outlet holes

Covering the removed outlet holes

My original intent was to use a 555 chip for each relay/outlet, allowing each one to turn on and off one second apart.  I muddled through the design for that, ordered the parts and perf boarded up the first two modules.  At this point, although they were functional I realized a few things:

  • Point-to-point wiring takes some advanced planning
  • I stink at ‘bridging’ pads on purpose as required on the perf board I used
  • Repeating this module 4 more times was not my idea of a good time
  • I would not have enough room for all 6!

So I bailed on that design and ordered my first Arduino board to continue the project.  Picture documenting the 555 dead end:

555 on perf board

555 on perf board

For anyone who hasn’t used an Arduino yet you are missing out on some good fun.  Having a bread board circuit with the proper delay being generated by the Arduino in under an hour was impressive.  I still had to do some perf board work to get the transistors in place to drive the relays and provide a home for the opto-isolator which keeps the pre/pro electronics isolated from everything else.  For those observant folks looking for the diodes they are attached directly to each relay, but in hindsight it would have been easier to have them on the perf board as well.

Transistor driver board

Transistor driver board

Arduino wired to transistors

Arduino wired to transistors

This all buttoned up pretty nice in the power strip chassis.  I cut up a water bottle and put plastic around the electronics to keep any inadvertent grounding from occurring.  I did cheat on the power supply a bit and instead of making one, I took one from an old external HDD chassis as it slipped inside the power strip snugly.  I just wired the 120v in the strip, as there was plenty around!

Electronics all buttoned up

Electronics all buttoned up

And an admittedly crummy video of it in action..

[youtube=http://www.youtube.com/watch?v=nwN3HSkFKC4]

PWM Fan Controller

From the days when my computer was more to me than just a daily tool and was an overclocked monster I have been looking for a versatile, affordable fan controller. In pc-land it is generally a balance of cooling power and noise, I was looking for a way to break that cycle – and provide an opportunity to print a circuit board.

All the new online small-batch circuit manufacturing was intriguing and thus I took the desire for a fan controller, coupled it with wanting to hold in my hand something I designed on a computer and this is where I ended up with:

Circuit Closeup

Circuit Closeup

This is actually two circuits on the same board.  The ‘cheap’ bundle order was based on this size boards so i drew them up in ExpressPCB using the default size and found I could fit two per board.  The schematic and layouts are here.  The brains of the operation is a TC649 from Microchip.  It is designed for use in servers and other electronics as a fan controller and it has all the goodies:

  • PWM Based
  • Speed detection – using only a two wire fan!
  • Stall protection

What the above means is the chip can sense the speed of the fan and can adjust it’s speed based on the temperature detected by temperature probes (thermistors) I have remotely in the top of my cabinet.  What sometimes happens when the fan is going too slow (low temperature) it will ‘stall’, or stop turning.  This chip can detect that and bring the power up to 100% for just long enough to get it spinning again.  Pretty handy chip.. and you can get them for free for onesey-twosey type stuff.  They offer samples on their site!

This particular one is in the cabinet for my home theater equipment driving two 8″ fans – one in the top of the cabinet and one in the bottom.  The wires in the center carry over the power (12v/5v/ground) from the left side to the right, so I only used one regulator.  In the future I would probably put traces there for that job that could be cut if the board was separated.  One update I had to make for the very large fans is moving to larger power transistors.  I scavenged some from a broken power supply, complete with heat sink!  The picture below shows the configuration which has been running for over a year.

Fan controller with upgraded transistors

Fan controller with upgraded transistors

And the remote thermistor probes at the top of the cabinet shown below.  Wired with cat5 of course 🙂

Thermistor probes

Thermistor probes

Circuit Diagram:

fan circuit