Build Log: The 1.5V Project

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
Pogo Pin Programming

When it came time to test the lower/upper limits of the firmware I ran into an instant and serious thermal issue. The wooden test platform was horrible at distributing heat away from the driver PCB and thermal shutdown meant it would run on high for < 1 second before turning off. It became apparent that the driver boards needed some heatsinking to really test the efficiency at high drive levels.

A few hours (ok, a full day) on the lathe later and I had a brass pill:
driverpill.jpg


And it fit the boards really well!
driverpillpano.jpg


For this board there wouldn't be 6 wires coming out of the pill so I needed a way to program the board in-place. With a bag of pogo pins, it was time to make a programming header.

I started by marking out the holes on a sacrificial PCB:
markingdrills.jpg


Then chucking up a 1/64" needle-thin drill in the Dremel-press:
dremelpress.jpg


needlethin.jpg


The results weren't very pretty... I think my punch marks were off-center which caused the drill bit to wander around before biting in.
notpretty.jpg


I repeated the same thing, but with a pin to hopefully get the punch marks closer to center:
pinprick.jpg


notbad.jpg


Most of these holes went in dead-on. I realized while test-fitting the pogo pins that they were simply too wide to squeeze 6 of them into such a small grouping without shorting them together. The 6-pin header quickly became a 1 pin header as I drilled holes in pads all over the place.
holeseverywhere.jpg


I applied a little electrical tape to the bottom of the board so the pins wouldn't touch any pads or traces, then poked them through and (messily) soldered them in place.
pinsinplace.jpg


sloppysoldering.jpg


Six wires were run to a remote programming header and the messy little device was finished!
sixwires.jpg


In use, the programming header is placed over top of the board to be programmed, then pressed down. The spring-loaded contacts maintain pressure while the code is banged over the wires into the device. The pins are only 2mm in diameter but look huge in comparison to the PCB pads. No wonder they wouldn't all fit!
spiderheader.jpg


With the code sent, I attached a few wires, squished it all into the brass can, and fired it up!
testrunfail.jpg


The secondary LED sprang to life....

... and proceeded to flash error codes out at me. The microcontroller wasn't communicating with the LED driver. A bad solder joint and the whole assembly is now basically useless.

Soldering the LED driver has been hell on this project. It's a 0.4mm pitch DFN package which means it's 3mm across and has 6 legs half the width of a human hair that all need solder and cannot touch each other. Oh and there's no way to tell if they're grounding beneath the package because you can't see under it.

My current method of reflowing standard solder just wasn't working. It was time to give solder paste a try.

>> Return to root post
>> Continue to next post in the series
 
Last edited:

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
Solder Stencils (and high blood pressure)

I've never used solder paste before, mainly because:

  • It must be shipped overnight in a refrigerated container
  • It costs almost $1 per gram
  • It's basically liquid lead that goes everywhere
The idea with solder paste is simple - you make a stencil and squeegee it on (like silk-screening a shirt). Then you plop your components in the paste and bake at 240. Soldering without the iron! Stainless steel solder stencils from overseas are $100+ dollars. Mylar ones are $10 but shipping to Canada takes 3 weeks. I had neither and wasn't willing to wait a month and spend a couple hundred bucks until I knew the stencils would work.

Enter Felix! DIY home-made SMT metal stencil - the definitive tutorial. His video made the process seem pretty simple. I'll spoil it for you and tell you it's not. :scowl:

I started as he did - by chopping up a soda can.
cuttingthecan.jpg


He recommended cheap shelf vinyl so I went and bought some and tested my laser printer out on it...
printingvinyl.jpg


... and tested, and tested, and tested. Every possible combination of printer settings was tried until I found the sharpest image.
moretesting.jpg


A hot iron was then used to transfer all the laser toner off the vinyl and onto the aluminum:
ironingthemetal.jpg


Or.... not?
ornot.jpg


Boy, that didn't come off on the metal even CLOSE to how it appeared when printed:
tonercompare.jpg


An entire day disappeared while I tried different iron temperatures/time/pressures. 6 hours of ironing and this was about as good as it was getting.
evenmoretesting.jpg


Getting rather desperate (and increasingly frustrated :tired:) I decided to switch from Felix's vinyl recommendation. When I etch copper boards I use magazines for toner transfer, so I pulled out the nearest, cheapest volume and printed on that instead.
llbean.jpg


The difference was immediate.
muchbetter.jpg


As it turned out, that stencil was a fluke. The next magazine stencil came out like this:
butnotperfect.jpg


I ironed well over 150 stencils that weekend, going through sheet-after-sheet of magazine paper and getting random results.
lotsofattempts.jpg


