Hello world!

Welcome to WordPress!

The blog as been inactive since 2011?! Holy shit.

I deleted about 400 backlogged comments. Most were spam but a few seemed legit. If you have serious questions about anything here, send me gmail @ gordonthree


Workbench Spot Light

The camera I added recently gained a new boom mounted partner, a Luxeon Rebel powered spot-light. Consisting of three 200+ lumen neutral-white Rebels, the spotlight puts a lot of light onto a spot on the workbench. I’m going to pick up a diffuser optic for the collimator so it’s not quite such a tight spot. I used a paint striping gun to reflow these little guys; surprisingly my solder paste from 2007 still works!

Before reflowing

Driving the Rebels is a 1a Buck Puck from LEDdymanics. It regulates a surplus unreglated 12v wall wart down to a safe current for the LEDs. I’ve added a potentiometer to the driver’s dimming input, giving me a little control over the amount of blinding from the light. The little circuit board uses a 5 position Molex connector to provide power to the LEDs and a cooling fan. I recycled a smallish northbridge heatsink fan to keep the leds happy.

I’ve rigged up a temporary mounting solution using a T and two more elbows.

Workbench Camera

Seeing a few other Makers add simple camera & boom systems to their workbenches, I was inspired to do the same. I tried to keep the construction as simple as possible.

Camera Boom Track

My boom track consists of two 3/4 inch floor flanges, two 3/4 inch 90° elbows, NPT on one end, slip fitting on the other and a five foot length of 3/4 inch schedule 40 pvc. The boom arm consists of a 1″ x 1″ x 1/2″ T fitting, cut in half, several random lengths of 1/2″ schedule 40 pipe, two 90° elbows and a end cap drilled and fitted with a 1/4-20 bolt, nut and wing-nut.

Camera Mount

Nothing is glued, so far friction holds it all together. I figure I can add set-screws if the elbows start to slip too much.

The camera is a Microsoft Lifecam Studio, which is a 1080p sensor with a fixed aperture auto focus lens. It’s a cell phone camera basically, when you get it to focus, it does a decent job. I’ve only recorded in 720p, I haven’t found the option to record video in 1080p, maybe my PC isn’t fast enough.

Pentax IR Interval Timer

Hey, look at that, my blog website is still alive and working. Last post was Sep 2010, a long time ago.

I’m planning a trip to the desert, and one of the things I wanted to make for myself were time lapse movies of sunrise or sunset, and the night sky. My DSLR does not have a wired remote capability and Hoya has decided not to include an interval timer on their low end DSLR

I could have purchased a timer off ebay, that claims to be compatible with every DSLR ever made but those claims make me skeptical. I also did not care for their user interface. So, many months ago, I tore apart one of the Pentax IR remotes, to see what makes it tick. It was a simple design on the inside, a rather large micro-controller with external clock, a transistor, a capacitor, a few resistors and an LED. The trigger button was one of those resistive pad-switch types. Originally I thought I could just trigger the remote by pulling one side or the other end of the button high or low. This did not work, and when I scoped it, I discovered a handshake was employed between the two terminals of the switch, both leading to micro-controller pins. So it looks like Hoya didn’t want people hacking the remote directly.

Switching to plan B, I tore apart an old pioneer cd changer and harvested its IR decoder chip. Following some arduino code from Lady Ada, I tried to capture the timings of the IR signal using a PIC. This worked to a degree, and probably warrants further study down the road, but I couldn’t get the pulse train quite right and so the camera would not respond.

Abandoning the learning-remote line of thought, I connected the IR decoder to my o-scope and manually measured the pulse train. It was only 26 msec, and consisted of 15 transitions. 13 msec on, 2.8 msec off, and then 1 msec on/off repeated eight more times. Using the 12F683 chip (one of my favorites), I had access to an 8MHZ internal clock and a hardware PWM module. Microchip claims the hardware pwm maxes out at 20khz, but I had no trouble getting a stable 37khz carrier out of it. Then I whipped up a little subroutine in proton basic which toggled the carrier on and off with the appropriate timings. I had setup the pic’s pwm output on channel 1 of the scope, and output of the ir decoder on channel 2. I could fire the pentax remote at the decoder and compare it to my pulse train from the pic. When they were an exact match, I got the camera and presto, it started snapping pictures.

Cam Remote Schematic

