Category Archives: Uncategorized

New gear begets new gear

It was bound to happen.  I finally got tired of finding the appropriately-sized wall warts to power my workbench projects.  It was time for a new power supply.  I picked up a reasonably priced 30v 5a Korad KD3005D, which seemed to have the small number of features I needed.

Upon its arrival, and after the unpacking excitement waned, I noticed a small problem.  The voltage being produced was way off from the displayed amount.  This was troubling, and an email to the manufacturer brought about a new control board which I swapped out.  Bummer is, the same problem persisted.

Dumb cheap-ass supplies right?  My concern for the second service inquiry is them doubting my technical prowess, so i ordered a second multi-meter.  I wanted to be able to have two meters showing the output, which wouldn’t match the power supply.  So i got a TekPower TP4000ZC ordered (serial output!) off Amazon (thanks prime!).

Wired the new meter up with my old meter (acquired in 1993) and low-and-behold.  Problem on my end.

WP_20141108_004

My trusty old meter turns out to be not so trusty.  Sorry, Korad – sorry I ever doubted you.  Threw the old meter in the trash and picked up a second TekPower.  Nice to have two.

2013 Christmas light controller :: Part 2

The controller portion of this project will be based off an Arduino Mega 2650.  Of that the intent is to use 30 of the available digital channels.  The target for 30 is arrived that for each remote board I can get 6 channels pretty easily.  That is driven by 8 wires in an rj-45, with 2 being used for power – leaving 6.  Based off how many lights we actually wanted to hang, we decided 5 groups of 6 channels should fit the bill.  Getting to the design on the Arduino shield I quickly discovered I was limited by the 4×3 inch area provided by the freeware version of Eagle PCB design.  In hindsight I should have just ponied up the credit card and purchased the hobbyist version.  I will probably end up getting that for next years’ inevitable growth.

With the working limitations I had, I needed to break the shield up into two pieces, as I could not fit everything in the 4×3 working area.  I ended up making one board for 18 channels, and another for 12.  Here is a zip with the eagle files.  I warn you in advance the .sch files are not pretty… 🙂  They are free to use for non-commercial purposes.

Overall its a pretty simple design.  Arduino pin goes high, opens the gate on an NPN transistor.  This grounds the led on board lighting it, as well as proving a ground leg for the remote board which turns on the remote LED and Optocoupler which in turn flips the triac on.  Simple daisy chain effect.

master board

Turning that into a working board was a bit trickier, as I couldn’t get it designed as a single sided board.  That mean I had to get the board aligned perfectly after milling one side and flipping it over.  After the first board which I got close but not quite (pictures below) I figured it out on the second board.  It turned out to be much easier than I was making it..

Of importance is the get the board aligned straight along the x axis.  I did this by routing a .1″ deep square the board fit in.  The square was oversized, I just wanted a straight x-axis line.  I then mounted the board against that axis with double-sided tape.  make sure there is 100% coverage on the board.. don’t leave tape gaps as board will flex down on z axis in those spots.  I then aligned the x/y corner and etched the bottom of the board, and drilled the bottom.  The gcode for these operations were created through pcbgcode which I wrote about in another article.

To get the top of the board, flip, re-tape, and align to the x axis.  Then jog the CNC to line up on a few selected holes from the previous drilling operation.  In eagle, hover your  mouse over these holes and you will see the x,y location.  Enter these in your machine, and validate a few other holes.  You should be good to go for etching on the top!

eagle xy

First attempt with trying to measure offsets for the front/back operations.  This created some offset holes, which had to be managed a bit with a dremel grinder.  Still a usable board.

offset2offset1

Second attempt using the eagle offsets described above, which came out very nice.

master1master2

Next update will show assembled boards, and hopefully a video of everything operational.

Mini Cooper front license plate holder

On my mini I wanted to move the license plate from a front/center location as I didn’t like the way it was right in the middle of my new Rally Lights.  I wanted it lower and to the left, and didn’t want to spend too much money as shortly I hope to install some rally lights up front and would probably end up moving it.  To this end, I started with a bar of cold-rolled steel from Home depot and bent it into shape as you see below.  The steel probably cost about 5 bucks and bent pretty easily with my little plumbing torch and a hammer.  The one closest in the photo has an angle to match the oval in the lower grill.