The answer came to me while walking the dog, strangely enough. I sanded the crap out of one of the aluminum sheets and confirmed my suspicion that Felix's "it needs to have a glass smooth surface" idea was bogus.
moresandingneeded.jpg


The 11 best (now sanded) stencils were selected:
oceans11.jpg


Each was entombed in packing tape to seal the aluminum from the acid etchant. Only the toner and exposed metal pads were left.
entombed.jpg


The etchant was a solution of 1:3 hydrochloric acid to hydrogen peroxide. Definitely not an indoor activity. The glass bowl on the right has the solution and the plastic one in the middle was for rinsing.
notarealfumehood.jpg


The etching took about 9 minutes in the -5 celcius weather. It starts quite slow and finishes extraordinarily fast.
bubbles.jpg


Pulling it out of the bath, I wasn't exactly blown away. Looked like nothing at all had happened - until I flipped it over against the sun.
lookslikenothing.jpg


ohtherewego.jpg


Three at once was a horrible idea; I couldn't get them all out and rinsed in time and a couple over-etched.
partytime.jpg


With the etching done, the tape came off and the acetone came out to remove the toner.
cleaningacetone.jpg


The stencil needs a jig to hold the board in place and give a level surface. This was my best shot at that. The stencil is taped on the left and flips down.
stenciljig.jpg


At this point I was done ironing and etching for a couple (dozen) years. If it works, cool, and if not, at least it looks pretty. :D
lookspretty.jpg


While it's probably not any more harmful than solder you hold between your fingers, this stuff gives me the willies.
nastystuff.jpg


A little bit goes on the stencil...
alittledabwilldoya.jpg


... the high-tech squeegee comes out...
squeegee.jpg


... :fail:
argh.jpg


My second attempt did better. Each subsequent attempt actually improved quite a bit.
dammit.jpg


There are 4 legs on that chip in the middle - not 2. The legs got bridged and this board is useless (I couldn't fix it with my iron, no matter how I tried).
solderbridges.jpg


Unfortunately, my first 14 attempts all came out with 2 legs due to solder bridging.

The 15th worked.
slotmachinepicture.jpg



The DFN chip was even worse - it would look perfect but fail to work for no obvious reason. Pulling out the multimeter would inevitably tell me that it was bridging beneath the chip where I couldn't see it. I really needed a way to test whether a solder job had worked successfully without populating the board and finding out afterwards.

This is about the point where I realized after 35 scrap boards it was time to work smarter, not harder, on this project. It was also time to take a break from it; for my sanity, my pocketbook and my marriage. :) For the next month or so I'm going to think about what I want my diagnostic board to do (flash firmware, test electrical connectivity, etc) and then make a proper one.

Should be back with an update then!

>> Return to root post
>> Continue to next post in the series
 
Last edited:

Hallis

Flashlight Enthusiast
Joined
Aug 23, 2004
Messages
2,590
Location
Dallas, Tx
Wow I couldn't even fathom soldering things that tiny. This may or may not help but it just popped into my head. Some companies do brass photo etchings for detail sets for plastic model kits. Some of their stuff for 1/700 scale warships for example, are impossibly tiny and yet full of details. You might google up some of those and see if they'd be willing to offer you some advice or help. I woudln't be at all surprised if one of them offered to do a little test piece for you to see if you could use it as a stencil and get greater detail with that method.
 

nickelflipper

Newly Enlightened
Joined
Sep 27, 2010
Messages
82
Location
NE Oregon, USA
calipsoii I have felt your pain in working with a LTC3454 DFN package (a whopping .5mm lead spacing), and no stencil. A shelved project, but when revisited I will be going with an OSH Stencil to keep my sanity. Being in the States, their stencil turnaround is about a week.

Also tried the pogo pin to blank pad programming interface, and wasn't impressed with that method either. My best results were to make an adapter from 0.1" spacing male header and wiring to another adapter with 0.05" spacing, and corresponding pads with a minimum annular ring to match, like this:
05inchprogrammingadapter003.jpg


That was for a PIC on a bigger board, but I'm sure Harwin or? has 2x3 headers with 0.05" spacing. The 0.05" protoboard was a leftover from a piece of SchmartBoard.

Without vias under the powerpad, and more associated copper, I would be surprised that the project would not have to be derated to some degree.

Good luck with the project, and thanks for sharing.
 

Mike S

Newly Enlightened
Joined
Apr 29, 2011
Messages
132
Nice work, I wish there were more members DIY'ing their own drivers.

You might find it easier switching to the photo resist method for home made PCB's and solder stencils. The only downside is that it's more expensive, but I can say from experience that it's worth the trouble. You'll be able to etch a 0.5mm pitch with sharp professional edges, no problemo.
 

Lyndon