That schematic is what I’ve worked out for a bare-bones version of the remote. A single button is used to program the interval, there’s a status led and room for two IR emitters. My current prototype is only using one emitter, because that is all I have right now. I’m also using a 2N3904 which isn’t ideal, but it was working on the breadboard and now it’s soldered in place. I just now looked up the specs, and the poor thing is only rated at 200ma collector current – that could explain the lack of output power I’m seeing on the emitter.

In interest of saving time, I didn’t make a PCB for this revision, but I’ll probably do that for the next prototype. All point to point wiring, I tried to be neat. I used a tiny SMT resistor to drive the transistor, it worked out real handy.

The timer and two AA batteries fit in this mint tin I’ve been saving for years. I don’t know if they are still in production; I would like to get a few more.

I field tested the timer at tonight’s sunset – I’m trying to figure out how to convert a bunch of jpeg’s into an avi now – stay tuned!

Update: Here’s the video, turns out Picasa can generate a timelapse … only 8 seconds, need more frames!

Mint Tin Bike Light Continues

As the (normal) bicycling season draws to a close for my latitude, I’m nearing completion on my bicycle taillight project. I sent out a few weeks ago for some professionally fabricated pcbs and as usual, they look great. There were a few bugs that were entirely my fault, but nothing serious enough to stop the pcb from doing its job.

bicycle taillight pcb assembled

I added two “features” to the pcb before sending the design out, both of which were untested in the initial prototypes. The main feature I wanted to have was “motion detection”, so the taillight would shut down should the bike become idle for a period of time. No need to be wasting precious photons while the bike is leaned up against a tree or parked in a bike rack. Motion detection is provided by a roller ball switch, intended to replace the old fashioned mercury switch. A tiny gold plated ball rolls around in a plastic and metal cage, completing electrical circuits during its travel. The light’s micro-controller recognizes these impulses and continues to let the light function. As soon as the tilt switch stops changing state, resting as either a short or open circuit, the uC begins a count. When that count totals some arbitrary number, the light returns to a standby mode with the SMPS in shutdown. The uC then watches the tilt sensor for the state to change again and upon a change, resumes the previous operational mode.

The second feature is a battery minder circuit. Using a 2.5v precision reference, the micro-controller samples the battery voltage using its on board ADC. The idea is to detect a weak battery condition and operate the SMPS at a lower duty cycle, to make the most of the remaining power. The assumption here is that some light is better than no light in terms of safety. One of my pcb bugs lies in this circuit. The Microchip 12F683 uC I selected for this project is an 8 pin device. Its voltage reference pin is also multiplexed with the programming clock. In my design, I had made the error of connecting the vref pin directly to the voltage reference output, which is biased with a 1k resistor to the Vdd rail (bat +). So effectively, I have a very strong pull-up to 2.5v on that pin. This made programming the PIC impossible as it could not detect clock transitions. I will try salvaging these PCBs by changing to a 10k or 20k bias resistor on the reference, or cutting the trace leading to the Vref pin and soldering a 10k+ resistor in series, since we don’t need any current on that pin, just voltage.

Once I polish the code a bit more, I’ll be looking for a few folks to send a sample units to in exchange for reviews and feedback, down the road I would like to sell these either as a kit or a pre-assembled unit.

Fresh PCBs

I just received these FedEX on Tuesday, fresh from China via Colorado.

taillight stack small

headlight stack small

The first stack of boards is the prototype taillight driver, sporting a tilt switch for motion detection. The second board is a pretty similar design, with a bigger inductor and more compact layout. The intention here is to run a trio of Lumiled’s Rebel leds at 0.5 to 1w each off 4AA batteries, for a compact self contained headlight. More details on that idea later!

Import Mouser Invoices into Excel

It would be nice if online parts vendors gave you csv or excel files of your order or invoice. Mouser for example gives you the option of html files or pdf files. Future lets you download a plain text file, but it’s next to useless, there’s no part numbers or anything! I’ve created an excel spreadsheet that will convert a mouser html file into an excel format. It’s not a magic single button click macro or anything fancy, but as long as mouser doesn’t mess with their page layout too much, it should work.

To start, log into “My Mouser” and go to your order history (not invoice history). Click on an old order, and after it opens up, click on “print view”. Print view strips out the form elements that just make things more complicated. Now go to File, Save As and save the web page as a compiled page (MHT format). Sorry firefox, I do love thee as my browser of choice, but this only works in IE as far as I know.

Now open your mht file in excel, you should see that excel properly parsed the order table into neat little rows and columns. Now, open the excel file I’ve provided at the end of this post. Right click on the worksheet tab and choose “Move or copy…”. Copy the worksheet to the mouser workbook. After you have the two worksheets together, rename the mouser worksheet into “Web”. You’re almost done!