To mount them I purchased some sweet stainless bolts, nuts, washers as well as rubber washers.  I didn’t want any rust to form and I generally have a tendency to do things ‘right’ – even if it takes longer and costs more.  You’ll soon see how I fell off that straight and narrow path…  So my plan was run a bolt through the bracket then go fender washer | rubber washer | grill | rubber washer | fender washer| bolt.  The problem I quickly ran into was it is IMPOSSIBLE to reach around behind the lower grill.  The intercooler is right up in there.  I even had a few failed attempts at installing them with needle nose pliers using a ship-in-the-bottle approach.  I read up on removing the lower grill, but that seemed too involved for this project – I’ll save that for the rally light install.

So abandoning that approach, I screwed in the left one as the holes are not cut out way on the left.  The right one is mounted a bit more ‘GHETTO’.

Yup, that’s right.  Zip ties.  How embarrassing.  They actually hold pretty well all things said.

At this point I just need to order up a nice black powder-coat license frame to finish it up.  Otherwise good to go, until those rally lights go in.

AmpDelay Arduino Code

/*
* Amp Delay circuit, based on ‘button’ by DojoDave <http://www.0j0.org>
*
* Control relays turning on power amps when input is detected on pin 2
* When input is gone (receiver off) the relays will turn off
*
*/

int relayPin1 = 6;             // choose the pin for the RELAY
int relayPin2 = 12;             // choose the pin for the RELAY
int relayPin3 = 11;             // choose the pin for the RELAY
int relayPin4 = 10;             // choose the pin for the RELAY
int relayPin5 = 9;             // choose the pin for the RELAY
int relayPin6 = 8;             // choose the pin for the RELAY
int inputPin = 7;               // choose the input pin for receiver
int val = 0;
int val2 = 0;                   // variable for reading the pin status
int onToggle = 0;               // variable so delays don’t occur every cycle
int offToggle = 0;              // variable so delays don’t occur every cycle
int buttonState;

void setup() {
pinMode(relayPin1, OUTPUT);   // declare relay as output
pinMode(relayPin2, OUTPUT);   // declare relay as output
pinMode(relayPin3, OUTPUT);   // declare relay as output
pinMode(relayPin4, OUTPUT);   // declare relay as output
pinMode(relayPin5, OUTPUT);   // declare relay as output
pinMode(relayPin6, OUTPUT);   // declare relay as output
pinMode(inputPin, INPUT);     // declare receiver as input
buttonState = digitalRead(inputPin);   // read the initial state
}

void loop(){
val = digitalRead(inputPin);  // read input value
delay(10);
val2 = digitalRead(inputPin);  // read input value
if (val == val2) {
if (val !=buttonState) {
if (val == HIGH) {            // check if the input is HIGH
if (onToggle == 0) {
onToggle = 1;
delay(200);
digitalWrite(relayPin1, HIGH);  // turn relay ON
delay(200);
digitalWrite(relayPin2, HIGH);  // turn relay ON
delay(200);
digitalWrite(relayPin3, HIGH);  // turn relay ON
delay(200);
digitalWrite(relayPin4, HIGH);  // turn relay ON
delay(200);
digitalWrite(relayPin5, HIGH);  // turn relay ON
delay(200);
digitalWrite(relayPin6, HIGH);  // turn relay ON
}
offToggle = 0;
}
else {
if (offToggle == 0) {
offToggle = 1;
delay(200);
digitalWrite(relayPin6, LOW);  // turn relay OFF
delay(200);
digitalWrite(relayPin5, LOW);  // turn relay OFF
delay(200);
digitalWrite(relayPin4, LOW);  // turn relay OFF
delay(200);
digitalWrite(relayPin3, LOW);  // turn relay OFF
delay(200);
digitalWrite(relayPin2, LOW);  // turn relay OFF
delay(200);
digitalWrite(relayPin1, LOW);  // turn relay OFF
}
onToggle = 0;
}
}
buttonState=val;
}

}