Newly Enlightened
Joined
Sep 14, 2007
Messages
65
Location
Minnesota
Did you try solder wick to clean up the bridges? I find that wick + flux works really really well. Also, for such a small board, instead of making a stencil, I buy the paste in syringes and dispense by hand. Less painful :)
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
@Mike S
I'll have to give the photo resist method a try, that sounds much easier.

@Lyndon
Yeah I realized afterwards that a syringe would have made more sense. Thanks for the advice about the wick + flux - I've always had really poor luck trying to use a solder wick but I betcha it's because I haven't been using much (actually any) flux while doing so.
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
I had a chance this weekend to work on the 2nd part of the driver assembly (the sleeve):
pillsleeve.jpg


The pill itself slips into this sleeve, which will eventually be threaded and have the head & body screw onto it. I screwed up the drilling and as a result the o-ring grooves are offset (they should actually be centered in the middle). It doesn't matter though since this is just to heatsink the LED and driver for my testing.
pillsleevebottom.jpg


Eventually I plan to use 16mm SinkPads, but in the meantime, this Nichia 119 on a square MCPCB is the only thing that would fit. The grey stuff is Arctic Silver 5 thermal paste.
pillsleevetop.jpg


This particular driver assembly has the secondary LED soldered right on the PCB so it's currently trapped in the middle of the pill! You can see it glowing through the wire holes. Eventually it'll be moved somewhere a little more visible. :D
pillsleeveredeyeflight.jpg


And it even lights up. :thumbsup:
pillsleevelit.jpg



-you built this to use a 1.5v powersource. What changes would be necessary to have the same functionality from a 3v source? I have several older lights that ive been looking to upgrade (arc ls, longbow micra, etc)
-what is the maximum and minimum drive levels currently? And what sort of efficiency are you looking at at each?

I meant to answer this earlier John_Galt but wasn't able to get any decent testing done on the wooden testbed. Now that I have some metal to heatsink the whole assembly I'm going to run through some tests and get an idea of how the circuit performs.
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
Whoa, a month already since my last post to this thread.

I actually have been working on this project, dead as the thread itself may seem! The problem is that the build has reached a 'boring' phase where I'm writing code and don't have a lot to actually show you. However, nbp's "CPF is boring" thread was an excellent kick in the butt to make a post regardless of that fact. :D

I'm currently writing the firmware that gets flashed to the microcontroller. While I said in my requirements that I want a 1-level light, I also said that I want the level to be changeable, so that requires a bit of code. While I'm in there, if some additional functionality gets implemented, well... :devil:

To illustrate what I mean by boring, this is what I've been staring at for about a week straight:
writingfirmware.png


I just finished the 'operational' code for the light and am about to start on the 'programming' code. What that means is all the day-to-day functionality is working but the once-in-a-while programming isn't.

What works:
- multiple output levels (1-4)
- toggling levels via the power switch
- mode memory (comes on at last brightness) and no mode memory (comes on at level 1 every time)
- primary and secondary LED selectable for each level
- light-shows (blinking, pulsing, SOS, etc)

What needs done still:
- writing a programming menu that's hard to access by accident
- toggling mode memory on and off
- setting how many output levels are in the 'rotation'
- setting the brightness/pattern/LED at each level

What needs figured out:
- how best to provide a power source for the uC after the light is switched off (perhaps a huge bypass capacitor, maybe something else)

Not the best video but here's a quick shot of the test-bed in action. Mode memory is enabled and a quick click is required to switch output levels, otherwise it stays the same.


It's been a little hard staying motivated during this phase of the project since embedded debugging is so painful and the whole task isn't very glamorous. That said, the firmware is one of the most important parts of the light and I cannot wait to have full programmability using only the power switch.

More to come soon!
 

HarryN

Flashlight Enthusiast
Joined
Jan 22, 2004
Messages
3,977
Location
Pleasanton (Bay Area), CA, USA
That is an interesting chip selection. I had wondered how it was working on one AA cell.

Have you been able to get the basic voltage boost aspect of the circuit working yet ? I have used some of the other Linear chips for boost circuits and that under chip thermal pad is a bit deal to get right.
 

Der Wichtel

Enlightened
Joined
Mar 12, 2007
Messages
829
Location
Germany
Nice to see more electronics projects here!


What needs figured out:
- how best to provide a power source for the uC after the light is switched off (perhaps a huge bypass capacitor, maybe something else)

I had that same problem. However it took a while for me until I found a simple solution. Instead of a big capacitor providing the energy for the whole microcontroller circuit during the off time you can also use the following attempt:

In one of my projects I use a small ceramic C with 0.1uF-1uF directly connected to one of the ADC pins of the microcontroller (µC).
When the light is turned on, the µC turns on its ADC and checks the voltage of the capacitor. If it is below a certain level then keep the current mode from eeprom otherwise next mode and update eeprom.
After that the ADC is turned off and the pin of the µC is driven high to charge the C up again.

For me that worked pretty good.
Keep up the good work!
 

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
That is an interesting chip selection. I had wondered how it was working on one AA cell.

Have you been able to get the basic voltage boost aspect of the circuit working yet ? I have used some of the other Linear chips for boost circuits and that under chip thermal pad is a bit deal to get right.

Hmm, I don't think it's having any problems Harry, but this is my first time working with a Linear chip so honestly I wouldn't be sure what to look for. :duh2: There's no doubt that the whole driver board needs more copper in it, but I have some very tight size constraints and it simply wasn't possible. If I do another run of boards I'm tempted to do a 4-layer PCB with 2 layers of copper in the middle to really move the heat out of the chips.

I do know that the thermal pad has adhered to the footprint every time I've put it in the toaster oven, and efficiency isn't something horrible like 22%, so that's good enough for me. :)

Nice to see more electronics projects here!

I had that same problem. However it took a while for me until I found a simple solution. Instead of a big capacitor providing the energy for the whole microcontroller circuit during the off time you can also use the following attempt:

In one of my projects I use a small ceramic C with 0.1uF-1uF directly connected to one of the ADC pins of the microcontroller (µC).
When the light is turned on, the µC turns on its ADC and checks the voltage of the capacitor. If it is below a certain level then keep the current mode from eeprom otherwise next mode and update eeprom.
After that the ADC is turned off and the pin of the µC is driven high to charge the C up again.

For me that worked pretty good.
Keep up the good work!

What was the end result of that setup Der Wichtel? I'm trying to visualize what happens, so correct me if I'm wrong here...
- 1uF cap connects ADC pin to GND (you need a potential difference for current to flow, so the other end of the cap must go to something...)
- pin set high to charge cap
- user turns off power, cap slowly bleeds to GND
- user turns power back on
- check voltage of cap with ADC - if fully discharged, light was off for some time, otherwise light wasn't off for too long

I would assume the cap would discharge to GND almost immediat... actually... I see what you're driving at now. With the switch open and no path to ground, the charge in the capacitor has nowhere to go, right? So it stays charged for a reasonable amount of time? Will it ever discharge? Ideally I'd like it to discharge over 2-3 seconds so I can tell if the light has been off for a while.

You've given me some food for thought, thanks Der Wichtel, gonna mull this whole setup over for a bit...
 

Der Wichtel

Enlightened
Joined
Mar 12, 2007
Messages
829
Location
Germany
The driver worked fine with that setup. It was just the µC "board" connected to an existing driver but I never released it. It was just an µC in a big SOIC8 package with the cap soldered on directly and another pin to the drivers pwm input.

- 1uF cap connects ADC pin to GND (you need a potential difference for current to flow, so the other end of the cap must go to something...)
Yes the capacitor is between ADC pin and GND.

- pin set high to charge cap
- user turns off power, cap slowly bleeds to GND
- user turns power back on
correct, when the µC turns off the ADC pin changes to tristate and therefore the capacitor discharges slowly. You can find the input resistance of the µC in the datasheet. Should be around 1-100Mohm or more but varies between each µC model. Time for discharge/charge is t = R*C. So with 1MOhm and 1uF you'll get 1s.

- check voltage of cap with ADC - if fully discharged, light was off for some time, otherwise light wasn't off for too long
The capacitor doesn't have to be fully discharged. That's the reason using the ADC. Otherwise you can also use the standard input to detect high or low level. With the ADC you can check the voltage on the C and set the trigger level on you own.
If you want shorter off time for example then simply change the trigger voltage level to a higher level.
 
Last edited:

calipsoii

Flashlight Enthusiast
Joined
Apr 21, 2010
Messages
1,412
Ah, I totally forgot that you can tri-state the pins and that they have resistance - great explanation.

If I'm using a switch that physically breaks the connection to the anode of the battery, will your idea still work? I'm not using an electronic switch that does a software shutdown on the uC - it's a hard switch that severs the connection from GND to the negative terminal on the battery. With no path back to the negative terminal of the cell, won't all current stop flowing? If that happens, will the capacitor still discharge?

In a light like a Zebralight where the power switch just puts the components in shutdown, they can measure "off time" because the cell is still physically connected to the circuit and I assume the uC is in standby with a WDT or something counting how long it's been off.

In a driver like McGizmo's 3S Aleph, he's using a physical switch (the McClicky) that disconnects the battery but his driver still measures the time the light is off, so the capacitors must be draining somewhere (despite the battery being disconnected).
 
Top