At the top of my worksheet there are two cell fields, starting row number and starting cell reference. The row number is where the parts table starts, it has been row 31 on all my orders so far. Starting cell reference is the worksheet reference for the first cell containing parts data, this has been B31 for all my orders so far. Be sure to include the sheet reference as well, so you want that to read “Web!B31”. If your order history is like mine, you may not need to change either of these. Once you get it right, you’ll see the rest of the spreadsheet fill in with your parts data. Now you can save this as an excel file, or export it as CSV, or whatever.

Download the excel spreadsheet

Painted Taillights

A little quick work with the rattle can this weekend “finished off” my revision 2 and revision 3 bike taillights. Revision three is nearly the ‘final product’ but still lacking some automatic control circuitry that I want to implement, and a few tweaks to the firmware to make it simpler to use.

painted bicycle taillights

I haven’t mastered cutting a straight line with the dremel yet, once the cutting wheel bites into that thin steel it goes the direction it wants to go!

I also painted the circuit boards, masking off each LED lens on the 2×8 array so they’d stay nice and bright. I also masked the smt button, the switcher and the contact springs on the battery clips. I probably didn’t need to mask the switcher – I wasn’t sure what the paint would do it it, seeing as how it’s handling quite a bit of power at a high frequency.

I’ve also posted some new videos to my youtube channel – nothing too exciting. There’s a naked revision 3 doing its thing and a side by side of 2 and 3 post paint job.

Mint Tin Bike Light 3

I completed PCB revision three of the mint tin bike light on Tuesday, but due to lack of batteries for the camera, no pictures were taken! Luckily I’ve found and recharged a second set of batteries and the camera is once again operational.

Feature-wise, this revision adds nothing over the previous light, all the changes are in board design. Firstly, the artwork was redone using polygon pours instead of straight point to point wiring (traces). The revision two switcher was running pretty warm, mostly because it didn’t have much copper to dump the heat into.

The switcher’s ground pin is now tied directly into a very large copper pour, as are the Vin and Switch pins. Using a burning finger temperature probe, the chip remained at or below Tbody even operating in constant on mode at full power. Compared to the revision two board which saw the switcher running quite hot in constant on mode.

The current sensing resistor was moved a lot closer to the feedback pin. With a feedback voltage of 190mV, the tiny resistance of the trace was actually affecting output. Shortening the trace to roughly 1mm has helped a great deal.

Finally, the layout for the battery clips was fixed, and generous polygon pours were drawn around the pads. The spring clips are now soldered down very firmly and hold the batteries quite well. I have yet to take this unit on the trail, so we’ll see if a rubber band is required or not to retain the batteries while bouncing along.

I plan on making one more prototype before sending the design off to Custom PCB or Gold Phoenix. I think I’ll eliminate the battery clips on the chance excessive force could cause one to separate from the laminate and severely damage the pcb. I also want to try a board that hosts both driver circuit and LEDs. Additionally, I plan to add a tilt / vibration sensing switch (roller ball switch), so inactivity of the bike can be detected and the light switched off to save on batteries.

Thanks for reading!

Under the Sea

The previous “I Feel Dirty” theme was getting a bit old, so I decided to change things up! This is “Under the Sea”. I notice it is formatted for 1024×768 instead of 800×600. What do you think about that? I run a high res on all my personal monitors, but working in the IT business, I know low res is still popular with a lot of people, even if they have big monitors. If I stick with the wider format, I’ll resize some of my recent pictures so they match-up with the text.

Given that broadband adoption continues to rise world wide, I’ve increased the number of posts displayed from 3 to 5. My feeling on the small number is my posts tend to have lots of pictures, and I like to minimally compress them as possible to maintain good quality. People on slower connections or slower devices might have trouble downloading several megabytes of data to render a page. I have an old pentium 3 laptop that despite my broadband connection struggles to view some modern sites. Drop me some feedback if you find more is better, or if it’s too much.

A friend pointed out that I have several unanswered questions in the comments for some of my posts. This website is my blog, a place to record my thoughts, and in the process, share them with the public. I don’t view it as a discussion forum. I welcome comments, criticisms and feedback. You can certainly post a question, and as long as it is relevant and makes sense, I’ll approve it as a comment, however, please don’t expect an answer. Really good questions usually receive a response either here or via email. If you want a discussion or debate on something you see here, pop on over to Linear’s forums: http://forums.linear1.org.