# Build Log: The 1.5V Project



## calipsoii

Hi CPF! :wave:

The intent of this thread is to serve as an ongoing build log for a project I've been working on for a little while now. I always enjoy reading the build logs of others and I firmly believe we can never have too many people documenting their projects (so if you're working on something, post about it so I can follow along!). Hopefully this thread will serve as an interesting read or a cautionary tale, depending on how things go :devil:.

I should mention that this build log will be a little different format than I would normally do. I very much prefer to complete a project, document the whole thing with pictures, and then do a write-up afterwards. It makes for a nice clean post with lots of visuals. In this case though, the scope of the project is much bigger and I'm simply not done! So I'll be adding to it as I go along.

Enough of that though. Without further ado, let's get down to business!


*The 1.5V Project*

Not much a name, I know - it was the first thing that popped into my head when I sat down with this grand idea. It kind of stuck and now all my documentation is labeled that way, so I'm just going with it. The project started as a wild idea to create a 1xAA light. It's always been my favorite format and I've yet to find the _perfect_ AA light (probably because my definition of perfect is constantly changing). Which is actually part of the reason why I set out to try and make my own; one can never be satisfied until they control all the variables.

The criteria at the outset of the project was pretty simple:


Runs on 1xAA
Doesn't need to be very bright, just usable
Couple hour runtime
_MUST _use a reflector (I really dislike optics)
One fixed output level...._ BUT_ the output level must be programmable through an interface and not by swapping resistors or using trimpots or opening the light
Must must MUST have an emitter I like. I don't like the XM-L2 nor am I particularly fond of the Nichia 219. In today's marketplace a light using something other than those is a rare beast
A clicky body for clipping to my jeans pocket and a twisty body for riding in the 5th watch pocket
NO KNURLING ON THE BODY, just the ends. My lights spend most of their life squeezed between my lips and I hate it when the knurling shreds them all up (especially as we head into winter)
 There ya go! There are no shortage of 1xAA lights on the market and I'm sure if I looked hard enough I could find something to tick all those boxes. That'd make for a pretty boring build log though, so let's pretend this light doesn't exist and we'll make one instead. *

[----- I'm going to update this post as the work progresses. I will add a link to each section below for ease of navigation -----]*​










*Prototyping the Circuit*








*Building the Test Platform*








*Pogo Pin Programming*








*Solder Stencils *(and high blood pressure)








*Writing the Firmware*








*Building a Better Socket*








*Rolling the Die(s)*








*Machining the Driver Pill*








*Machining the Head & Body*








*A Clip Named Misty*








*Punchin' The Numbers*








*The Sum of its Parts*








*Beamshots and Afterthoughts*








*Runtime Graphs*






*Mini Update: Needs More Threads!*

*Mini Update: Cutting Ahead
*
*Mini Update: To Trim a Reflector*








*I See You've Constructed A New Light...*





*Mini Update: Thoughts on v1.2**Mini Update: Punching a Square Hole
*








*Quality vs. Quantity*








*A Host Does Not a Light Make*








*LED's and 003's*








*Practice Makes... Diamonds?*








*Instruction Manual *
(or:* How Do I Work This Thing?!*)








*A Dazzling Display of Color*








*Instructional Videos*








*SOIC Programming*








*PCB's Fit for Royalty*








*Back to the (Bread)Board*








*Now I Know My ADC's*








*Machining the Gen. 2 Driver Pill*








*Machining the Gen. 2 Head*








*Machining the Gen. 2 Tailcap*








*Machining the Gen. 2 Body*








*Putting It All Together*








*15VP v2 Measurements*








*3rd 4th Time's the Charm*

​


----------



## calipsoii

*Prototyping the Circuit*

With a general idea of what I wanted the circuit to do, I set to work reading datasheets and ordering parts. When they arrived a few days later (DigiKey shipping to Canada is amazing!) I was excited to hook them all up. Previous projects have taught me that a little planning can save a lot of headaches though, so I started with that.

The squares in an engineering draftbook are excellent representations of the solder pads on a chunk of protoboard:





The wires connecting the microcontroller in the middle are TINY enamel speaker wires. They're about as wide as one of the lines in your thumbprint. So if the soldering looks sloppy, you'll forgive me 





The million dollar question of course is: does it work? Well let's grab a couple batteries (one new L91 and one very dead alkaline)...









... and hook them up and see what voltage we get out of it!









Looks good! It's very gratifying to find out none of your enamel wires are shorting against each other. Added a green LED (Vf = 2.3V) to indicate whether we're cooking with gas when a cell is connected





In my excitement I couldn't resist hooking up a power LED to see if it worked (probably not a smart idea without some current control but everything survived)





It's easy to lose sense of scale when looking through a bunch of macro shots, so here's one to give you an idea how bloody small the step-up chip is





With the boost converter prototyped, it was time to look at the aforementioned


current control 
programmability 
I started with the programmability bit since this is more up my alley. This simple protoboard just has an Atmel programming header and an input and output header. The only way I could get the microcontroller to route its wires nicely was upside down, so it got soldered dead-bug style.





The uC board was hooked up to my AVR programmer to confirm everything worked (it did - discrete components with large legs are so lovely to solder) and it was time to move on to the current control board. As you can see, the boards are quickly multiplying... :sweat:





The prototyping ended shortly after that when I realized that my enamel wires simply would not fit into the 0.4mm pitch of the LED driver. No way, no how was that getting soldered. The end result looked a little bit like the board had been through an autopsy. :sick2:





No matter, we've come to far to quit now!

>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

*Building the Test Platform*

When last we left off, I was discovering how amazingly, impossibly small 0.4mm pitch is on a DFN chip. With a box full of Digikey parts mocking me though, I had to know whether this circuit was going to work so it was time to head into Eagle and make a couple real PCB's.

(I should mention that I asked an electronics engineering grad whether my circuit diagram was going to work. He wrinkled his nose, called the design 'perverted' and said he didn't know. Ah well, only one way to find out.)​

The circuit design in Eagle took 5 weeks. I was 3-for-3 on ordering PCB's and discovering I'd overlooked stupid errors in my design so I spent extra time on this one. When the boards arrived there were no obvious defects. 





Well, almost no defects. I failed to take into account the amount that the router bit would remove as it made the boards circular and it trimmed an excessive amount of my heatsink/ground pad. This ended up being a serious pain in the neck later on, so I figured I'd mention it now.

Soldering on professional PCB's is a breath of fresh air after working with enamel wire and protoboard. The 2 boards (boost + driver) turned out very nicely and all the little 0.4mm legs reflowed wonderfully in my $55 Black & Decker toaster oven.









I've found over the years that any time/effort you expend up front on something usually pays dividends later on. With that in mind, I wanted to make the test bed functional, accessible and easy on the eyes. This was the final design; it's about half complete in this image. All the major components (electronic guts, LED, switch, battery) are swappable and easily probed with a multimeter. The wood block is a stained chunk of oak. 





To finish it off, a warm-white Osram GDP gets strapped to the aluminum heatsink and a piece of clear plexiglass pins the driver boards down.





I whipped up some _very _alpha firmware and loaded it via the programming header (6 pins in the foreground). The software just displays that the primary/secondary LED's are working and that the LED driver is setting levels properly. I initially set the output to max and the light started flashing rapidly - it took me a minute to realize this was the thermal protection of the LED driver kicking in! The PCB in the foreground seared a mark into my finger when I touched it.


With the test bed complete it was time to think about how the firmware was going to work!

>> Return to root post
>> Continue to next post in the series


----------



## STiFTW

Very cool, saving this thread to watch the build!


----------



## blah9

Yes, I am doing the same. Thank you for posting this as well as future updates! I'm very interested.


----------



## AnAppleSnail

Amazing to read your methodical progress!


----------



## Steve K

Looks like fun!

Having looked around for boost converters that can run off of one AA cell, I have ask.. what boost converter are you using??


----------



## calipsoii

Steve K said:


> Having looked around for boost converters that can run off of one AA cell, I have ask.. what boost converter are you using??



Linear's LTC3528. Only comes in DFN package so it's a little fiddly to solder but the chip seems to work nicely. Only thing I'm worried about is that its efficiency at high drive currents doesn't seem amazing. Need to test it more before I pass judgement though.


----------



## Steve K

hmmm.... I didn't have that part in my list. The datasheet does hint that 200mA is typical for output current with a single cell input. Since it's a voltage regulated boost converter, it's harder to predict what the output current will be when driving a LED. Are you using the voltage limit as a way to limit LED current (i.e. setting the voltage fairly low, such as 2.9v), or are you relying on the mosfet current limit as a way of limiting output current? Or maybe just using a single cell battery is sufficient... it's not easy to get a lot of current to flow through an inductor without much voltage. The inductor resistance might be enough to limit current.

and while I'm asking questions... I can't help but notice that you have two boards, and both have inductors on them. One board is the boost converter circuit, and the other is for the Atmel uC. Is the Atmel running as a buck converter? That inductor probably isn't on the board just for looks, so it appears that you are running two converters in series. That's not going to do much for efficiency. Or is the boost converter just to provide power for the Atmel, and it's running as a boost converter to drive the LED?? 

If you could post a schematic, that would answer a lot of questions! 

oh, for what it's worth, I found a nifty boost converter designed to run a high power LED from a single AA cell. It's the PAM2805 from Diodes Inc. It appears to be designed specifically for flashlight use. The only problem is that it doesn't appear to be available in small quantities right now.


----------



## calipsoii

Hah, no way I'm posting a schematic Steve K. Then you'd know exactly how little electronics education I actually have.  Sort of like finding code I wrote 10 years ago - it did the job for 10 straight years, but man, it sure ain't pretty. I have a little mucking around to do but I have a feeling I'm going to lose the 2nd inductor. It was an experiment that hasn't worked all that well so far. Assuming I can coax the thing into doing what I want I'll post more details later!

Right now my big problem is heat - wood is an excellent insulator! A nice-looking choice but probably not the ideal one when ratcheting up the current flow.


----------



## darkknightlight

Very cool build idea! I can't wait for the next update.


----------



## gunga

While I don't have the same design criteria as you, I think this is fine work. Very cool to design and build your own light! Kudos, a fellow Canadian too eh?!


----------



## nickelflipper

calipsoii said:


> Right now my big problem is heat - wood is an excellent insulator! A nice-looking choice but probably not the ideal one when ratcheting up the current flow.


Subscribed! I love seeing real world driver build ups.

I don't see any vias for the LTC 3528 power pad? so, no associated bottom side copper? Linear fails to mention how much copper area is required to meet the data sheet results. Looks like a 17mm board, so have you tried it in a P60 (or ?) pill for extra heat sinking?


----------



## calipsoii

Sorry for the lack of replies guys, work's been pretty busy this week. Gotta finance this hobby somehow! 



gunga said:


> While I don't have the same design criteria as you, I think this is fine work. Very cool to design and build your own light! Kudos, a fellow Canadian too eh?!



Yessir, from smack-dab in the middle of Alberta! Well, even if the design doesn't interest you, I hope I can entertain you in the process. 



nickelflipper said:


> Looks like a 17mm board, so have you tried it in a P60 (or ?) pill for extra heat sinking?



Oh man, if it was 17mm diameter I'd be able to have a huge grounding/heatsink ring around the driver board. I wish! Everything barely fit at the size it is now.





You're absolutely correct about the lack of heatsinking nickelflipper. Aside from the bit of copper on the board, there is no place for it to go right now. I hope to rectify that this weekend, assuming all goes according to plan. Wish me luck!


----------



## Mike S

Wow, nice work. I can't believe you successfully hand soldered that DFN package. 

Have you tried prototyping with homemade PCB's? I've found that it works well enough that you typically don't have to order professional boards.


----------



## calipsoii

Spent a few hours today turning this:





Into this:





A little rough around the edges, but pretty damn good for a first attempt at a prototype I think! There are pictures of the machining process, of course, but I _do_ need to save something for my "Building the Pill" chapter. :devil:

I think that this should help immensely with dissipating the heat from my test boards so I can finish writing the firmware. They fit snug as a glove. There is a threaded slot on the side for a _tiny_ hex head set screw but nobody in town carries them so I'm waiting for an internet order. It'll tighten the pill up so things don't bounce around.










Going to solder components on those 2 boards tomorrow and see if that helps with the heat!



Mike S said:


> Have you tried prototyping with homemade PCB's? I've found that it works well enough that you typically don't have to order professional boards.



Hi Mike S!

I have actually done a little etching at home:





There's no way on Earth I could etch a 0.4mm pitch DFN footprint though. I basically consider having the PCB's professionally done the cost of my sanity.


----------



## John_Galt

Very interesting build!

Looking forward to some updates but I have a few questions about the overall circuit design.

-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? 
-im sure this will be detailed, but what sort of ui are you looking at?


----------



## John_Galt

Very interesting build!

Looking forward to some updates but I have a few questions about the overall circuit design.

-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? 
-im sure this will be detailed, but what sort of ui are you looking at?


----------



## Hallis

amazing work. Can't wait to see the pill build. Might want one of these little things for myself as i've got a 1aa mod that I used to have a LuxIII/14500 setup in.


----------



## TexasLumens

Danged nice work!! I like the thought put into the project.... even the test platform is almost surgical!!! Nice!! Anxious to see more. :goodjob: Dan.


----------



## Illum

:wow:
:bow:

subscribed!


----------



## calipsoii

*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:






And it fit the boards really well!





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:





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










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.





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










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.





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.










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





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!





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





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


----------



## gunga

Wow. This is pretty darn cool. Even when things don't work it's cool to see.


----------



## calipsoii

*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.





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





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





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





Or.... not?





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





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.





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.





The difference was immediate.





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





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





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. 





The 11 best (now sanded) stencils were selected:





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





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.





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





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.










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





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





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.





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. 





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





A little bit goes on the stencil...





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





... :fail:





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





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).





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

The 15th worked.






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


----------



## Hallis

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

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:





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

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

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

@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

I had a chance this weekend to work on the 2nd part of the driver assembly (the sleeve):





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.





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.





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. 





And it even lights up. :thumbsup:








John_Galt said:


> -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.


----------



## Mattaus

Sorry if this has been mentioned, but what IC are you using in this project?

- Matt


----------



## calipsoii

Linear's LTC3528


----------



## Mattaus

Ah cool. Now I see the need for the current control board seen as the IC itself is only a voltage regulator.


----------



## calipsoii

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. 

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:





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!


----------



## tobrien

this is amazing


----------



## HarryN

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

Nice to see more electronics projects here!




calipsoii said:


> 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

HarryN said:


> 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. 



Der Wichtel said:


> 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

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.


----------



## calipsoii

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).


----------



## Der Wichtel

Yes, it will always work. I used a hard switch as well.
The idea is that if the switch disconnects the circuit from power nothing is sourcing the C with current that keeps the voltage up. On the other hand the input resistance of the µC is still present that slowly discharges the C.

Took me a while as well to find out this solution since a couple years ago small ceramic capacitors with capacitance high enough to keep the µC running for a few seconds where painfully expensive. Nowadays you can even get them in the 100uF range for less than an Euro.


----------



## calipsoii

*Writing the Firmware*

In my excitement to leave the mess and stress of the solder stencils behind, I whipped up a prototype of the driver pill on the lathe. 

It's a brass sleeve, holding a brass pill, holding the electronics :duh2:






I was a little concerned about the electrical and thermal path and _really_ needed to see the bloody thing light up after all the effort soldering the tiny driver. I'm proud to say it fired up on the first attempt.





Before final assembly, I programmed the ATtiny with a VERY simple looping program (secondary high, primary low, primary medium, primary high). Once the MCPCB was soldered and the pill secured within the sleeve, it would be a significant amount of effort to disassemble and reprogram. The program worked just fine.


The problem is that a light that constantly loops low > medium > high isn't particularly useful. My better half later asked me "Well, can't you just change what it does using the power button?". That was the kick in the butt I needed to sit down and plan the firmware and start writing code.

The end result fits neatly on the microcontroller with lots of room to spare!





As I mentioned earlier to Der Wichtel, the light has no parasitic drain, so when you click it off the circuit is dead. This makes writing the firmware interesting because you can't really take anything for granted. Power could be cut at any time and completely interrupt whatever was happening. I spent a lot of time testing how each subroutine behaved when the rug was suddenly yanked out from under it. I like what "always on" lights offer but my personal preference is for a circuit designed around a hard disconnect switch.

Things I'm pretty happy with:


*factory reset*: put all settings back to the way they originally were 
*programming menu*: self-advancing timer-driven menu allows setting of all variables
Number of levels in the rotation (1-4) 
Output of each level (secondary, primary, light shows) 
Memory mode toggle (last level saved when on > 1 second vs. starting at level 1 each time) 
 
*voltage readout*: blinks out the battery voltage to 2 decimal places (1 blink --> 3 blinks --> 5 blinks == 1.35V) 
*low voltage indicator*: flashes the secondary LED when the battery starts getting low 
*beacon mode*: slow flash to help find it in the dark 
*output dimming*: main LED is current-controlled; secondary LED is PWM @ 13kHz and goes _low _ 
*output taper*: light stays in regulation as long as it can then drops into a direct-drive taper as battery dies 
*large input voltage range*: 0.5 to 5.5V (efficiency is decent at 1.5V, peaks at 3V, and drops fast at > 3.7V) 

The things I'm not so happy with:


limited to reading voltages up to 2.56V (this is as high as the internal reference on the ATtiny goes) 
even in deep sleep, the circuit draws ~2ma between beacon flashes (I think this is a combination of high resistance in my test bed and the boost converter idling) 
circuit currently doesn't know how long it's been off (Der Wichtel's capacitor suggestion may fix this) 
primary LED will only go down to 20ma (a limitation of the driver, though in practice it's about as low as I'd ever program it) 

A short clip of the voltage readout in action (3 output levels, memory mode enabled). Accuracy is within +-5% of what I get with my Fluke multimeter.


A short clip of using the programming menu to set output #2 to beacon flash.

the 3 crazy flashes indicate that we're working with menu item #3 
turning the light off tells the microcontroller that we want to change the value of menu item #3, so start ramping 
turning the light off during ramping tells the microcontroller to save the new value 
the newly saved level is displayed for 30 seconds before automatically moving on to the next menu item until all menu items are displayed and we exit programming mode 


There are some tiny tweaks I'll no doubt make to the firmware, but what's been written has been fully tested and I'm confident that if I were to seal the electronics up in a brass body, I'd be able to change enough settings to happily use the light. Much better than a never-ending low > medium > high loop!

Next up: a programming/diagnostic board to make soldering these things easier!


>> Return to root post
>> Continue to next post in the series


----------



## tobrien

awesome work!


----------



## Esko

Pardon for not commenting before but I think that this must be the most interesting project in Homemade etc. section for a long time. I'd like to ask one question (or more, but lets start with one). What are you going to do with the final flashlight? Are you going to make just a few for yourself and perhaps to some friends? Or, are you also going to sell these lights or light engines to fellow CPF'ers, or perhaps make everything open source? This is a big project and IMHO your flashlight is pretty much the most interesting light in AA format currently. Thanks for sharing it. :thumbsup:


----------



## calipsoii

Hi Esko, thanks very much for posting! I take it as the greatest compliment that you find the project interesting - that's been my goal with posting the build log. Even if the whole thing fails to launch I find it fun to read along with people's successes and failures, so it's always nice to hear that others are spending some of their time to read the stuff I write.

My short term goal is to make one, stamp my name and a serial number on it, clip it to my pocket, and pack it around all day long.  If it performs well and I like it, I have hopes of commissioning a local machine shop to make 25 more that I can gift to friends and family. 

I had no idea when I started the project that after a full year of evenings and weekends I'd still be writing firmware and really have nothing physical to show for it. It's been a real eye-opener to experience all the time, effort and money that goes into R&D (nevermind learning electronics and machining from scratch). We're looking at expanding the family now and I just hope I can finish the light before other responsibilities consume all my free time!

If the light turns out the way I picture it in my head, and other CPF'ers are interested in it, I think I'd like to make a small batch and sell them. I don't want to work on the project with the thought of sales in my head though, because:

there's no guarantee anyone else would want one 
it might take me 2 more years to finish it 
that kind of pressure would likely cause me to rush, and I don't want to compromise the end result (a leisurely pace gives me the time to get things just like I want them) 
 I like the _idea _of open-sourcing it, and if it turns out that having kids means I'll never get to work on this again, I might. For now though, I get a real kick out of making things for people and being compensated for the time and effort it took to do so. One of the things I'm most proud of is knowing that there are people in other countries who thought my A2 rings were cool enough to purchase. Maybe other CPF'ers will think this light is cool and want one - I'd be honored at the chance to build someone else's EDC light.  Guess we'll see what happens!


----------



## Mattaus

Not that I think you need help, but if you ever want someone to whip up a neatly laid-out PCB design let me know - I seem to have a knack for it


----------



## calipsoii

Mattaus said:


> Not that I think you need help, but if you ever want someone to whip up a neatly laid-out PCB design let me know - I seem to have a knack for it



Thanks very much for the offer Mattaus, might take you up on that!


----------



## schizeckinosy

Just wanted to pop in and say 

I'm thinking of getting in to IC programming, and I think what you are doing is very interesting!


----------



## AndyF

Any update on your project?.


----------



## calipsoii

*Building a Better Socket*

AndyF has given me a much-needed kick in the pants to continue with this write-up (thanks Andy!). With the firmware 95% complete I'm ready to build a couple more converter circuits and prototype a host body. It's high-time to have something physical to pack around and abuse! 

Some of you may recall my adventures with pogo pins earlier in this log. That ugly little assembly lasted ~4 more programming cycles before the pins started detaching and couldn't hit their targets anymore. It was _exceedingly_ frustrating to use. Not only that, testing the programmed board involved hooking up all the components. I basically had a finished light before I knew if it even worked. I've been kicking around the idea of a programming+diagnostic socket for a while now, so the time seemed right to get cracking on that.

I didn't snag any pictures while machining the Delrin assembly (I'm sorry!). It was -22 in my garage at the time and my hands were freezing. Getting the thing machined as quickly and accurately as possible before I froze solid was my primary concern. This is the finished result.





Next up was this sheet of acrylic





It's quite easy to work with! Just score...





... and snap!





The square corners proved a bit sharp so I repeated the process to double the number of sharp corners. :devil:









I pinched the acrylic to the Delrin with a clamp to line up the 4 outside radial holes....





... and marked the center of each with a nail.





I then proceeded to push *way* too hard with my hand drill and crack the plastic. :ironic:





I was more careful with the next piece and managed to get my 4 notches around the edges.





The two plastic parts are squeezed together like this (and in a moment you'll see why).





The socket has 2 main features: holes that line up with each of the pads on the underside of the board, and a lip that the PCB sits in to center it over those holes.





When I inserted my pogo pins up through the bottom of the socket, 2 fit nicely...





... but three's a crowd! 





It looks even less pretty from the business end. These pins don't have any pogo when you jam them in so tightly.





At that point I was ready to trash the entire idea. The tops of the pins would fit but the bottoms sure woul... wait. What's _inside _one of these things?





I whipped up a new Delrin socket, this one flat-bottomed without the hollow center. It was time to put a wild idea to the test:





You see where I'm going with this, eh?





To keep the wires from falling out when the assembly is righted, the acrylic pins them into their sockets and is secured by the machine screws.





I added a little chunk of protoboard to attach all my headers and solder the wires to, then tightened it all up with some washers and nuts.





The ISP programming header sits like so. I very gently twisted all the necessary wires to meet it after quadruple confirming the pins would match up.





Then each wire was carefully soldered to the header, solidifying the whole thing in place.





One end is now complete with a power & programming header.





The other end of the protoboard gets a similiar treatment - this one receiving an emitter on a star.





The little beast is now _almost _done.





Torturing the pins is all fun and games until you lose a spring, then they torture you trying to find it on your basement floor.





They did eventually give up the goods and I had enough for each PCB pad.





Each of the Delrin holes gets a spring and a pin.









Each pin is tested against its neighbour to ensure none of them are short-circuiting (none of them were). Not much left to do now...





... but push a PCB down onto it, send the code, and see whether this thing works!





Overall I'm very happy with the result. I should never have put the PCB pads so close together in the first place - lesson learned for any future projects. The time and effort spent on the programming socket is worth it though; the device is solid and makes my work 100% easier now that I can program and test without soldering a single thing to the PCB's.

So what's next? A prototype! If I haven't posted about it in a month, someone kick me in the butt please. 

Cheers!

>> Return to root post
>> Continue to next post in the series


----------



## Microa

What are the sizes of your pogo pins? The pogo pins which I am using is 0.7mm in diameter and the tip is 0.5mm. The test pad on the pcb is 1mm with 2.45mm clearance.


----------



## calipsoii

Microa said:


> What are the sizes of your pogo pins? The pogo pins which I am using is 0.7mm in diameter and the tip is 0.5mm. The test pad on the pcb is 1mm with 2.45mm clearance.



You've found smaller ones that I did obviously! The ones I'm using are 1mm at the tip and 1.5mm at base.


----------



## Skimo

I like your pin epiphany, the entire project really.:thumbsup:


----------



## Darvis

Dear Lord this is so freaking AWESOME!!!!


----------



## calipsoii

*Rolling the Die(s)*

After a much-needed vacation, I've spent a bit of time working on a prototype host. Progress has been... slow. My biggest issue right now is that the Taig lathe doesn't cut threads. 

This is a right pain-in-the-butt because it means I'm using a vise, a button die, and a die stock.





Results have been a little crooked.





I now have a small cluster of brass pills sitting on my dining room table, all of them with crooked threads. Enough is enough! It was time to look at building a proper die holder for the lathe.

I've never machined aluminum on this lathe, and being as a 2" piece was needed, I figured this would be a good project to give it a shot.





The outside cleaned up fairly nicely, though the metal itself was slowly welding to my cutting bits.





It drills pretty wild - huge fuzzy strings of swarf. I'm used to the neat little brass confetti. These big strings had a bad habit of swinging around and slapping my hands with their razor sharp edges.





With the hole drilled through, I switched to the boring bar to widen things out.





The throat of the die holder _should _now be only a tiny bit larger than my die.





But the best way to check is to pop the die in there and see how things fit. Success!





The aluminum wasn't all that kind to my machine. I think a larger, more sturdy lathe might be a bit more pleasurable to work it on. There was a lot of chatter/squealing throughout this project - you can see the slight chatter marks on the beveled edges I put around the holes.





I flipped the workpiece around in the jaws, trying my hardest to align it perfectly.





Unfortunately, getting zero run-out is pretty much impossible for me. I hid the intersection of the two surface cuts with a very snazzy looking groove around the bottom.





With the die holder complete for now, I switched focus to the brass rod it would ride on. This rod will be affixed to the tailstock ram and allow the die holder to feed itself down the workpiece.





I tested the holder on the rod frequently, looking for a snug (but not sticky) sliding fit. Got it!









The rod will be screwed onto the tailstock ram, so I drilled and tapped it.









The tailstock ram has a little raised area that requires more clearance, so I bored a little lip inside the bar.









After cleaning the chips out of the hole, it was time to see how things sat.

















There was the little matter of making sure the die was actually fixed inside its holder. This requires (at minimum) the careful placement of 2 holes exactly opposite of each other at the right height. I started by checking what kind of grub screws the die stock was using, then purchasing some replacements.









That this worked as well as it did _astounded _me. I built a Lego tower of slides, hung it off the back of the saddle, and mounted the die holder in it.





A little bit of ink on the side of the holder allowed me to scratch it with my center drill to locate the very edge.









With the hole positioned, there was nothing left to do but drill!









Why stop drilling there though, when we can keep going? :green:





Not only did that work, no aluminum parts were tossed through my forehead in the process! :tinfoil: Time to tap our new holes.









The second you remove a workpiece from a setup, you'll never get it _exactly _the way it was again. Rather than risk a crooked tap, I rotated the die holder and manually tapped the other hole using a little wrench.





Now it was time for a little test fit of the new grub screws.









I drilled and tapped one additional hole at a 90 degree angle to the others to serve as a tommy bar.





In addition to working like a handle, it slides along the bed and prevents the die holder from twisting indefinitely as it cuts.





The only thing left to do was try it out! I quickly whipped up a brass pill to test the die holder out on.













The setup worked nicely!





And it cut some straight threads too!





My challenge now is that the 3-jaw chuck doesn't have the necessary grip to hold onto the smooth brass workpiece as the threads are cut. I didn't get a chance this weekend to test it, but I plan to mill 4 flat sides onto the workpiece like this:





... then chuck the flat surfaces up in the flats of the 4-jaw chuck. That should have much better holding power and allow the die holder to cut threads much further down the piece without slipping. A working prototype is tantalizingly close - I'm hopeful that not too many more weekends of side projects like this are necessary to get there.

Until next time!

>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

*Machining the Driver Pill*

The driver pill in this light was a bit overbuilt. It probably could have been designed a lot simpler, but:


I had the extra space 
I wanted it to stand up to abuse 
I wanted it to be easily disassembled for maintenance 
 I started by hacking off a couple pieces of brass:





The pill gets chucked up, center drilled and drilled roughly to size.









It then gets bored to final size. The Taig lathe has no graduation markings on the carriage handwheel, so a cheap set of digital calipers and a vise clamp read out the horizontal travel. 





A small threaded hole gets drilled in the side of the pill. It will be used clamp the pill shut around the 2 boards, securing them in place.





With the threaded hole drilled, a slot is milled right through the middle of it. A socket head screw will close the pill tightly when twisted into place.





All finished!





The boards slip in like so, and sit on the little ledges inside.





The pill is then loaded into a sleeve, which the head and body thread onto. Makes sense, right? :thinking: The sleeve starts as another piece of brass, which gets turned down to size.









With one side turned down, it gets clamped in the vise and 2 parallel flats are milled onto each side. They'll provide a flat place to grip for when we go to cut the threads.









The other side gets turned down, and we're ready for threading! Note the flats: I tightened the two opposite jaws on my 4-jaw chuck onto them which gives MUCH improved torque for the next operation.





You may remember this little beastie from my last post. :naughty:





It's enough to get the job started straight, but to finish them, a vise and die stock are still necessary.





Now it's just a matter of getting it chucked back up and repeating the process on the other side.

















Next up: making a pouch for our pill to slide into!

















A business card protects the threads as the other side is drilled and bored for an LED star. The belt of material around the middle is removed and we're ready to punch a few holes in it.













We'll feed our LED wires up through these holes and solder them to an LED star.









Finished! These two pieces are the heart of the light.









So far so good! Check back in a bit and I hope to show you the two final pieces: the head and the body.

>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

*Machining the Head & Body*

What?! Two updates in two days? I know, I'm as excited as you are. :naughty: When last we left off, I'd just completed the (overly-complicated) driver pill. Just a driver pill does not a torch make though!

My bandsaw is seriously scary sometimes. Push down too hard and it starts to shake violently... push down too lightly and it actually burns the metal. Exhibit A: 1" of slightly scorched brass.





By this point you've seen my filthy lathe bench 100x more than you ever wanted, so I'll just let the pictures do the talking. The head has been the simplest part to machine out of the entire project. It was downright pleasurable and the result looks great.





























With the threaded part done, I flipped it around and drilled out the lens window. I forgot to take shots of the drilling and beveling but you're not missing much. :laughing:









And now, like an awesome movie montage, we jump straight to the good stuff!









The 3 parts fit together like a set of Matryoshka stacking dolls. O-rings keep the pocket lint (and hopefully water) out.





We're actually not _quite_ done with the head assembly. The reflectors I want to use are slightly (2mm) too wide to slide up into the head. 





The idea was to build an expanding Delrin post which would hold the reflector in place so I could turn a few mm's off it with the lathe.













The post would then be drilled and split. A screw would force the post apart, providing a tension fit.













That didn't work; the screw spun endlessly in the soft Delrin and the post was not forced apart. The post and screw still seemed like a sound idea, so I parted them off.









THIS WAS A HORRIBLE IDEA. :duck: I don't know why I thought it would be ok to chuck up a dowel of soft wood in a metal lathe, but it cut horribly and made a _cloud _of sawdust.









That said.... sometimes it's hard to argue with results.













Continuing my parade of ridiculous ideas, it was time to give the secondary LED a place to poke through. It was late in the day and I was tired, ok? 





In the future I'll use a drill press or something more stable, but for the prototype, I was actually pretty happy with the results. I cleaned up the edges as best I could with an X-Acto knife, then tested a 3mm LED for fit. It's tough working directly on the reflector and not damaging the surface.









Alright, enough with the brains, time to work on something to hold the brawn. 3" of stock is actually too long for my little lathe setup. Working it was just horrible - squealing, vibration, the works.





I started with my smallest drills and slowly increased the diameters. This whole operation made a horrible ruckus - I'm sure my dog was pretty upset at the squealing.









I'll take some blame for the noise while boring the body out though - look how much boring bar is hanging out of the holder. :green:





Hmm, tools say we're getting close...





There is one way to find out, of course.









This is the head end. I learned something pretty important doing this part - even bottoming taps don't cut to the bottom of their hole. So the threads didn't fully form right down to the little ledge and the head wouldn't screw all the way down. I had to bore a good deal deeper and re-thread the hole to get the head to tighten all the way. 













The workpiece gets flipped around and the tail is threaded for a McClicky switch. This particular tap is worth its weight in gold - the 11/16x20 thread is considered 'specialty' and they had to special-order it for me (for a couple hundred bucks ). I bored it a _bit _deeper than my plans called for after the adventures with the head.

















With the internals complete, it was time to think about machining the outside of the body. I couldn't do much with the steady rest in the way of the carriage, so I made a little Delrin plug for each end of the light.













Not a perfect solution, but the tailstock live center inserted into the Delrin plug provided enough stability to take a series of light cuts across the surface.





This would make for a very unnecessarily heavy flashlight body for only 1 little AA battery, so I marked out the taper points with a parting tool.





Taking great care not to nick the head/tail threads, the middle gets thinned out, dropping a few pounds in the process.





This is the first time I've used the compound slide since I got the lathe. I feel like the event could have used a glass of champagne or something!









The jaws left a few scratches on the head, so I flipped it around and shaved them off. The Delrin plugs proved mighty effective throughout the body machining. They also had another pleasant side effect: the body rings like a bell when you get it thin enough. Weirdest thing! I thought I was hearing things at first. But sure enough, the cutting tool rings the entire body and the Delrin plugs immediately suppress it.





Finally! The 4th and final piece of the prototype is complete and the whole thing is ready for assembly. 









But that's another post. I promise it'll have 100% less lathe pictures than this one. :twothumbs

>> Return to root post
>> Continue to next post in the series


----------



## Steve K

Very impressive documentation!! 
It does make me happier that I stick to simple things like electronics. 
Looking forward to further updates.


----------



## Illum

calipsoii said:


> But that's another post. I promise it'll have 100% less lathe pictures than this one. :twothumbs



Please don't, love the machining pics!


----------



## flat-ray

Now with these pics I can understand the massive work behind this project! Please, add more for our flashaolic curiosity.


----------



## calipsoii

Steve K said:


> Very impressive documentation!!
> It does make me happier that I stick to simple things like electronics.
> Looking forward to further updates.



Hi Steve K! Thanks for continuing to follow along with the build! I've been working hard to document all the steps that went into taking this thing from a flight-of-fancy into a physical object. Sometimes it can be a lot of work taking all the pictures, editing them, choosing the good ones and writing up the posts, so it means a lot when I hear that people are following along and interested in what comes next.



Illum said:


> Please don't, love the machining pics!



Heh, I may have spoken too soon Illum - I know for a fact I have one short trip back to the lathe tomorrow, so at least a couple more shots will sneak in here before we're through. 



flat-ray said:


> Now with these pics I can understand the massive work behind this project! Please, add more for our flashaolic curiosity.



Thanks for reading along flat-ray; like I mentioned to Steve, your readership means a lot.  The project has been SO much work - I started it nearly 2 years ago! It's moving along a good clip now and everything I complete makes me more excited to keep going and finish things up. I'll have a couple new posts up soon!


----------



## Mattaus

Best thread on CPF. Love it. Once you're done with this light, please start another lol!!!


----------



## Megatrowned

Mattaus said:


> Best thread on CPF. Love it. Once you're done with this light, please start another lol!!!



I agree! Seeing how something is made, especially something custom, is fascinating to me. I think that the ability to make something out of raw materials is a real skill. Anyone could just buy parts and bolt them together, but you have designed, and then made your own parts! I'll take two! :twothumbs


----------



## calipsoii

*A Clip Named Misty*

The title will make sense in a bit, promise.  

One of the design goals was that this light would eventually have 2 bodies: a twisty and a clicky. And the clicky must have a pocket clip. Surprisingly, finding flashlight pocket clips on the internet is harder than one might think! It doesn't help that the body of the light is a bit too long for a McGizmo clip (the one I'd love to use). Alright, well we've reinvented enough wheels on this project - what's one more?

This is 14ga metal strapping used to attach... who knows what? :shrug: It cost $3 at a hardware store and it seemed about the right thickness.






I started by measuring the body, figuring out how long and wide the clip should be, and scoring some lines on it (avoiding the holes). You can sort of see them here.





Then it was time to liberate our future clip from its' housing.

















The cut edge was a bit rough for your standard denim jeans. I was looking for a clip, not a pocket saw. Before we ever got to touch a lathe in my machining class, the instructor taught us metalworking with hacksaws and files. It was excellent knowledge and I've put it to good use.









That's better!





I knocked the corners off, took the emery cloth to it, and generally tried to clean the workpiece up a bit.













The tail end of the body has a small area with no threading. I wanted the clip secured within this area. Drilling holes into the tailcap threads was a surefire way to get water in the body should the light go for a swim. Here I'm figuring out where I can fit them.





With the lines scribed, I center-punched a mark into the clip. Using a brass finishing nail. Into a steel plate. :fail:









A steel nail worked better, and with the help of the DremelPress(tm), we were off to the races.









With two holes drilled in the clip, I pinched the body into the milling vise and drilled & tapped an attachment point.




















Theoretically, it could be attached right now. But it lacks a certain... je ne sais quoi. Oh right: it has no holding power and looks awful.





Into the vise it goes! A combination square gets things nice and straight.





A ruler helps apply the bending force evenly so that the metal doesn't bow in the middle. I was eyeballing things at this point and hoping that it looked and functioned well.













And now a bit the other way... perfect!









I spent a lot of time hemming and hawing over the clip after the bending was done. The shape was right, but it looked awful on the light. I was pretty close to abandoning the idea, when I realized what it needed while walking the dog. As an aside: half the solutions in this project have come to me while walking the dog. Next time you're stuck on something, give it a try.

Another light sanding, a splash of rubbing alcohol to clean off the fingerprints, and we're ready to spray!

















The paint is "heat-resistant BBQ enamel". It sounded cool but I wouldn't buy it again - it dried blotchy and didn't adhere well in some places. Ah well, this is just a prototype - it's more to see what it looks like than anything.













After 24 hours to cure, it was time to see what this bad boy looked like. And to be honest, I like it (blotchy paint and all). The black clip looks great with the black boot and it all looks good on the golden brass.









I couldn't resist checking whether it sat at the right height in the pocket of my jeans. Not bad! And pretty sharp looking in black too!









Oh right, the Misty thing.  The only section of metal long enough for the clip had text stamped on both sides. It ended up being a choice between 'Strong Tie' being printed on the outside, or this:





And so the clip became "MS-T". Now that I know it'll work, I think I'll hunt down a sheet of metal absent of any model numbers. 

We're getting close now! Stop by in a bit to see how things wrap up.

>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

*Punchin' The Numbers*

I _really _wanted this light to have a serial number on it somewhere. Worse comes to worse, scribing it on at knife point was an option but I was hoping for something a little more professional. 

My favorite local machine shop sold a set of alphanumeric punches for $799. They were hand manufactured in Oxfordshire, England and intended for heavy use in a Production shop. These were manufactured in China and cost $7.99. 





My machine shop teacher told me the fastest way students make a nice workpiece look like crap is by punching their name on it. It's apparently quite difficult to line up the spacing/orientation of the punches free-hand on a cylinder. With that in mind, I set out to construct a jig that would _hopefully _line things up. 

This chunk of Delrin had a nice hole machined straight through it, with a small section trimmed off the end to serve as a spacer.




































This spacer ring is _almost _the same width as one of the punches. I screwed up my measurements a bit and it was cut undersize, but still close enough to be workable.





The remainder of the Delrin gets threaded and the whole thing gets chopped in half. When threading on this lathe, I disconnect the drive belt and turn the chuck by hand. This gives fine control over the torque. Plus I don't know how in the hell you'd ever tap under power in this kind of setup.

















The spacer goes into the mill and 1/3rd of it is removed.









The idea was that the spacer would combine with the threaded pieces to make a 'window' through which to punch. The spacer could be rotated with a fingernail, allowing precise placement of the punch spacing. 




















In reality, the Delrin stock was too narrow in diameter. I used 1" because that's what I had - this setup needed at least 1.5" to really square the punch to the work. Ah well.

The whole assembly gets clamped onto the anvil...





... and a few quick strikes are made with the hammer.





With the '0' punched, the spacer gets turned a bit, lining up the window for the next few characters.









Honestly I wasn't all that pleased with the results. It works but wasn't quite what I had imagined in my head.





What I learned:

the jig worked very well but the Delrin stock needed to be 1.5" diameter to catch the flat sides of each punch 
the punch needs to be perfectly perpendicular to the round surface or the number gets 'smeared' to one side 
it probably only needs 1-2 medium strikes with the hammer - I hit it too hard and too often 
1/8" numbers are still too tall; 1.5mm to 2mm would be better 

In the future I think I'd get the serial number engraved (manual or laser) at a shop in town. This would give a wider choice of font and size and probably make the whole thing look more professional. As my wife commented, it definitely 'looks more handmade' now, so I guess that's something. :laughing:

>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

*The Sum of its Parts*

The French have a saying: mise en place. After a long time and a lot of effort getting all the parts designed and created, the light comes together in a short flurry of assembly. At the risk of sounding like a hippie, there's something very zen about assembly, so I'll hold the narration and let the pictures do the talking. 

















































































































































































































































After all this hard work, you'll permit me a few glamour shots, right? 

















In the next post I'll go into the details of the light a little more. For now though, here's a high level summary:


Cree XP-G Q4 7C4 HCRI primary LED 
660nm 3mm deep red secondary LED 
Khatod smooth reflector 
17mm UCL lens 
16mm MCPCB 
McClicky switch 
0.8 - 5.5V input voltage 
current-regulated primary LED; 13khz PWM secondary LED 
user-programmable driver
1-4 modes 
9 output levels for primary 
3 output levels for secondary + locator beacon 
 
Battery voltage readout 
Thermal regulation 
 I've been carrying it for about a week now and I'm getting a good idea what works and what doesn't. I'm still compiling all my thoughts and measurements and then I'll do up a quick post going into the real nitty-gritty. Maybe a few weeks; I'm waiting on a light meter and some other measuring equipment.

Thanks again to everyone that's been reading along. It's such a great feeling to finally have something to show off! Now it's time for testing and refining the design, and then I foresee a few more of these sneaking into the wild. :devil:

Cheers!
- Mike

>> Return to root post
>> Continue to next post in the series


----------



## HarryN

:twothumbs I was looking for an emote which would portray my hands clapping for you, but this is as close as I could find.

I am glad that you think of putting small assemblies together as zen-like, because that is a very tough stage for me.

All I can say is - very impressive.

Question - when I did builds, I found it challenging to find springs which could be soldered. Many were spring steel, which is hard to make work. Do you have a source for those, or did you use an existing spring from another light ?


----------



## calipsoii

HarryN said:


> :twothumbs I was looking for an emote which would portray my hands clapping for you, but this is as close as I could find.
> 
> I am glad that you think of putting small assemblies together as zen-like, because that is a very tough stage for me.
> 
> All I can say is - very impressive.
> 
> Question - when I did builds, I found it challenging to find springs which could be soldered. Many were spring steel, which is hard to make work. Do you have a source for those, or did you use an existing spring from another light ?



Thanks Harry! I'm very happy with how it turned out. Have a couple small tweaks to the design and then I'd like to try making another.

As for the springs, I'm using a big old bag of these. They soldered nicely for me and so far I've been happy with how they've performed. I believe it was McGizmo who linked these ones (which look even nicer) so if I need more or decide to switch, those would be my next choice.


----------



## Steve K

congrats on completing the project! I wasn't sure that you were going to get through the whole issue of working with that tiny regulator package! A lot of electronics parts are just too small for humans to work with nowadays.

Any "lessons learned" from the project? i.e. what would you do different, what did you learn, etc.?


----------



## archimedes

HarryN said:


> :twothumbs I was looking for an emote which would portray my hands clapping for you, but this is as close as I could find....
> 
> All I can say is - very impressive....



Congrats! 

I've really enjoyed following this thread, too.

Looks awesome, and I'd really like to buy one (if you make more) ... with the "Strong Tie" clip option


----------



## revilo951

What's the price?


----------



## calipsoii

Steve K said:


> Any "lessons learned" from the project? i.e. what would you do different, what did you learn, etc.?



I've been keeping a little list of takeaways throughout my projects! They're little things I've learned and tried to remember, so I'm not trying to be preachy, just take them as you will. 


"I'm just going to pop out to the garage/basement/store for an hour" ----> never shorter than 4 hours. 
Solder stencil etching was fun, but 1 hour of work + $35 + 2 weeks shipping from OSHStencils was definitely the way to go. 
If something looks like it won't fit in your CAD program, it won't magically fit when you build the part either. 
Friction is not a good design mechanism - secure it in place or suffer through dismantling everything to reseat a wire/connector/component. 
Your circuit isn't as efficient as your napkin math says it will be. 
The simplest UI is the best UI - my family/coworkers/friends are all getting theirs programmed as a single-mode light. 
Don't ever buy machine tooling based on "I might need this in the future". I have a box full of tooling I've never used and a handful of tools I've damn near worn out. 
Machine shop owners can be serious jerks to people just starting out. 
Set tiny goals with reasonable timeframes. 
Don't work while tired. 
When you change something on-the-fly during manufacturing or assembly, write it down! 
Don't assume the part DigiKey has 14,000 in-stock of one day will be there the next. 
The answer _is _in the datasheet, you just haven't read it enough times yet. 
As proud as you are of your design, someone doesn't like it. But you can't please everyone and that's ok! 
Be thankful for your supportive spouse. 
Be appreciative of the people who take an interest in your projects, because far more people really don't care. 
If you're ready to throw it away or break it, go make a cup of tea instead. 
 I have a rather enormous mental list of things these projects have taught me, but those are really the big ones. Hope that gives a bit of insight into all the undocumented happenings at my workbench. 



archimedes said:


> Congrats!
> 
> I've really enjoyed following this thread, too.
> 
> Looks awesome, and I'd really like to buy one (if you make more) ... with the "Strong Tie" clip option



Thanks archimedes! The clip itself is actually really nice - the perfect thickness and just the right amount of tension. The paint is scraping off already though, so black oxide coating or something along those lines would be a much better choice. The two hex nut screws at the top also need to be twice the size and spaced horizontally instead of vertically. 



revilo951 said:


> What's the price?



That's a little ways off revilo.  I do plan to offer them for sale to anyone who'd like one, but not before:


I've had a chance to pack mine around and change anything that bugs me. So far there are just a couple small things, nothing too major. 
Someone other than myself has had a chance to beta test the design and provide feedback. 
I've either a) upgraded my lathe setup to something with power feed or b) figured out an arrangement with a local machine shop. 
 When the design is a little further along and I know more I'll post any price that might come up. I _can_ say that the prototype is worth a lot (at least to me).


----------



## Steve K

calipsoii said:


> [*]Friction is not a good design mechanism - secure it in place or suffer through dismantling everything to reseat a wire/connector/component.



As a EE, it has taken me some time to learn from my fellow mechanical engineers. Even things as seemingly simple as how to use threaded fasteners can get complicated quickly. Loctite does help compensate for non-ideal designs, though. 
As far as holding things in place, sometimes wavy washers can be quite handy too.



calipsoii said:


> [*]Your circuit isn't as efficient as your napkin math says it will be.



True. Most circuit calculations just get you in the ballpark. The experienced power supply designers plan for the losses in the inductor, the switch transistor, flyback diode, etc. Most folks just build it and see how it turns out. 



calipsoii said:


> [*]Don't work while tired.



This is usually one of those things that you have to learn the hard way! If you're lucky, you just blow up a resistor. If you are working with rotating machinery, the consequences can be much more severe.



calipsoii said:


> [*]When you change something on-the-fly during manufacturing or assembly, write it down!



In general, I would recommend that people keep a notebook or logbook throughout the development process. Never erase anything that you think is wrong or a mistake. Sometimes you figure out that the stuff that you thought was wrong was actually right! 
For drawings (mechanical or schematic), keep track of the versions and put the revision date on it. You need to keep track of the latest version, and you may want to keep a history of the changes.



calipsoii said:


> [*]The answer _is _in the datasheet, you just haven't read it enough times yet.



Mostly true. You may need to check the application notes too, or check the forums (for example, Texas Instruments has a good forum to get help from their applications engineers or other people). My most recent experience with this was a National Semiconductor power amplifier that would oscillate if the gain wasn't high enough. The datasheet didn't mention this detail, but a friend had used a similar part that had that same behavior and suggested increasing the gain. It worked!

You do need to be very familiar with the datasheet, though. All of that data is important. The info that is crucial to making your project work might be in a small font as a tiny note. 



calipsoii said:


> I have a rather enormous mental list of things these projects have taught me, but those are really the big ones. Hope that gives a bit of insight into all the undocumented happenings at my workbench.



thanks for sharing! Perhaps it will help someone else avoid a few rough patches in their project or just give them the patience to get through the tough sections (or convince them to wrap it up for the night and go to bed).


----------



## calipsoii

*Beamshots and Afterthoughts*

I've been carrying the prototype for about 2 weeks now and I'm getting a good feel for what works and what doesn't. There are a few things on my todo list right now:


Enamel paint wore off the clip in 1 week. Needs to be black oxide or AlTin or something. 
The circuit could really benefit from 'off-time' functionality for mode changing; I'm going to investigate the capacitor timer trick. 
The Arctic Silver thermal paste would be well-complimented by either an epoxy adhesive or some screws fastening the MCPCB to the driver pill. 
Vertical screws on the clip sucks - they need to be horizontal. 
 That said, I'm extremely happy with all the other functions of the light. It's better than some that I've paid $70 for in a store.

Let's talk tints for a minute: I'm a big fan of warm-white. I know a lot of people can't stand it so I imagine this setup might not be for them, but a good 85CRI 7C4 emitter is a guilty pleasure of mine (particularly at night). If you're not a big warm-white person then try to judge the beamshots by their profile and not by their color. 

I'm also a big fan of smooth reflectors, which once again, a lot of people tend to avoid. Even in the diminutive 1xAA form factor, I'll take a smooth reflector if it's offered! I don't white-wall hunt so rings in the beam don't bother me. Since the prototype is not only sporting a smooth reflector, but one with a giant hole in it, I'm still pretty happy with how it looks and hopefully you'll agree it's not so bad. 

I snapped a few shots to compare this light to some other 1xAA ones I have.





The beamshots are presented in the same order as above. Like I said, tints and reflectors/optics vary, so this is just to give you an idea how the prototype fits into things.











































You may have noticed that the prototype seems to share a very similiar tint and output to the Quark Mini AA Warm White. Here's a comparison of the two side-by-side. The Quark has a nicer beam with its shallow light orange-peel reflector; consequently, it lacks the throw of the prototype.





They're so similiar that I wondered if I could ballpark my prototype's lumen output against the ANSI-measured output of the Qmini. I only have a simple lux meter, but with the right setup, it does a decent job comparing outputs.

Both lights were bounced off the white shade of an Ikea lamp back onto the sensor. This helps eliminate the difference in lux granted by the smooth reflector and evens the playing field a bit.









Qmini:





Prototype:





This roughly correlates to what I see with my eyes - the prototype is slightly dimmer than the Quark. CPF has guesstimated the WW qmini's output to be ~80-85 OTF lumens, so I think it's a safe bet to say the prototype is somewhere around 75-80 OTF lumens. It does go slightly higher, but this is what I've chosen to program the upper limit to for now.

I'm in the process of doing runtime tests so I'm not going to post those results until they're all compiled. The results are... interesting. 

More to come!

>> Return to root post
>> Continue to next post in the series


----------



## gunga

This is awesome. I'd love to beta test and review this!


----------



## calipsoii

*Runtimes

* NOTE: runtime tests are ongoing and the charts will be updated as new data is collected! ​







*Test Criteria*

All batteries will be at full voltage at the start of the test (either brand new or freshly-charged) 
The prototype will not receive any additional cooling 
Percentages will be used in the charts instead of absolute values to account for differences in lux meter setup between trials 
Reflector lux effects will be very roughly eliminated via a light-tunnel setup 
Measurements will be taken at High, Medium and Low light settings (with readings decreasing in frequency at the lower levels) 
 This is the lux meter I'm using.





This is the jig I've setup to (hopefully) remove the reflector hotspot from the equation. The light is sealed against one side of the pipe, the lux meter against the other. Nothing is moved during the test - values are just read from the meter at regular intervals.





I don't have an integrating sphere, so I'm afraid I can't give lumen values. Lux values aren't very useful either since it only takes a slight reflector misalignment between tests to throw the values off. Since the primary LED is current controlled at all voltages, it's safe to say that it is the same brightness at the start, no matter the battery type. This means we can assume power-on to be 100% and we can calculate percentages based on that. It's good enough for comparison. 

As mentioned above, these charts will be updated as I collect more data. Right now I only have 1 battery body and it only holds 14mmx50mm cells. Once I have a CR123 body machined I'll expand the cell types. I'll also add some measurements from different levels (medium and low).

Drop by once in a while to see how things change. 

>> Return to root post
>> Continue to next post in the series


----------



## tobrien

you did awesome


----------



## dpolseno41

Great work! Nothing better than seeing an idea come to life.


----------



## calipsoii

tobrien said:


> you did awesome





dpolseno41 said:


> Great work! Nothing better than seeing an idea come to life.



Thanks guys! Except for 1 odd factory reset that I think I accidentally caused while helping someone move, the light has been very reliable. I have 3-4 things I'm going to tweak on the 2nd one and then I'll be very happy with it. Might be a couple weeks until that one is ready to show off though - I'm currently trying to figure out how to get my new lathe home from the warehouse. :naughty:


----------



## magnum78

nice work :twothumbs


----------



## calipsoii

Hi all! 

I feel the need to update this thread in case anyone is thinking the project has been abandoned. It has not! Life has just been crazy busy lately and the hobby's had to take a bit of a back seat. 

Plus I disassembled my workbench and Taig lathe. 

Gotta make room. :devil:


----------



## Megatrowned

Ooo, fancy! When can we order our lights?! :naughty:


----------



## calipsoii

Hi guys! Just wanted to give a quick update on this project:

I've been carrying the light every day for over a month and it's performed well. Been through about a dozen batteries. I don't bother with alkalines anymore (since their performance is so poor on High) so it's been mainly Eneloops, lithium primaries and 14500's. Aside from the enamel paint wearing off the clip, it's been dropped and thrown about with little issue.





I was very lucky to be sent for some training through work, so it went on an airplane ride and survived a week in a foreign climate. 





That's also partly the reason that the new lathe still isn't up and running. You wouldn't believe how much time it takes getting this... gunk... cleaned off every single square inch of the machine. 





I've basically had to disassemble every piece of it (right down to the nuts and gears), clean them all with a rag & acetone, and reassemble it. Tedium can easily be defined as: "cleaning a 3.5ft leadscrew with a toothbrush". :sick2: 





We're more than halfway there now though. Fingers crossed the chips start flying soon!

Cheers!


----------



## DrafterDan

Great determination on your part. I recently built five 18650 bodies and that was hard enough. looks good!


----------



## calipsoii

Let it never be said that cleaning a new lathe is quick or easy! All done now - with any luck the chips will be flying tomorrow! :devil:


----------



## Steve K

yummm... shiny!! 

sounds like a new project is required in order to break it in.


----------



## calipsoii

In keeping with my goal of updating this project thread on a regular interval... *a tiny project update!*

I've been unable to do any machining for the last couple weeks due to a rather unfortunate accident that cost me a boring bar and stripped several bolts in the impact.  All 10 fingers intact though!





While I wait for the new parts to arrive in the mail, I focused my attention on the couple things with the firmware that have been bugging me.

I've been very nervous carrying this light with li-ions because there was no way to tell how discharged they were getting. As I mentioned earlier, the voltage reference only goes to 2.56V which is no good for reading out lithium-ion cells. So far I've been using protected 14500's but that's not a real solution.

This last weekend I sat down and overhauled part of the firmware. Some of the changes:


Can now read voltages between 0.1V and 4.2V and flash them out to the user (used to be only up to 2.56V) 
Added a menu option to enable/disable "Lithium Ion Mode". When this mode is enabled:
the light checks the voltage of the battery every 8 seconds 
if it drops below *3.5V*, drops primary LED to 40ma max and intermittently blinks secondary LED 3 times 
if it drops below *2.9V*, disables primary LED and intermittently blinks secondary LED 5 times 
 
I added it as a menu option because if you use 3V primary CR123's, you'll trigger the warning! So it can be turned off if you know you'll be using a battery that falls in that voltage range (1xCR123, 2xAA).

This coming weekend I'm going to tinker with making mode switching based on "time off" instead of "time on". If I can get it working I'll add that as a menu option so that it can be toggled as the user sees fit.

More updates soon!


----------



## Zandar

Let me just say that I stumbled onto your thread by accident and I too am very impressed with your creativity and level of skill. I am looking forward to seeing how your final design turns out.


----------



## tobrien

Zandar said:


> Let me just say that I stumbled onto your thread by accident and I too am very impressed with your creativity and level of skill. I am looking forward to seeing how your final design turns out.



yeah it's an amazing project!


----------



## gunga

Are you going to be selling these? The firmware changes sounds cool too...


----------



## calipsoii

Zandar said:


> Let me just say that I stumbled onto your thread by accident and I too am very impressed with your creativity and level of skill. I am looking forward to seeing how your final design turns out.



Thanks Zandar! It means a lot to have people following along so thanks for taking the time to reply. After 2 months of use the prototype has worked very well, so it's all refinements from this point forward and I don't think it'll need to be scrapped or anything. :sweat:



tobrien said:


> yeah it's an amazing project!



Thanks to you as well tobrien! :thumbsup:



gunga said:


> Are you going to be selling these? The firmware changes sounds cool too...



Eventually I'd like to be able to sell one to anyone who is interested in buying one. I'm not thinking about sales until I get it _just_ the way I like it though. I already know a lot of people won't like it and I'm ok with that. But I also know that at least 2 people have posted on this forum and others looking for this exact light (and not finding it) and I hope to be able to put one in their hands and see if that does the trick for them.


----------



## archimedes

calipsoii said:


> ....
> Eventually I'd like to be able to sell one to anyone who is interested in buying one. I'm not thinking about sales until I get it _just_ the way I like it though .... I also know that at least 2 people have posted on this forum and others looking for this exact light (and not finding it) and I hope to be able to put one in their hands and see if that does the trick for them.



:wave: ... please add me to the list for one of these ... :thumbsup:


----------



## gunga

I'm interested. 


Sent from my iPhone using Candlepowerforums


----------



## tobrien

with your caliber work I'd be happy to buy


----------



## KuanR

I'm interested in a circuit too.

I think gunga and I are wanting this for the same light.....Hey Mike, do you think this will fit in our AA lights?


----------



## calipsoii

Oh man, the mode switching change came out _perfect_. Turned out so much better than I could have hoped. Three cheers to Der Wichtel for his informative suggestion!

Here's the little capacitor recording the time the light was off. Right now it's just setup on the test bed but it'll be easy enough to shoe-horn it onto the actual circuit.


----------



## pimaxc

I'm interested in it as well maybe even two!


----------



## calipsoii

After spending a few hours on the UI this evening I think I'm happy with where it's at! Just need a final test of the voltage monitoring code (but that requires I solder up some new boards).

The mode change UI is just the way I like it now. It can be toggled in the menu between two different styles of mode changes:


"Time-On" mode changing is like any light that saves the level after being on for {x} seconds. My Nailbender and Kerberos dropins operate this way. 
"Time-Off" mode changing is like any light that requires short presses to change output. My 47's Quark Mini's and McGizmo Haiku operate this way. 
 Mode memory can be toggled on/off independently of mode change style, so you can probably imagine that changes the dynamic a bit too. The whole thing is probably sounding very complicated at this point, but it's really not.  Just decide which features you want on/off beforehand, take a trip through the programming menu (3 minutes), and you're done.



pimaxc said:


> I'm interested in it as well maybe even two!



Hiya pimaxc, thanks for the interest and welcome aboard! :thumbsup:

A bit of an aside, but the financials of a project are often personal and something that rarely gets discussed on this forum. So far I've avoided it, but people are beginning to express interest and I feel like it needs mentioned.

Something to keep in mind for anyone who stumbles into this thread at this point and sees people posting interest: I'm just some dude with a soldering iron and a lathe! I've been financing this project out of pocket but I certainly don't have the buying power that the larger companies have. I pay full price for all my components and I've yet to find a machine shop that would quote me something I could reasonably afford. That's a long way of saying that Fenix can sell the E11 for $45 because they had hundreds of thousands of units assembled overseas where manufacturing is as cheap as it gets and they had the purchasing power up front to make that happen.

I'm really excited about this light and I want to put one into anyone's hands who wants one (and I love that people are already interested!) but before any of that happens I need to take a good long look at what is involved in making one and be reasonable with the price I might ask. At some point the joy I get making and shipping something intersects with the unhappiness of neglecting my family for a weekend as I machine hosts in the garage for $1.25 /hr. 

When I feel like the design is good and ready and I'd be comfortable asking money from others in exchange for one, I'll take a thorough look at manufacturing options and post a bit more about what I find. :twothumbs


----------



## KuanR

I'd be super happy if I could ship a host to you to install one of your drivers!


----------



## gunga

I'm good with driver or whole light. Just so cool...


----------



## calipsoii

KuanR said:


> I'd be super happy if I could ship a host to you to install one of your drivers!



Sure, we could give it a shot! Driver is 13.25mm diameter and driver stack is ~12-16mm tall. Grounds and heatsinks itself through the host so needs a friction fit. Converter board is designed to contact battery with a spring. If the host doesn't support a 2nd LED you're going to have some difficulty navigating the programming menu and voltage readout won't be possible.



gunga said:


> I'm good with driver or whole light. Just so cool...



Moonlight mode is only possible in hosts with a secondary LED gunga, as the primary LED won't go lower than 20ma. Something to think about.


----------



## gunga

Whole light then! Driver won't fit Ryan. 


Sent from my iPhone using Candlepowerforums


----------



## KuanR

gunga said:


> Whole light then! Driver won't fit Ryan.
> 
> 
> Sent from my iPhone using Candlepowerforums



I guess I'll go with a whole light, depending on what the final material is going to be 

Bummer this awesome driver won't fit our lights......


----------



## calipsoii

KuanR said:


> Bummer this awesome driver won't fit our lights......



If the driver is too large, then yeah, you're out of luck. If it's too small, there's no reason a spacer cannot be made. What light are you guys working with?


----------



## gunga

It's a semi-custom Stainless AA light, the pill holds a 17mm circuit but I don't think it can fit anything that tall.


----------



## pimaxc

Oh I realize that it's a hobby for you. I was just trying to say that if you decided to make a few to sell I'd be interested.


----------



## Zandar

Calipsoii, I don't think anyone reading this thread would want you to go into debt making these lights for us. Taking into consideration the thousands of hours and years you have already invested in the design and build of this project, coupled with the "ridiculously" high $1.25 an hour figure you quoted( come on every other custom builder just needs $ .02 to produce the most elaborate Ti lights) , I don't see how you could sell this light for less than $ 20 and expect to even break even. Seriously if it happens so be it, if not what's the worst that can happen? It's not as if any of us are so emotionally invested in this project that we can't survive without a light. Allright so maybe a "few" of us are a little "obsessed" here, but were talking about flash lights not children. I for one, haven't even given a name to my future light , and you won't catch me running around "cooing" at my light and carrying it like it was my first born child, like some of the other followers here, no Sir! I'm just not one of those "addictive personality" types. Stop looking at me like that, really, I'm much better now and I hardly ever sleep with a light in my hand anymore! I'm perfectly allright aren't I?


----------



## gunga

Ah. Wise words. I'd be okay with $20. Not more than $25 though. 




Sent from my iPhone using Candlepowerforums


----------



## calipsoii

This project needs an update!

It's been a little while, sorry. Been practicing my internal and external threading on the lathe. The practice project turned out pretty nice!






And a good thing I have that light too, because the 15VP prototype I've been testing for 3 months is dead and disassembled. 





I'm actually a bit surprised it lasted so long. The battery tube was built far too short and the pressure from the battery has been flexing the PCB for a long time. The spring on a McClicky is incredibly stiff; it barely compresses at all and I didn't take that into account when drafting the original blueprints. I guess a couple of the solder joints finally decided to give up the ghost. Doesn't help I gave it to a friends' 2-year old for a day of destructive testing either.

No worries though, I've been hankering for a v1.1 with the new firmware/hardware fixes for some time, so I guess now I have my motivation. :devil:


----------



## gunga

I'm in for one!


Sent from my iPhone using Candlepowerforums


----------



## calipsoii

By the time I got home from work it was too late in the evening to be making a bunch of noise on the lathe. The soldering iron is a lot quieter. 





There are 6 sets of tested-and-working drivers here, but it actually took 18 PCB's to get to this point. The other 6 unrecoverable boards went into my junk stack. I try not to think about what the junk stack is worth in components and lost labor - some time ago I started measuring it in 'how many Haiku's this could have bought instead'.


----------



## scout24

Interested! Given the quality and utility of your A2 rings, I would certainly like one if you decide to make these available. Good single AA lights are tough to come by...


----------



## Steve K

just a comment about the failures due to cracked solder joints, etc., due to mechanical stress.....

my experience in industry is that the goal should be to avoid having the circuit board carry any sort of loads. It's just too easy to crack ceramic capacitors or plated-through-holes and vias. 

An analysis of the failed boards should shed some light on what actually failed, and what the corrective action should be. For instance, if a ceramic cap cracked, you might be able to change the cap's orientation so that the stress occurs along its width instead of along its length. 
Another option is to increase the thickness of the fiberglass layers of the circuit board. That would increase the stiffness, reducing the flex.

Another risk is the process of depanelization, or the method of getting the small boards out of the big panel that they are part of during the assembly process. Any bending or levering of the board produces stresses. The two big ceramic caps near the perforations look like they might be vulnerable to this sort of stress.


----------



## calipsoii

scout24 said:


> Interested! Given the quality and utility of your A2 rings, I would certainly like one if you decide to make these available. Good single AA lights are tough to come by...



Welcome aboard the thread scout24! :wave: I think you'll get a kick out of this light - it's been my labor of love for quite some time now. It's not just 1xAA though! The driver handles 0.9V-5V so it can run on 1xAA or 1xCR123 or 3xAA or 1x16340 or 1x14500... you get the idea. It's fully programmable; make it a single-mode light or give it up to 4 output levels and set the brightness for each using only the tailcap switch. It reads out battery voltage to 2 decimal places. It has a 3mm secondary LED that you can either use or disable (brightess can be programmed as low as my A2 rings) and I have some gorgeous deep red or creamy neutral-white 3mm's for that. For the primary emitter I have XP-G2's (85CRI in either 5B4 or 7C1), SSC P4 HCRIs, and some hard to find Osram Platinum Dragon 80CRI 4500k. UCL lens. Khatod reflector. McClicky switch. All the good stuff. 




Steve K said:


> just a comment about the failures due to cracked solder joints, etc., due to mechanical stress.....
> 
> my experience in industry is that the goal should be to avoid having the circuit board carry any sort of loads. It's just too easy to crack ceramic capacitors or plated-through-holes and vias.
> 
> An analysis of the failed boards should shed some light on what actually failed, and what the corrective action should be. For instance, if a ceramic cap cracked, you might be able to change the cap's orientation so that the stress occurs along its width instead of along its length.
> Another option is to increase the thickness of the fiberglass layers of the circuit board. That would increase the stiffness, reducing the flex.
> 
> Another risk is the process of depanelization, or the method of getting the small boards out of the big panel that they are part of during the assembly process. Any bending or levering of the board produces stresses. The two big ceramic caps near the perforations look like they might be vulnerable to this sort of stress.



Great advice Steve K, thank you. I've been trying hard to reduce stress on the boards but at some point they do have to contact the body. That's what the brass can in the pictures is for - it holds them as gently as I can manage while still heatsinking them. The whole assembly is held in place by a threaded ring with the force being distributed only through the edges of the grounding ring. The controller circuit is cradled in the body of the can and should probably be considered floating for how little tension is placed on it. Going to a 0.064" PCB is something I've considered if I ever order another batch.

I've been completely assembling the boards by hand and they're each individually depanelized before going into the toaster oven, so that hasn't been too much of an issue yet. Some day I'd love to have them populated in a factory (so I don't have to do it and can stop wasting components) so I'll be very careful breaking them apart if we reach that point.

The new longer body will do wonders for reducing the tension on the boost board (the DFN legs popped on the boost IC). There was seriously so much spring tension when I tightened the head that the McClicky spring crushed a hole into the end of an Eneloop battery. That the little legs held on as long as they did through that is pretty amazing. oo:


----------



## Megatrowned

All your progress looks amazing! I have been following since page one. I especially like the option of a red led and the off timed mode switching. I would certanly be intrested in one if you ever make a run of them.


----------



## nbp

Hi Calipsoii. :wave:

You said to come to the Homemade section, so here I am, and look I found you!

I don't know how this thread hasn't gotten more attention all this time; it's AMAZING! I found it tonight and had to read the whole thing. One of the most exciting things I have read on CPF in a long time, IMHO. I don't know how to do any of the things you did in this build log, so I am astonished at the creativity and ingenuity displayed as you worked through the challenges of making this light, and the dedication to the cause over such a long period of time. From programming drivers to machining the host, you did it all. Incredible! :bow:

This is a light that has soul, heart and passion for sure. Well done! :twothumbs:


----------



## Steve K

calipsoii said:


> Great advice Steve K, thank you. I've been trying hard to reduce stress on the boards but at some point they do have to contact the body. That's what the brass can in the pictures is for - it holds them as gently as I can manage while still heatsinking them. The whole assembly is held in place by a threaded ring with the force being distributed only through the edges of the grounding ring. The controller circuit is cradled in the body of the can and should probably be considered floating for how little tension is placed on it. Going to a 0.064" PCB is something I've considered if I ever order another batch.



As an electrical engineer, I have learned that the mechanical aspects of electronics can be just as much trouble as the electrical ones, and frequently harder (for me, at least) to fix. A lot of what I've learned has been learned the hard way, unfortunately.

On the plus side, there is a lot of good advice from manufacturers on ways to avoid problems with their parts. I just ran across some nice notes from Murata on how to reduce the chances of cracking their ceramic caps. It's good reading for anyone not familiar with the problem. Just go to page 162 of their catalog of ceramic caps...
http://www.murata.com/products/catalog/pdf/c02e.pdf

pages 168 and 169 have some good advice on depanelization too. 




calipsoii said:


> The new longer body will do wonders for reducing the tension on the boost board (the DFN legs popped on the boost IC). There was seriously so much spring tension when I tightened the head that the McClicky spring crushed a hole into the end of an Eneloop battery. That the little legs held on as long as they did through that is pretty amazing. oo:



oh my! 
While no one likes a failure, at least you had signs of what the cause was. 

Again, thanks for sharing the details of the development process! It should make everyone appreciate all of the considerations and sweat that go into any well made product.


----------



## scout24

This is meants a compliment of the bighest order, I hope you take it that way. The shot of the body with the clip installed reminds me of a McLux clip with the vertical screws. Great minds think alike...


----------



## calipsoii

scout24 said:


> This is meants a compliment of the bighest order, I hope you take it that way. The shot of the body with the clip installed reminds me of a McLux clip with the vertical screws. Great minds think alike...



Oh my goodness scout, you've dated yourself a bit with that reference. I didn't even remember there _being_ a McLux clip with vertical screws - had to go digging through Google Image Search to find Don's old build logs and sure enough, there it is! Interesting to see that he was using the wedge design even in his early proto's. I'm glad he decided to punch out the middle of the clip in later designs though - it removes some of the beefiness and adds a more delicate look to his current line-up. The Haiku wouldn't look the same with the old strap clip.

I'm still waffling over how to finish the tail of the light. Don uses a thick o-ring to retain the boot and apparently that's enough to be waterproof since I see him diving with it.





For the next prototype I'm going to try a threaded ring that will chase the boot down into the hole and pinch it in place. Just want to see how it looks & works.

For the clip I'm pretty hung up on the idea of a skinny black rectangular shape that just runs the length of 1 side. No projections from either side (so no wings at the top).





It's _very _tempting to use rivets to fasten it to the body, but that's a permanent mounting solution and if the clip breaks I'd hate to be drilling rivets out just to replace it. Might instead make the tail a tiny bit thicker, mill a slot in it to prevent clip twistage, and secure it with a single machine screw.

Buying a new bandsaw blade this evening so hopefully by this weekend I'll be back working on the next prototype at which point I'll have some pictures to show!


----------



## scout24

The thin black clip looks great against the brass of the body. O-ring boot retention seems more than durable given a bit of recess, I can't recall anyone having issue with one. The threaded ring does lend an extra bit of security, though. Which would be easier to do from a machining standpoint?

Re-read my last post, that as supposed to be "highest order"...


----------



## calipsoii

In keeping with my goal of updating this as frequently as I can, a few progress pics of the next batch of prototypes!

The 6 brass PCB sleeves are (almost) done - they just need a wire slot milled in them (which I'll do later). I've fully machined a single pill assembly and prepared the stock for the other 5. I want to make sure everything is ok with the first pill before I go making 5 more. What a waste that would be if something were wrong with the design!






The pill has a crazy amount of threading on it! Instead of a snap ring I'd like to try a threaded ring to hold the driver boards in place, so it's now threaded on the outside and the inside.









I've run into a worrying issue though - the new driver pill doesn't thread into the 1st prototypes' body! Not 100% sure why, but I'm keeping my fingers crossed the threads I cut today are ok and the problem is with the prototype body. If not then I guess this pill is scrap and I'll have to try again.





>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

Threads don't work, they were cut slightly too large. :sigh: Still trying to figure out why but at least I know the solution. To make any future thread-cutting easier I whipped up a GO/NO-GO gauge. It has threads cut in it that I'm quite certain are accurate, so I can use it to determine if my work is good to go.

It turned out really nice so I figured I'd post a pic or two. It screws apart so you can test both internal & external threads with the 2 pieces.


----------



## gunga

Wow! Even the tester is beautiful!


Sent from my iPhone using Candlepowerforums


----------



## tobrien

I agree, that looks beautiful


----------



## DrafterDan

That's some clean lathe work. I didn't do too much with threading, only a handful of outside threads. I had enough problems with those!


----------



## calipsoii

>> Return to root post
>> Continue to next post in the series


----------



## smflorkey

I recently stumbled across this thread and read through the whole thing. I'm impressed -- again. I still EDC an A2 with your single-mode warm-white LED ring. I'm slightly bummed that project is now closed since I finally have funds to get a multi-mode ring. I'm still watching the second sale thread so I'll know if you open it again. 

Put me down as one interested in this light, in the multi-mode version. It is highly unlikely it will bump the A2 out of my pocket, but it looks like a great utility light for my night stand. Thanks for sharing the development process.


----------



## calipsoii

Thanks for following along smflorkey!

I wish I had more to show you but progress has been frustratingly slow. I don't know how Vinh or TGWNN do it! After a day of work followed by taking care of things at home, I'm only able to devote a few hours a week to this project. I'm sure many people here know the feeling. 

The v1.1 prototype is just about finished. Things I'm working on:

Building a more permanent jig for trimming the reflectors. 
The head knurling looks kind of funky compared to the body knurling. Need someone with a sense of design to look at it and tell me what would look nice. 
The finished assembly is longer than I'd like. It doesn't crush batteries anymore but it's too long and skinny. I don't know how Malkoff crammed all that stuff into his 4.5" MDC AA without smashing all the wiring/circuits/batteries together. I'm trying to find some places to drop a half-inch of length. If anyone has a AA Haiku who can measure the total length, please let me know! 
I'm going to try a wire clip and see how it looks. 

Hopefully have a more interesting update soon.


----------



## calipsoii

calipsoii said:


> Building a more permanent jig for trimming the reflectors.


Well, one bullet point down, couple more to go. :naughty:

The reflectors are a touch too wide. They need a small amount shaved off the diameter to fit in the head. I built a jig out of wood and screws green for the v1 prototype, but it was pretty crummy. This is much better!





As you turn the screw, the tapered plug presses down into the white Delrin collet and causes it to expand. That expansion pins the reflector in place through friction without marring any of the surfaces.





Then you can turn a bit off the diameter!





As a bonus, if you flip it over, you can pin the reflector upside-down. It can now be mounted in a drill press to put the hole in it for the 3mm secondary LED.





>> Return to root post
>> Continue to next post in the series


----------



## AndyF

Pretty slick jig there!.


----------



## tobrien

awesome!


----------



## alphazeta

wow! so well thought out. nice...


----------



## Zandar

I'm still folllowing along and am increasingly impressed with your ability! Thanks for keeping us up to date.

alex


----------



## tobrien

Zandar said:


> I'm still folllowing along and am increasingly impressed with your ability! Thanks for keeping us up to date.
> 
> alex


I have to echo this too (increasingly impressed)


----------



## calipsoii

*I See You've Constructed A New Light...*

Two days vacation? Sounds like it's time to finish up the v1.1 prototype! :devil:

This one sports:

Cree XP-G2 R4 5B4 80CRI (tint leans towards vanilla instead of rose) 
4900k 3mm LED (the tint on these is so pleasing!) 
v1.1 firmware (voltage readout to 4.2V, low voltage indicator, off-time mode changes) 
 It's a bit longer than it needs to be. The next one will be a touch shorter.













Can you make out the tiny 1/32" serial number? They're the tiniest punches I've ever seen and I quite like the look.





All pieces of the new one were lacquered because I much prefer a shiny finish to a tarnished one! Won't last forever, but it keeps things looking bright just a tiny bit longer. Lost a fair amount of blood building this one - the stain in the 2nd photo was what I couldn't buff out. I'll eventually Brasso and relacquer it.









It rides nice and low. Going to tweak the clip attachment to be a bit more elegant on the next one.





The brass/steel has a nice dark shine to it that really catches the light.





And now, time to set the project aside for a day or two and relax. Enjoy your weekend all!

>> Return to root post
>> Continue to next post in the series


----------



## archimedes

Looks awesome ... especially the new clip :thumbsup:


----------



## gunga

Wow. Awesome work!



Sent from my iPhone using Candlepowerforums


----------



## KuanR

Looking good! Enjoy your vacation!


----------



## tobrien

nice!


----------



## calipsoii

calipsoii said:


> The finished assembly is longer than I'd like. It doesn't crush batteries anymore but it's too long and skinny. I don't know how Malkoff crammed all that stuff into his 4.5" MDC AA without smashing all the wiring/circuits/batteries together. I'm trying to find some places to drop a half-inch of length. If anyone has a AA Haiku who can measure the total length, please let me know!





calipsoii said:


> It's a bit longer than it needs to be. The next one will be a touch shorter.



Oh my goodness, after obsessing over the length of this thing for a week, trying hard to find places to drop space and not finding any... I was measuring using my green cutting mat and the numbered lines aren't exactly 1 inch apart like I foolishly assumed they would be. 

Actual length of the finished light (as measured by ruler and calipers) is 4 3/8". So 1/16" longer than a AA Haiku and 1/8" shorter than a Malkoff MDC. You'd be surprised what a relief it is to figure that out. 

After a weekend of testing at the cabin:


Fixing 1 bug in the firmware introduced another (as was foretold by my pessimist coworker); shouldn't take long to track it down and squish it so a 3rd can take its place. 
High is too high on NiMh; current limiter hits thermal shutdown and starts to flicker. 1 level less and the issue disappears with no noticeable drop in output and improved runtimes. 
Secondary LED is sitting too low in reflector (I was trying something new). Gives it a nice SunDrop-like beam but introduces a distracting ring as the bezel reflects some light now. 
Wire clip so far seems a vast improvement over the Strong-Tie/Misty clip. 
Off-time mode switching is so much fun; light comes on in the level I want and never a different one. ~1s seems like a good amount of latch time. 
Glad it tail-stands; used that extensively this weekend. 
The reflector is probably a love/hate thing for a lot of people. I personally really like the beam pattern and I'll take the improved throw at the cost of smooth spill transition, but everyone has different preferences. 
 The shallow, smooth reflector gives a pronounced hotspot with little transition to the spill of the beam:





The 3mm is seated too low in this particular light giving it a funky half-moon reflection. Gorgeous flood beam though.





The 3mm has a nice smooth flood beam with good color rendition. Used it a lot for navigating this weekend with great success.





>> Return to root post
>> Continue to next post in the series


----------



## gunga

Wow! Awesome! I am one if those who prefers smooth spill transition. 


Sent from my iPod touch using Candlepowerforums


----------



## tobrien

I keep saying it, but this really is amazing


----------



## calipsoii

gunga said:


> Wow! Awesome! I am one if those who prefers smooth spill transition.
> 
> 
> Sent from my iPod touch using Candlepowerforums





tobrien said:


> I keep saying it, but this really is amazing



Thanks guys!

After several hours of testing, I'm coming up with the funniest voltage results when running the light on High.

Voltage under load
Energizer L91: 1.52V
Duracell Quantum AA: 1.37V
Surefire SF123: 2.79V
Sanyo Eneloop AA: 0.92V <-------- ????

The only explanation I can possibly think of is that my Eneloops are old and decrepit. All my CPF research indicates that voltage under load for Eneloops _should _be around 1.2V. Mr. Happy did an excellent chart of that here. I'm currently running my entire stable of Eneloops through the Maha charger on Analyze + Break-In mode to see what comes out of it. I have a sneaking suspicion the cells are the issue and not the circuit. Just doesn't make sense that an alkaline would smoke a freshly-charged NiMh in performance.

Speaking of circuits: this is plain nuts. 470lm on 1xAA? When I started this project (long before starting the thread for it, FYI  ) the Quark line-up was just pushing 160lm. Unreal progress in only a few years! This damn light has never been in anyone's hands other than my own and it's already old, dim and expensive. :laughing:


----------



## tobrien

wanna borrow some Amazon branded Eneloops? I have eight or so brand new ones: http://amzn.com/B00CWNMV4G


----------



## calipsoii

tobrien said:


> wanna borrow some Amazon branded Eneloops? I have eight or so brand new ones: http://amzn.com/B00CWNMV4G



Whoa, I had no idea Amazon was selling them! I'll just order up a pack tobrien, no worries.

My Eneloops are behaving much better after a night of conditioning on the Maha. The charger reports ~1800 mah for each and after an hour on High in the light, the cell still reads 1.19V instead of ~0.56V. I should probably deep-cycle them more frequently, I didn't realize their performance could get so poor without it.


----------



## tobrien

calipsoii said:


> Whoa, I had no idea Amazon was selling them! I'll just order up a pack tobrien, no worries.
> 
> My Eneloops are behaving much better after a night of conditioning on the Maha. The charger reports ~1800 mah for each and after an hour on High in the light, the cell still reads 1.19V instead of ~0.56V. I should probably deep-cycle them more frequently, I didn't realize their performance could get so poor without it.



well I'm not saying they're _definitely_ eneloops but they should be I'm assuming. mine seem like good quality cells


----------



## chadvone

Amazing. I have read this thread twice since I stumbled across it earlier today. I am interested in one of these when your ready to sell.


----------



## Illum

Beautiful work, little light certainly has came a long way from the beautiful stained oak test bed hey:huh:



gunga said:


> Are you going to be selling these? The firmware changes sounds cool too...




forget the light, I'm interested in your old lathe, the 4500


----------



## calipsoii

chadvone said:


> Amazing. I have read this thread twice since I stumbled across it earlier today. I am interested in one of these when your ready to sell.



Hiya chadvone, welcome to the thread! I'm really glad you enjoyed the read - documenting the build has been a nice way to show the progress/setbacks the project has gone through.



Illum said:


> Beautiful work, little light certainly has came a long way from the beautiful stained oak test bed hey:huh:
> 
> forget the light, I'm interested in your old lathe, the 4500



Oh yeah, you bet. When I built the wooden testbed I'd never stood in front of a lathe before. :duh2: Learned a lot throughout this project and got a sweet pocketlight out of the deal too.  The old lathe still serves me well as a dedicated milling machine, cutting flats and drilling holes where the new lathe can't.

-----

After a much-needed holiday I'm back and feeling rested and rejuvenated! 

I spent a few hours today working on a square punch. I've been machining the reflector centering rings out of Delrin but cutting the square hole in the middle by hand. It's tough to get the square perfectly centered in the ring, which causes the emitter to sit crooked in the reflector. I figured if I had a square punch I could just bang the square into place instead.

Since the punch needed to be quite stiff, I decided to experiment on a small piece of stainless steel purchased from my local shop. It's 304SS, which has a 45% machinability rating (compared to the 100% I'm used to with brass). I've been told it's a real bear to work with and they were right. I have no plans to make anything more out of it.

The tiny ring in the middle is for positioning the punch and the square is for making the marks on the Delrin. I'll probably need to finish the cut with an X-Acto knife.











The square is the exact size of a 3535 LED (so any XP-series emitter). 





I haven't had a chance to use it yet so I'll let you know if it does what I need it to. 

>> Return to root post
>> Continue to next post in the series


----------



## calipsoii

*Quality vs. Quantity*

I do believe it's time for a mini *project update*! So what have I spent the last few weeks doing? Cursing, mainly. I've complained about it before but sometimes these projects just aren't a lot of fun!

Exhibit A: the scrap results of trying to replace the driver board in prototype #002.





I pulled the old board out of the light, flashed the firmware onto a new board and... it didn't work. Neither did the next 2! I spent a week troubleshooting the circuit design and the firmware trying to track down why things suddenly wouldn't work and found nothing.

Feeling very dejected, I pulled a 4th board from my dwindling supplies and it worked brilliantly the first time. ARGHHHDSJAHDASDJK. The other 4 must have had solder issues that I couldn't see, not sure how else to explain it. At least the PCB design and the firmware are ok. *phew*

While I was in there tinkering I swapped the emitter out to one I've never worked with before:





It's an Osram Oslon SSL80:

80 degree angle of emission (which is crazy tight compared to the 150-170 degrees that are standard) 
4000k 
90 min (96 typ.) CRI 
 But of course with bullet points like that, you're asking yourself "why does no one use this LED?!?"

Cree XP-G2 4000k 80CRI: 122lm @ 350ma 
Osram Oslon 4000k 95CRI: 79lm @ 350ma 
 It's a lot dimmer - noticeably so. But oh man, the COLORS!





Is the 80-degree beam noticeably different than a 150-degree one? Oh yeah.










I spent a lot of time this evening trying to capture the beam & tint of the light. I didn't have a lot of success, but I'd say this was the best batch of photos at illustrating how it looks. I locked as many settings as my camera would allow.

White Balance: daylight 
Shutter: 2s 
ISO: 200 









































Tint falls right in the middle between an A2 Aviator and a 119 Haiku:





The blue ring around the SSL beam isn't your imagination - it's actually there. For some reason Osram produces the emitters with a _tiny_ patch of die that isn't covered by phosphor, exposing the blue photon pump underneath. You can't make it out with your naked eye - need an aspheric lens or a magnifying glass to see it. With a stippled reflector or a diffuser it disappears, but in a smooth reflector that bit of blue makes it into the beam. No idea why they make them that way but it's been reported on a couple other flashlight forums as well.

Truth be told, you can't much tell when in use. It's a really nice beam.





So there we go! The project isn't dead, it's just busy wasting circuit boards and taking night photos.  I promised a coworker a torch, so I'm working on his now. I'll let you know how it turns out. 

Cheers!

>> Return to root post
>> Continue to next post in the series


----------



## gelandangan

This is a totally awesome thread. 
I am glad that I read this from front.

Thank you for sharing.


----------



## tobrien

spectacular


----------



## calipsoii

*A Host Does Not a Light Make*

Thanks for the comments guys! 

Just got back from a week in the mountains - it was very relaxing. 





I've spent the last couple days working on my co-workers light. On proto #002 I just eye-balled the clip so I had no measurements or anything recorded for it. For this next clip, I've been making jigs and taking measurements and drawing schematics. Takes a lot of time but it'll make the next clip go a lot faster.















The body of his light is now complete and looks very much like proto #002.





But none of the internals are done, so it still has a ways to go.





I got a chance to whip up some LED centering gaskets using my square punch - they look pretty good but I won't know for a few days until I try to use them.





The bulk of the remaining work is going to be soldering together the driver. After that, everything just needs assembled into its housing.





This torch will be getting a 90CRI 3500k SSL150 so I'm excited to compare the 2 emitters side-by-side and see which I prefer. I'll post about it in a few days. 

Cheers!

>> Return to root post
>> Continue to next post in the series


----------



## scout24

Liking the beam shape and tint on that SSL80! :thumbsup:


----------



## calipsoii

*LED's and 003**'s*

Except for punching the #003 serial number stamp on it, my coworkers light is complete! With some incremental improvements over #002, this is the best one yet and I'm very happy with the design & function. If I had the cash I'd walk into a machine shop right now with my schematics exactly as they are and ask for 25 of them. 





I put an SSL150 (not SSL80) in this light. 3500k this time instead of 4000k. 90+ CRI. First time I turned it on the very first thing I said was "god that's gorgeous". This torch has (without a doubt) my favorite tint and beamshape of any LED light in my house right now. The Fenix TK20 narrowly beats it in tint, but only narrowly, and the beam on this one is nicer. Unbelievable, especially considering I put a 1/8" hole in the reflector with a power drill and stuffed a 3mm LED in there. Side-by-side right now, I prefer it over a N119 Haiku and even my coveted Oveready N119 Eiger.

It's getting late so just a couple shots to hopefully give you an idea what I'm seeing.

First the *beam shape* (ignore the tint, it's not accurate in this shot). The 150 degree emitters works so well in this smooth reflector! Tight hotspot with a much less pronounced transition to spill compared to the SSL80. It has this 3-ringed bullseye pattern with a soft fade between each ring that I find stunning. Love it.





Next, the *tint*. If you like incandescents, you're gonna love this. Same color temp as an A2 Aviator to my eyes, but with the expected loss of CRI when comparing the two side-by-side. Note the huge spill covering the left garage wall.





Finally the *colors* - true and accurate so far as I can tell. Things lean a little yellow just because 3500k _is _a little yellow. Right now at night? So pleasing. During the midday sun, probably not so much, but I don't need a torch during the day.










As you can probably tell I'm a little smitten right now. Hopefully my coworker enjoys his light - goodness knows he's listened to me babble on about this project for the last 3 years! Next up is some documentation explaining how to program the firmware and access its features so he's not totally lost. 

Then - another light. I cannot wait to get #004 done.

>> Return to root post
>> Continue to next post in the series


----------



## darkknightlight

That looks awesome! And the color rendering does look fantastic. I look forward to more updates!


----------



## gunga

So, kick starter or pre-order so you can pay that machine shop?

I call dibs on #9 or 18. 




Sent from my iPhone using Candlepowerforums


----------



## yoyoman

+1 
I would be willing to pre-pay (even though the last time I did this I had to wait a very long time and read a lot of stories about bacon).


----------



## Megatrowned

Your work on this light keeps amazing me. I really hope one day you are able to sell some of these.
Just out of curiosity, what wavelength is the red LED that you're using?


----------



## calipsoii

Thanks for the comments and for following along guys! Part of me (the greedy part) wants to keep #003 for myself, it just turned out that nice. :devil: I think the LED surprised me most - I hope all of the emitters I bought are this nice and it wasn't just a one-off beautiful one.



gunga said:


> So, kick starter or pre-order so you can pay that machine shop?
> 
> I call dibs on #9 or 18.



Heh, I haven't even gotten a quote from a machine shop yet gunga. With the amount of fiddly machining that went into this I would be scared to learn the total! The driver pill alone has 3 pieces - most lights just seem to jam the driver boards up into the pill and I think I know why: costs. 100 pieces is considered the absolute lowest MOQ by most shops in town and most aren't interested in running any less than 1000. The CNC time is simply more valuable making oil-field parts in this province. Considering the quote for 100 Lamplighters (crazy simple design by comparison) I wouldn't be surprised if 100 of these torches cost well into 5-figures.



yoyoman said:


> +1
> I would be willing to pre-pay (even though the last time I did this I had to wait a very long time and read a lot of stories about bacon).



I'll keep that in mind yoyoman, thanks for the vote of confidence. Pre-pay has such a potential to go south quickly that I don't think I'd ever want to put myself into that situation. We have so many examples around here of what happens when money changes hand before goods.



Megatrowned said:


> Your work on this light keeps amazing me. I really hope one day you are able to sell some of these.
> Just out of curiosity, what wavelength is the red LED that you're using?



Thanks Megatrowned! This light actually got a warm-white 3mm (~3700k) LED. It's a nice specimen and looks roughly like the 5mm WW ones I used to love in my A2 rings. The deep reds I have on-hand are 660nm and a gorgeous ruby color.


----------



## gunga

Ugh. It looks so cool, but alas, may remain one -off. Sigh. 


Sent from my iPhone using Candlepowerforums


----------



## MustSimon

Subscribed to this thread. I'm very much enjoyed seeing your work. The color rendering of those Oslon SSL does look very nice.


----------



## calipsoii

gunga said:


> Ugh. It looks so cool, but alas, may remain one -off. Sigh.



It's not a one-off.



MustSimon said:


> Subscribed to this thread. I'm very much enjoyed seeing your work. The color rendering of those Oslon SSL does look very nice.



Thanks for following along MustSimon! I'm going to continue working away and documenting the progress here.


----------



## calipsoii

Did some tests on proto #003 yesterday for anyone who's curious.

Short version
- ~50lm ANSI on High
- 2.5hr regulated runtime (3.5hr total) on AA lithium primary
- 1.5hr in regulation (2.1hr total) on NiMh
- 0.5hr in regulation (2.2hr total) on Alkaline
- 2.9hr in regulation (2.9hr total) on 14500

Long version
The torch isn't going to win any brightness or efficiency competitions. It's closest in performance to the Steamlight ProTac EMS light - runtimes and output match almost exactly. That light is almost 3 years old now and we've come a long way since then. 

Bad news aside, this torch does offer a more advanced firmware to allow it to run as a single-mode or multi-mode light with customizable brightness on all levels. Li-ion support with voltage monitoring. Flood secondary LED with sub-lumen moonlight mode in any color. High CRI incandescent-like primary LED. And it's handmade by a dude in Canada! :thumbsup:

I'll pop a battery in and try a few runtime tests on Low and report back. I'm also working on the firmware documentation so I might post that here and ask if it seems clear to everyone.

Back soon! :wave:


----------



## archimedes

Thanks very much for the runtime data ... :thumbsup:


----------



## yoyoman

You are wise. Prepayment schemes can go south quickly. But CPF is great compared to some of my yoyo experiences. Somebody posts a prototype of a great yoyo, a bunch of people vouch for the maker, he takes orders (and your money), he delivers a few yoyos and then runs into trouble. CPF is much, much better. I would love to help you make this happen.


----------



## calipsoii

Hey all!

I _have _mentioned that the programming socket was worth every second it took to make, right? Ok good just checking. 








calipsoii said:


> I'm also working on the firmware documentation so I might post that here and ask if it seems clear to everyone.



I've been working on a business-card-sized reference guide with... mixed results. It has all the necessary info on it but looks pretty busy and is somewhat hard to read. Here's the front and back:





I've been debating making a larger guide with full-text instructions but I really doubt anyone reads instruction manuals nowadays. Should I just make a quick YouTube video and print the URL on a card? What do you guys think?


----------



## tobrien

you could print the YouTube URL on the card, but I'd skip that honestly, because if YouTube changes their URL scheme..


----------



## calipsoii

*Practice Makes... Diamonds**?*

Hoo boy, the knurling on this body just didn't come out right. I kept shaving it down hoping there would be nice diamonds underneath, but alas, no luck. Certainly not worthy of anyone's pockets!





Instead of scrapping the material I decided to spend a night doing some knurling practice on it!


After quite a few test passes, I wound up with some pretty clean work. My knurling wheels are dull and need replaced, so sharper ones would probably have even better results.










The bar was too skinny to reuse for another torch, so instead I shaved it, drilled it, parted it off, cleaned it up and turned it into a couple beads.





Let's see how the next body turns out. 

>> Return to root post
>> Continue to next post in the series


----------



## DaGlitch

Really diggin this light. Amazing work!


----------



## tobrien

DaGlitch said:


> Really diggin this light. Amazing work!



tell me about it!


----------



## Zandar

Once again call me amazed. I definitely like this light's unique "personality" and style. I have a feeling were going to see several more of these lights produced.


----------



## gunga

Sweet job on the knurling!


Sent from my iPhone using Candlepowerforums


----------



## calipsoii

Zandar said:


> I have a feeling were going to see several more of these lights produced.



I... don't know what you're talking about. :devil:


----------



## Megatrowned




----------



## the_guy_with_no_name

Hi calipsoii,

What a totally awesome project, thread and build.
I stumbled upon it randomly and I sure could relate to so much of it.

Beautiful, beautiful, beautiful…
and congrats on bringing it thus far.

Tgwnn


----------



## calipsoii

the_guy_with_no_name said:


> Hi calipsoii,
> 
> What a totally awesome project, thread and build.
> I stumbled upon it randomly and I sure could relate to so much of it.
> 
> Beautiful, beautiful, beautiful…
> and congrats on bringing it thus far.
> 
> Tgwnn



Heya Guy, welcome to the thread! Seeing as you _also_ got the ridiculous idea in your head to build your own light, I've been following your project threads with great interest. 

I'd love to say that I'm just putting the finishing touches on the design but I've been saying that for 8 months now. At this point everyone is telling me "dude, it's good enough" whenever I mention the little tweaks I've been doing, so I'm trying to balance their advice with the niggling details that I want taken care of. The changes I'm making now are tiny quality of life things:


Moved the front shoulder 0.025" out of the body so that the o-ring doesn't slip into the threads and get shredded over time. 
Moved the rear shoulder 0.025" into the body so that the switch boot sits fully below the clip hole, otherwise water might get between switch and boot. 
Put a 90 degree bend into the end of the wire clip and drilled 2 matching holes to drop it into. Right now the clip can be wiggled side-to-side because one screw will always twist in a hole - securing the ends of the clip into the body should do the trick. 
Machined a jig to help bend the edges of the washer for the clip and practiced my hammering technique so it doesn't smear the metal. 
I also just finished the instruction manual. The one-page card was crap: impossible to decipher to anyone but me. The new one has some simple illustrations and fits neatly in a 4.5 x 2.75" booklet. It took 2 solid days of work (some of that was learning InDesign and Illustrator) but I'm pretty happy with how it turned out. I hope to post it this evening in case anyone wants to take a look and give feedback. We've been calling the light by a different name (other than 'The 1.5V Project') in my household for quite a while now - my wife made the suggestion and I quite liked it. I ran it by a very important member here on the forums and got his blessing to float it out here for everyone's consideration so the manual will have that printed on the front. I'm hoping it meets with everyone's approval and that I'll get feedback if it doesn't. Exciting stuff!


----------



## gunga

Those niggling details, are what make the difference between a good light that has some quirks, and a superb, very well designed light. When a product designer considers these little details and touches, it really sets the product apart.

Consider it time well spent. I know I always appreciate those details.

EDIT: I can't tell you how many lights I've seen that are brilliant but have a little detail here and there that is very annoying and should not have been missed. No light is perfect, but the more effort you put into perfecting it, the better.


----------



## yoyoman

I want to echo gunga's encouragement. It is those little details, those things you think no one would notice that make great designs stand out. The devil is in the details and if you get the details right, then everything shines.

My cousin is an industrial designer and he renovated a town house in Chicago. He drove his wife crazy with two things: the color of the stain for the wood plank floors and the light switches. These two things delayed them from moving in for 2 months. They had to live in a temporary apartment because they had already sold their house. His wife was beside herself - living in a temporary apartment, her belongings in storage and all because my cousin didn't think the floors were the right color and the switches didn't have all the functions needed. When we visited, I immediately noticed that the floors were the perfect color and the wall switches had all the functions needed to take advantage of the lights.


----------



## the_guy_with_no_name

calipsoii said:


> Heya Guy, welcome to the thread! Seeing as you _also_ got the ridiculous idea in your head to build your own light, I've been following your project threads with great interest.


Thanks calipsoii,

ahh yes, the ridicule all started with an innocent thought/intent of making myself just one cool light....

Keep up the great work and feel free to give me a shout anytime I can be of help.


:twothumbs
Tgwnn


----------



## calipsoii

*Instruction Manual *(or:* How Do I Work This Thing?!*)

The light needs an instruction manual, that much is pretty clear. 

I originally had the idea of a 2-sided business card but it got busy pretty quick and no one I showed it to could make heads or tails of the thing:






My coworker suggested a small document with some basic "How To" steps on it. After thinking on this for a bit I spent a weekend whipping up the first revision of the manual. I think it turned out much better! I tried to keep it as simple as possible, but even so, the later pages get a bit hairy when you're programming the firmware. Here there be dragons.

This is also the first document with the lights name on it, so I find that nerve-wracking. Many months ago my wife commented "it looks like a spyglass. You should call it that". The name just kind of clicked with me and we've been calling it that ever since. It's kind of fun and whimsical and goes well with my theme of things from eras past. 

That's all fine and dandy around the house but here on CPF you may have heard of a little line-up called SPY. Dave's lights are no joke - in my opinion the man has set the bar for custom light perfection. I think every CPF'er here has likely drooled over the shots of the business end of a Tri-V. You can probably understand why I was hesitant to use those letters anywhere when talking about my little light - I do not want to step on his toes even a little bit. Dave's amazing though: he replied back and said he didn't have a problem with it. I could hug him if he was standing here!

As far as I can tell the name _is _up for grabs right now. Outside of an unnamed concept sketch on behance there are no references to a spyglass flashlight that I can find anywhere. It feels like only a matter of time until Thrunite/Olight/Klarus/Sunwayman announce their G25XLV-2 "Spyglass" Limited Edition brass light and then I'll certainly be kicking myself for waiting and losing the name I love.

So now that we've covered all my thought processes, let's have a look at the instruction manual.  





The manual won't be easy to read on an iPad or phone, but if you have a printer nearby and feel like printing it out, I'd love your feedback! Print it double-sided and fold it twice into a little booklet: if the above image is on the cover you've done it right!

Like it? Hate it? Have suggestions? Leave a comment or send me a PM!


*Posted Date
**Firmware Version
**Download
*2014-10-291.2.pdf (624kb)


>> Return to root post
>> Continue to next post in the series


----------



## tobrien

I printed the manual with a double sided printer and it looks like it's a great one! I can't find any fault with it personally


----------



## calipsoii

tobrien said:


> I printed the manual with a double sided printer and it looks like it's a great one! I can't find any fault with it personally



Mighty kind of ya, thanks tobrien! I'm glad to hear it works on a printer other than my work and home one.  Any thoughts on the name of the light? Is it ok the way it is? Should I name it something else?

-----

Spent a few hours doing some milling today - finished all the cuts for the next prototype:















This is also the first light where I'm experimenting with a new way to secure the clip. The body of the light doesn't look very happy about the whole thing. 





The clip was modified slightly with a 90-degree bend at the very end.





Then the bent ends were dropped in the hole and the whole assembly secured as before with the folded washer.










From the front things look very much the same but from an angle you can see a bit of difference between the old and new.





Securing the ends of the clip into the body works wonders for preventing twisting. Because it doesn't twist as much, the screw also doesn't back out over time, so the whole assembly just stays a lot more stable. Unless testing turns up something wrong with the idea, I think future lights will have the clip secured in this way.


----------



## tobrien

@cal: the name is very clever IMO. I think the only possible downside is the fact that if someone didn't _know_ it was a flashlight (they would, however, know if they see it of course) then the name might be _potentially_ confusing, but I like "Spyglass" and it works well IMO

edit: no problem (RE: manual)


----------



## DrafterDan

I like the name. Spyglass to me speaks of old-world craftsmanship. the manual looks very straight forward, just what it needs to be. 
I can't help feeling that the bolt/washer for the clip can be refined. Is there room enough to fit a skinny socket head bolt and change the washer to a contoured bar? If the bar were shaped kind of like a W, it would allow the top of the bolt to be much closer to the body.


----------



## calipsoii

That's a great suggestion DrafterDan. The original Strong-Tie clip had tiny socket-head screws so maybe I can re-use them. I'll have to give some thought to a more minimalist design that's still as secure as the current one.


----------



## calipsoii

Figured I'd share a couple quick glamor shots of proto #004 with everyone. It didn't turn out quite like I hoped - the deep red LED is a bit too dim to be really useful. I also apparently used way too much blue Loctite on the head because I cannot get it open again, so it's now complete whether I like it or not. My wife saved it from being chucked out into the street in frustration so it's hers now. 

Other than that it's a really nice light. Best knurling of any so far, nice surface finish, new clip and a really beautiful and well-focused SSL150. The beam really has to be seen to be believed: side-by-side with a Strion A2 it's hard to tell the two apart.











New (brighter) 3mm LED's are coming: ultraviolet, blue, cyan, green, yellow-green, amber, orange and deep-red. Should be able to post my impressions soon.


----------



## AnAppleSnail

That is beautiful work. I'm doing some longer-term electrical tests of a project I've mulled over. Similar to Lamplighter, but less keychain-friendly.


----------



## DrafterDan

I did a super-quick AutoCAD drawing. I'm pretty sure you see what I'm thinkin' but I had a few spare moments this morning:







You see the whole idea is to get the screwhead a lot closer to the body. It might be too much trouble to fab this small winged part, but you did say you were working on your hammering technique!


----------



## gunga

That is pretty sweet. Love the name too.


----------



## nein166

Oh yeah that knurling looks sharp, but not sharp feeling well done

Ever see the wire clip on spyderco knives? Theres a milled slot to recess the wire and sometimes 1 small screw on each side
Much more machining and tapping but super secure no twisting wire

DrafterDan your winged washer looks like it could lower the profile looks like a square splice washer with an extra bend maybe thats an off the shelf piece to start with
I've seen something like this on electircal wire screw down terminals


----------



## calipsoii

nein166 said:


> Ever see the wire clip on spyderco knives? Theres a milled slot to recess the wire and sometimes 1 small screw on each side
> Much more machining and tapping but super secure no twisting wire



There's no room in the tail for Spyderco grooves, the metal is too thin. Cutting even a little slot will put me into the threads for the clicky switch. Making the tail fatter isn't really something I want to do since it adds needless weight and I'd have to make the head larger to keep the diameters the same. The light is quite slim in the hand/pocket right now and I hope to try and maintain that. 

The 3 hole solution worked wonders though - the clip doesn't budge at all. Just need to look at something like DrafterDan's idea to make the clip attachment a little less bulky and a bit more aesthetically pleasing.

-----

Guess what arrived?





From left-right, wavelength in nm: 390,465,505,525,579,590,605,660





Some are brighter than others (the Y/G being notably dim)










The new deep reds are also quite a brighter than the previous ones I was using. Time will tell if they work well once installed in a light.










I do of course still have the really nice warm-whites, as well as cool and neutral.


----------



## archimedes

Great photos ... very good at demonstrating the colors, brightness, and beamshapes of those LEDs !


----------



## tobrien

yeah those color comparisons were great


----------



## calipsoii

Thanks guys, they're really nice LEDs - I'm excited to try them in a reflector. The deep reds in particular are quite stunning and I believe they'll be a lot more usable at this brightness.


----------



## Zandar

I'm really excited to see the progress you have made with each prototype. Your on the path to producing a really unique light.


----------



## calipsoii

I think it's probably time for a little project update!

Well for starters I spent some time working on a body that didn't turn out. For some reason (despite everything being set correctly) the threads just don't work. It's -20 here with snow so working in the garage takes a lot out of a guy. It was pretty painful to have a workpiece not work for unknown reasons after freezing for 2.5 hours so I haven't been back out there since.





That was actually a pretty good impetus to talk to some machine shops and see what it'd cost to get someone else to do this work for me. I've been putting it off forever, but finally sat down and re-did all the CAD models to reflect the new v2 styling. I had previously been writing all my revisions in ballpoint pen on the v1 schematics so it was time to get them digitized. I now have a nice batch of up-to-date schematics that I hope to take to a few places around town and get quotes on.

Spent a little time soldering some drivers together with great success; they just need hosts to go in.





Also sourced some very nice velvet pouches to fancy the lights up a bit. They fit perfectly and are a nice way to present and store the torches.





That's all for now. Next up is seeing if there is any way to have someone make me the metal parts of the light without breaking the bank. I'll be sure to update you guys either way. 

Cheers!


----------



## tobrien

perfect


----------



## calipsoii

Thanks tobrien, the little velvet pouches turned out much better than I was hoping. I really like them. 

Not much progress on the project to show you guys. I need to do some work on the lathe but the weather isn't cooperating.





-33 is a bit cold to be working the metal handwheels on the lathe.


----------



## calipsoii

*A Dazzling Display of Color*

A while ago I received an order of 3mm LED's in all kinds of colors for those people who want something other than white to go with their white.

Wavelength in nm (left to right): 390,465,505,525,579,590,605,660















It can be hard to tell from those photos what the beams look like in use though, so tonight I found some time to snap shots of each. Colored light can be tricky to photograph so _most_ pictures are accurate to what my eyes see, but there may be some slight differences.

Camera settings are locked at:
- ISO 200
- 2.0s exposure
- automatic white balance

Let's get started!

*1) Ultraviolet 390nm @ 18ma



*

*
2) Blue 470nm @ 20ma



*


*3) Cyan 505nm @ 20ma**



*

*4) Green 525nm @ 23ma



*

*5) Yellow-Green 570nm @ 25ma



*

*6) Amber 590nm @ 23ma



*

*7) Orange 605nm @ 24ma



*

*8) Deep Red 660nm @ 25ma*




*
9) Warm White 3300k @ 19ma





10) Neutral White 5000k @ 20ma





11) Cool White 6500k @ 25ma*





Most of the tints are accurate to what my eyes saw and the relative outputs definitely were. So there you have it! 

>> Return to root post
>> Continue to next post in the series


----------



## AndyF

Thanks for posting these, I was curious how cyan and amber would look.


Sent from my iPhone using Candlepowerforums


----------



## tobrien

very nice stuff!!

what applications might amber and cyan be preferred for?


----------



## calipsoii

You know, I have no idea! I'm not big into cyan myself but the amber is a very soothing campfire color. If I ever had plans to make a mini-lantern to hang from my dog's leash for visibility while walking at night... I'd probably use amber.


----------



## archimedes

Some interesting discussion here ...

http://www.candlepowerforums.com/vb/showthread.php?221845-Cyan-LED-Uses


----------



## tobrien

calipsoii said:


> You know, I have no idea! I'm not big into cyan myself but the amber is a very soothing campfire color. If I ever had plans to make a mini-lantern to hang from my dog's leash for visibility while walking at night... I'd probably use amber.


I agree with you about amber being a soothing campfire color now that you mention it. I guess I know what 1.5v Spyglass color I'm gonna get 


archimedes said:


> Some interesting discussion here ...
> 
> http://www.candlepowerforums.com/vb/showthread.php?221845-Cyan-LED-Uses



thanks for the link!!


----------



## chadvone

That amber looks sweet. Neutral and Amber would be my choice.

Amber looks like it would be at making things look older 

About how many Lumens on secondary LED, or did I miss it in the posts.


----------



## calipsoii

chadvone said:


> About how many Lumens on secondary LED, or did I miss it in the posts.



Hi chadvone! If I had to guess, the whites are probably 9-10 OTF lumens. The colored ones are harder to put numbers on since lumens only really applies to white light. Colored light is usually rated in terms of output power (watts) instead. But I'd guess the blue/green are ~9lm, the red 8lm and the oranges 6-7lm.


----------



## calipsoii

While I'm thinking about it, you guys might get a kick out of this. 

One of my Christmas presents to my wife this year. Anyone who's been following this thread oughta recognize those converter boards.  The hardware is .925 sterling silver.






Of course, jewelry needs a jewelry box and cardboard simply wasn't going to suffice! This was my first time turning bronze and I really enjoyed it. The seam is nearly invisible when closed and the threads are smooooth.









She very much appreciated the gift and both items are already getting good use. 





Happy Holidays all!


----------



## gunga

So nice!!!


Sent from my iPhone using Candlepowerforums


----------



## calipsoii

*Instructional Videos*

Certain operations with this light are hard to document in text so I'm going to make a couple short videos to demonstrate the functionality.


*Part 1: The Programming Menu*

The programming menu is accessed by tapping the tailcap 50+ times. Once in the programming menu, you must ride it out until it's done. There is no easy exit. The whole menu takes 2-3 minutes to navigate. If you don't want to change any settings... do nothing. The menu is entirely automated and will go through each item on its own and exit at the end. Only click if you want to change a setting.

Menu Items:

Number of outputs (1-4) 
Brightness for Output Level 1 
Brightness for Output Level 2 
Brightness for Output Level 3 
Brightness for Output Level 4 
Mode Memory flag 
Lithium Ion Mode flag 
Mode Change flag 
 



*Part 2: Time-On vs. Time-Off mode changing*

If you have more than 1 output level programmed, you need a way to switch between them! This is referred to as a mode (or output level) change. Different lights from different manufacturers do it different ways. This light has two possible ways of changing modes and you can switch between them by toggling the flag in the programming menu. It's all personal preference!

Time-On
If you've ever used a Nailbender dropin, his modules work this way. If the light is on > 2 seconds, it'll come on to the same output next time. If it's on < 2 seconds, it'll change outputs.

Time-Off
If you've ever used a 4sevens or McGizmo 3S light, those lights work this way. If the light is off > 1 second, it'll come on to the same output, otherwise it'll change.




>> Return to root post
>> Continue to next post in the series


----------



## chadvone

Great Job !!!

Did you cut video for 50 clicks or are you super fast ??


----------



## calipsoii

chadvone said:


> Did you cut video for 50 clicks or are you super fast ??



Hah, good catch! There _was_ a quick cut in between as nobody wants to watch me click 50x.  It doesn't take too long to hit 50 but it's enough that even if given to a kid they won't accidentally find themselves reprogramming the light.


----------



## chadvone

I have 250 clicked several Novatac flashlights. 50 will be a piece of cake:ironic:


----------



## archimedes

Just wanted to thank *calipsoii* for the opportunity to experience this handcrafted gem of a torch ...






... I'll try to keep my comments brief (here in this thread at least), since this is really the work-in-progress "build" thread and I had nothing to do with making this beautiful flashlight. Except for choosing the color of the secondary LED 

The machine work is elegant in its simplicity, and the shape is very comfortable and functional. The slight notch of the tube, where the tailswitch flares out, provides for a secure grip. It feels weighty and solidly built.

The aesthetic reminds me of a cross between two of my favorite torches. Can you guess which two ? (Peak & HDS). Knurled brass is such a nice flashlight material, and having a programmable output / user interface provides so much flexibility for customization. 

The programming is simple and straightforward, by following along on the "menu" with single-clicks for changes. The program interface even "reads back" to confirm changes, a much appreciated feature. Mode switches are super smooth, and the clicky has near-perfect tactile effect.

Output levels are well selected, for both the primary and secondary emitter. The output range of the primary emitter is a bit more compressed between the upper and lower end than I'd prefer, but I suspect that is largely due to driver chip limitations. With options for moonlight and firefly output on the secondary emitter, low output with a very long runtime should be no problem. While a higher maximum on the primary LED would be nice, output is certainly more than adequate for EDC purposes, especially given it's small size and limited heatsinking.

The main LED is one of the few with which I am not very familiar - the Osram Oslon. Tint is pleasantly warm, with excellent color rendition. I chose deep red for the 3mm secondary emitter, and find it compares very favorably with my other red torches, with very useable output. One nice feature of the offset secondary emitter is that the asymmetric reflector pattern can be used to guide the light directionally (such as for use as a "map light" , to minimize glare to others).

The very shiny and relatively deep SMO reflector provides for excellent throw on the main beam, despite this flashlight's narrow bezel.

One of the most useful bonus features is the voltmeter, which blinks out its report under load, while the light is on. This is especially handy, given the wide range of AA/14500 size cells it can run on for power.

Well, I guess I have not been as brief in my comments as I (or maybe you too) had hoped. So, to summarize ...

:goodjob:


----------



## gunga

Wow! Very cool and exciting! Would love to take a look at one!


----------



## chadvone

Congratulations !!!!


----------



## calipsoii

AAaaahhhh!! SO AWESOME. *dancing* 

Thanks archimedes, you've made my evening by posting your thoughts. _(I've been nervously excited to hear what he thinks ever since I sent it to him)_. It's fantastic to have the light in another CPF'ers hands and get impressions and suggestions to help improve it. I'm as excited this evening reading this post as I've ever been since starting this project. What a fantastic thing. 

Have a great evening all and Happy New Year!


----------



## archimedes

calipsoii said:


> AAaaahhhh!! SO AWESOME. *dancing*
> 
> Thanks archimedes, you've made my evening by posting your thoughts. _(I've been nervously excited to hear what he thinks ever since I sent it to him)_. It's fantastic to have the light in another CPF'ers hands and get impressions and suggestions to help improve it. I'm as excited this evening reading this post as I've ever been since starting this project. What a fantastic thing.
> 
> Have a great evening all and Happy New Year!



You are too kind, my friend


----------



## Heywood Floyd

archimedes said:


> You are too kind, my friend


Thanks for posting your thoughts. Sorry didn't see them before asking similarly on edcf.


----------



## Heywood Floyd

calipsoii said:


> AAaaahhhh!! SO AWESOME. *dancing*
> 
> 
> Thanks archimedes, you've made my evening by posting your thoughts. _(I've been nervously excited to hear what he thinks ever since I sent it to him)_. It's fantastic to have the light in another CPF'ers hands and get impressions and suggestions to help improve it. I'm as excited this evening reading this post as I've ever been since starting this project. What a fantastic thing.
> 
> Have a great evening all and Happy New Year!


Calipsoii, a special thanks for the super build documentation and sharing the many trials and tribulations.
Kudos to you - per angusta ad augusta
Thanks for sharing.


----------



## calipsoii

Heywood Floyd said:


> Calipsoii, a special thanks for the super build documentation and sharing the many trials and tribulations.
> Kudos to you - per angusta ad augusta
> Thanks for sharing.



Thanks Heywood! I've had a blast doing this build log and it feels really good to be able to share the successes and failures of this project with everyone on CPF. This project has given me profound respect for all the custom builders and the extraordinary amount of work that goes on behind the scenes before they release a new light. I feel that sometimes seeing the finished product belies the effort that went into getting there so I'm always keeping my fingers crossed that others will do build logs of their own so I can follow along.

I couldn't resist snapping a quick family shot before arch's light went out. If nothing else it does a great job illustrating the difference a bit of lacquer can make! #001 sadly doesn't work anymore but it performed admirably for a great run of testing and I'm hanging onto it as a keepsake. I'm also glad we moved away from the Misty clip. :huh:


----------



## tobrien

thats incredible stuff!


----------



## DrafterDan

It's times like this that we need a "like" button on CPF


----------



## calipsoii

Hi guys! 

Man, long time, no update eh? My household is hopping busy nowadays and I spend most of my time looking after the little guy so you've probably noticed the updates have slowed. That's not to say work has stopped on this project or others though! In addition to making Lamplighters as time permits, I may have mentioned that I've been redesigning the circuit from the Spyglass.

The original circuit was built around a Texas Instruments all-in-one chip. It handles current control and switching and did a decent job at it. I found it temperamental to work with though and soldering was an absolute nightmare (upwards of 70% waste) so the thought of continuing to work with that design was not an appealing one.

In the last few years I've learned an awful lot about electronics and I believe it's time I ditch that chip and re-do the circuit from scratch. The hope is to get rid of the features I don't need and add the ones I do. Yesterday was a pretty big day in that I sent the first Version2 boards to the fab house and ordered the electronic components.I have no way to tell if it works - I didn't breadboard the circuit this time around so it's possible absolutely nothing happens or maybe everything happens at once and the thing burns to a crisp. Even when they arrive I still need to sit down and write all-new firmware before any lights will turn on. 

All that said, it's pretty exciting to be kicking off the driver redesign and I hope to post a few updates here as it progresses. Stop in once in a while and we can share in the successes (and failures) together!


----------



## archimedes

Great news .... Hope there is a possibility for higher "high" and (especially) lower "low" output (s).


----------



## gunga

Yes! Looking forward to updates.


----------



## KuanR

Really happy to see the new circuit design kicking off to a start


----------



## moshow9

Wow, don't know how I missed this. Beautiful work so far calipsoii! 

Subscribed!


----------



## calipsoii

moshow9 said:


> Wow, don't know how I missed this. Beautiful work so far calipsoii!
> 
> Subscribed!



Thanks for tuning in moshow9! The updates won't be quite as quick as they used to be but I intend to keep them coming whenever I can. 



archimedes said:


> Great news .... Hope there is a possibility for higher "high" and (especially) lower "low" output (s).



That's the plan! Honestly I haven't even remotely tested whether the circuit works so I couldn't say right now. The electronics arrive today but my prototype PCB's will likely take almost a month to get here from OSHPark. :sick2: There are quicker fab houses but they're much more expensive and until I know it works I don't want to commit. I expect the next update will be once they show up and I get everything soldered on and a simple firmware written.


----------



## mk2rocco

Just read all your posts this morning and I'm am very impressed with your ingenuity! Can't wait for more updates!


----------



## calipsoii

*SOIC Programming*

As mentioned earlier in the thread, I've been working on Version2 of the circuit used in this light. Version1 centered around a Texas Instruments current control chip that was not only torture to solder but not as powerful as advertised. This new circuit will ditch that chip and hopefully offer better control over all facets of power delivery.

I'm sticking with the ATtiny85 as my microcontroller. It's a little powerhouse and offers a lot of features in a small size. It comes in different shapes and sizes - the one I like is called *S*mall *O*utline *I*ntegrated *C*ircuit and has 8 pins (or SOIC8 for short). I had some difficulties programming this same chip earlier in this build log, mainly because I didn't know that there is a "SOIC Clip" that can be used to program these things!

Here's the SOIC clip beside the ATtiny85 SOIC8 package:





It sits on top of the chip like this, allowing access to all the pins for programming:





The clip has 4 pins sticking out the top on each side. I needed something to connect to those pins and preferred a removable solution in case I ever needed to replace the clip. As it turns out, IDE ribbon cable from an old floppy drive fits perfectly!





Dissembling the ribbon cable connector shows how everything works. Tiny blades pierce the cable sheath and contact each wire. The black plastic top pieces secure it all in place.





The ribbon cable is FAR too wide to connect to the SOIC clip as-is, so it was time to trim some fat.





After trimming the connectors, we have a much more manageable 4x2 pin arrangement. 





The IDE cable is very easily separated into strands, so I made a small cut with an X-Acto knife and peeled it away until I had 2 cables with 8 wires each.





Checking the datasheet about 14x, I carefully marked the pin names onto the clip and connector. There are 8 wires but we're only using 4 from each connector.










The Atmel programmer has a 6-pin connector that looks like this.





We currently have an 8-pin cable, plus our wires are in a different order than required! We need a way to connect these 2 things together. It was time for a connector board.










A quick test with the multimeter confirms all the pins are in the proper order and none of them are touching.





As mentioned, of the 16 wires coming off our clip, we only need 6. I started splitting the cable and labelling the required ones.










Then I bundled them all up (in the correct order) and trimmed them off.





I started by laying the cable down across the blades and pressing with a pencil to secure everything in place.





Then I replaced the connector cover and gently tapped with a rubber mallet.





After a while, things started to look like this:





So it was time to pull off the cover and check that the cables were pierced and the connectors touching copper. Success!





After removing the lab tape and replacing it with electrical tape, the finished product looks like this:





Now all that's left is to attach the programmer and we're off to the races!





You may have noticed the Version2 boards in those pictures. Stay tuned for another update where we'll talk about how that whole thing went.

>> Return to root post
>> Continue to next post in the series


----------



## archimedes

Great photos and walk-through of building those cables ...


----------



## more_vampires

Beautiful! +1000 for the effort!  GREAT!


----------



## tobrien

incredible work


----------



## Ladd

thanks for including us in the fun!


----------



## KuanR

Thanks for the great update, it's hard to comprehend how far much progress you have actually made in this update


----------



## calipsoii

*PCB's Fit for Royalty*

Now that we have a SOIC programmer we need something to program! 

Version2 of the driver boards was sent to the fab house without breadboarding it first. This makes me uncomfortable because I like to know a design is going to work before committing it to PCB. That said, this time around I am using OSHPark, a company that does PCB prototyping. This means cheap cheap cheap boards at the expense of time (over a month between ordering and receiving). Because a whole bunch of boards was only $25 instead of $250 from a fab house I was willing to send it untested and sort things out once they arrived.

As part of their signature branding, OSHPark produces these really gorgeous looking boards. Royal purple soldermask and ENIG (gold) pads. It actually pained me to start slopping solder on such nice looking PCB's. Top is the double-sided driver board and bottom is the battery contact board.





As you can see they come panelized. The first step is to snap off a board and file off the breakaway tabs until it's nice and round.










I started on the bottom of the board where the brains live. Easiest to solder the tiny components first and work my way up in size to the big microcontroller.















Let's move onto the brawn, shall we? I know I know, it looks like a real mess of flux and solder. Those are big components soldered directly onto the ground plane with no thermals so it took a lot of heat and swearing to get them on. Future boards were reflowed with solder paste and look just perfect by comparison.





To answer the question I'm sure someone will ask: yes, that's a MOSFET. I know a transistor would probably have sufficed but I really wanted to play with one! As much as this project is about results it's also about experimentation. 

For Version1 of the 1.5V Project I built this really nice-looking oak testbed. It's sitting on my desk right now looking awesome. For Version2, time constraints and practicality won out and I was content with something less flashy. I dug out an old push button switch and a battery holder and set to work.

This is a Double-Pole, Single-Throw (DPST) switch. Fancy way of saying you can throw the switch and control 2 separate circuits at the same time. I only needed to control 1 circuit so I tested the 4 legs and figured out which 2 I would use.





I soldered the switch legs onto the battery carrier and wrapped it all up in electrical tape. Good enough!










To this assembly I added my new board and a power LED. There is no open circuit detection so without an LED connected the board would burn up the second I fired it up.





======================
Let's talk about the circuit for a minute. The battery is 1.5V. The LED and the microcontroller want 3.3V. To make that happen, something needs to switch the inductor (that massive coil) on-and-off very quickly to boost the voltage. In Version1, that whole switching thing was controlled by the Texas Instruments chip. In Version2, we've ditched the TI chip and I want the microcontroller to handle it. Sounds great! Except there's one little problem - the absolute lowest voltage the microcontroller will start up at is 1.8V which is slightly higher than the 1.2V of an Eneloop. The microcontroller won't power up on 1xAA and without powering up it cannot start boosting. Hmm.

What I'm doing (and what I did in the previous design) was to "prime the pump" using a dedicated boost chip. When you throw the switch the little boost chip (which starts up at a measly 0.5V) starts boosting. The microcontroller suddenly gets its 1.8V and takes over the job, turning off the boost chip in the process. Why not just use the boost chip exclusively then? Because it's tiny and can only handle a small current (65ma) before burning up. This is enough for a microcontroller but not nearly enough for a power LED. So we use it just to kickstart things and then the microcontroller/MOSFET/coil (rated to 3.5A) can take over and really let 'er rip.

Now, I don't have the code written yet. This means the microcontroller won't do anything when powered up. Because of the circuit layout though, the little starter boost chip is connected to the power LED. This means when powered on, the LED should glow dimly. It's good enough to test that the circuit is working until I get the firmware written.

TL;DR: clicking the switch should light up the LED.
======================

Safety first!





Drumroll please............

..... hmm.





Nothing happened. Well, not for the first 3 seconds at least. Then something started smelling really hot.





Ack! 2A of current flowing _somewhere _but not through our power LED. The board was too hot to handle after 10 seconds. Since the LED hadn't lit it was pretty safe to assume the voltage never reached 3.3V.

In 10 seconds bursts I connected the circuit and probed voltages. Then I'd let the board cool down and try again.





Results were... funny. Some parts of the board showed 0.7V when tested against the ground ring but 1.5V when checked against the battery negative terminal. I couldn't rule out bad soldering so I built another board with perfect solder joints (not pictured). It did the same thing.

Obviously something was shorting but without knowing what it was I couldn't troubleshoot. My attack plan was to solder a single component, test for short, solder another, test, repeat. Eventually I'd _have_ to add the component that was causing the problem and I could troubleshoot from there.

I started with the giant inductor coil:





Nope, not that.





Next I added the MOSFET. I figured 2A of current probably wasn't going through a 0402 resistor so why not start with the big things?





Bingo. With only an inductor and a MOSFET on the board there was a 2A short. I figured maybe the floating gate pin was the issue so I tied it low to no effect. I set off to re-read the datasheet and do a bit of research. It didn't take long to figure out.

Here's where I remind you I have zero formal electrical education. Everything I know I've learned from the internet and through experimentation. So don't laugh when I say I hooked the MOSFET up backwards. I think I got confused reading a few articles like this one:


> The flow of electrons from the *source to the drain* is controlled by the voltage applied to the gate. A positive voltage applied to the gate, attracts electrons to the interface between the gate dielectric and the semiconductor. These electrons form a conducting channel between the *source and the drain*, called the inversion layer. No gate current is required to maintain the inversion layer at the interface since the gate oxide blocks any carrier flow. The net result is that the current between drain and source is controlled by the voltage which is applied to the gate.



So I hooked the source up to the inductor and the drain to ground. Even the naming sounded right. Source = power, drain = ground. Perfect! Not so much though because a quick query for any MOSFET-based circuit confirms the opposite:





The board wasn't really setup to swing the MOSFET around but with some Kapton tape and a few airwires I got one soldered on backwards:










Sure enough, the short was gone





Even after soldering everything back on though, the LED still refused to light. No test points on the board read 3.3V like they were supposed to. The tiny boost chip is a new one I've never used before and some research reveals it has no output disconnect which would be a bad thing with the way my traces are laid out.

So where am I at right now? I've:

swung the MOSFET around on the board 
swapped the boost chip out with one I am familiar with that has output disconnect 

Those changes required a full board redesign so I pulled every component off it and started from scratch. As soon as I'm convinced nothing is missing they're going back to OSHPark for some more beautiful and (hopefully this time) fully functional boards.

Thanks for reading along; check back in a month when my new gold and purple boards arrive!

>> Return to root post
>> Continue to next post in the series


----------



## Illum

Looking good either way, learning by trial and error. You should have bread boarded it prior


----------



## more_vampires

Calipsoii, you are super sexy. Loving it!


----------



## Steve K

as always, a great write-up! 

Getting bugs out of circuits is standard process... nothing ever gets built without a few dumb errors slipping in. Knowing how to hook up a mosfet is certainly one of those beginner things. 

I concur with Illum about breadboards.. better to build an ugly board and get the bugs out of a design before commiting to a PCB layout, if you can. 

I'm still curious about using the uC as the boost converter controller. You mention that you aren't a degreed electrical engineer. Any chance that you have had a class in digital control theory?? Any kind of control loop is tricky because feedback can be a good thing or a bad thing, depending on whether you know what you are doing. You need to know where your poles and zeros are, and know where they need to be, if you want the control loop to be stable. 

Loop compensation can be tricky enough in switching power supplies, but boost converters add another level of weirdness because they really aren't that linear (at least compared to buck converters). How are you handling this? Were you able to read up on boost converters and figure out how to implement a good control loop in software (and presumably simulate it to be sure that it worked)? Or maybe find some open source code for this sort of thing? Or just make it a boost converter without much feedback, thereby avoiding some of the problems with control theory? (I've used some little Zetex boost converters that are definitely not "regulators")

Anyway... glad to see that you are learning! 

You might consider debugging each section of circuitry separately. i.e. debug the basics of the boost converter by feeding a fixed duty cycle square wave into the mosfet's gate. For debugging the uC, maybe open the feedback loop and see what it does when you provide a fixed feedback signal. You might also want to replace the white LED with something cheaper and more robust.. I use a handful of 1N4004 rectifiers wired in series, with a little 5mm red led and resistor wired in parallel. No point in killing a white LED when I could sacrifice a cheap 1N4004 instead.


----------



## Steve K

regarding the article about mosfets.....
"The flow of electrons from the source to the drain is controlled by the voltage applied to the gate. A positive voltage applied to the gate, attracts electrons to the interface between the gate dielectric and the semiconductor. These electrons form a conducting channel between the source and the drain, called the inversion layer."

I think it is EE101 where they explain to the students "we will use the convention of 'positive particle flow' when measuring current". i.e. current flows from positive to negative, but only because we are talking about the flow of positive particles. The actual electrons are flowing from negative to positive. 
This confusing matter has caused trouble for generations of electrical engineers....


----------



## more_vampires

Steve K said:


> I think it is EE101 where they explain to the students "we will use the convention of 'positive particle flow' when measuring current". i.e. current flows from positive to negative, but only because we are talking about the flow of positive particles. The actual electrons are flowing from negative to positive.
> This confusing matter has caused trouble for generations of electrical engineers....



Lol, Steve! I thought they were smoking something when I first read about "hole flow." You serious? It's like the "dark sucker" jokes and the "speed of darkness."

LOL!  Let's do it backwards! It works!


----------



## Steve K

shoot... I've been mulling over the issues related to using a micro to control a boost converter, and I'm wondering how Our Intrepid Poster will implement it. 

Will it be a standard technique of monitoring the critical parameter (i.e. LED current) and adjusting the duty cycle accordingly, or will it simplify matters a bit and use a feed-forward approach?? I'm thinking that since the load is relatively fixed, the battery voltage could be measured and used to calculate (or look up) the appropriate duty cycle. 

Of course, changing the duty cycle will change the load on the battery, which will change the voltage at the battery terminals, so loop stability could still be an issue, but it seems simpler than trying to measure the LED current.


----------



## calipsoii

Steve I'm always very humbled every time you post since you have such extensive electronic knowledge. I clearly remember you posting several years ago and 6 months after you posted I finally came to understand what you were talking about. I consider myself lucky to have you following along. 

I'll admit I was tempted not to mention the silly MOSFET issue out of pride and embarrassment but that goes against the spirit of this build log in documenting all the successes and failures of the project so in it went. And I'll again swallow my pride when I say the answer to all of your questions is no. Never had a course in control loop theory, never simulated what it's going to look like, first I've heard of poles and zeroes, and I don't have any open source examples I'm building off of. 

It sounds pretty bad when it's laid out like that, but don't underestimate a determined person with a burning desire to learn everything :devil:. 3 years ago I'd never touched a metal lathe, didn't know what a tolerance was and had never used a CAD program. It's my belief that anyone can learn anything with enough resources, research, practice and determination.

I do have what I believe is a (probably very basic) understanding of how boost circuits work and after 6 months of hard research I have a very clear picture in my head of how I want the circuit and code to look. I'm certainly not at the level of understanding and calculating poles and zeroes but that's only because until this point it hasn't been necessary. Should it become so then I will buckle down and attempt to learn it. 

As to your most recent post, I will bashfully admit that true current control measured at the LED is indeed the end goal. I know uC-controlled AA boost converters aren't a thing and there's probably good reason for that but I intend to make one and I'm looking forward to the challenge. If nothing else I always wear safety glasses so at least I won't lose an eye in the process and the last of my sanity left when the kid arrived so we don't need to worry about losing that either. :laughing:


----------



## Steve K

If it makes you feel any better, a electrical engineer with a bachelor's degree has learned a lot, but has only scratched the surface of what they might need to know. They have to keep learning while on the job and frequently learn things the hard way. By showing some of the mistakes that you've made, you've helped other folks understand that this is just part of the process. Running into a brick wall and having to stop and figure out what you did wrong is always going to happen. If you are lucky, you'll have some other folks to talk it over with who might help you learn and solve the problem.

Over 20 years ago, I bought a text on switching power supplies because I was interested in the subject. I've done some work with them over the years, but not as much as I would like. I've also worked with people who did nothing but switching power supplies, so I've gotten to see just how complicated a good design can be (especially in terms of control loop stability).

It's hard to say what you'll need to know next. To some degree, I recommend going to the semiconductor manufacturer's sites and browsing through their technical literature. www.ti.com , www.linear.com , www.analog.com ... these are all big companies that make a variety of products and have produced some excellent application notes and tutorials over the years. 

Linear Technology has a easy to browse list of application notes...
http://www.linear.com/designtools/app_notes.php
Check AN-25, especially the appendices, which are general purpose. This is one of the app notes written by Jim Williams, who was a smart guy who could write a great app note.

edit: I finally found some of the Analog Devices literature that is a tutorial on switching power supplies. They aren't a big supplier of switching power supply control chips, so it doesn't go into great depth, but it's a nicely done into to the technology and some of the issues of the components.
http://www.analog.com/library/analogDialogue/archives/43-09/EDCh 9 power.pdf
(end of edit)

edit2: I also found an interesting app note on control loop stability for switching power supplies. 
http://cds.linear.com/docs/en/application-note/AN149f.pdf
Not sure what it would take to include a microcontroller in that loop analysis.
(end of edit2)

edit3: Texas Instruments has a ton of useful info on switching power supplies (much of it from Unitrode, whom they acquired)...
http://www.ti.com/ww/en/power-training/login.shtml?keyMatch=control loop cookbook dixon&tisearch=Search-EN-Everything
You may have to register with the TI site to access this stuff, though....
(end of edit3)

Circuit simulation is a useful tool for trying things out, especially things that are hard to build in real life. Linear Technology offers a free version of Spice (Simulation Program with Integrated Circuit Emphasis, IIRC). It's a general purpose version. I use it some at work and have used it when debugging a problem on one of my bicycle light designs. You can find it at www.linear.com 

I wish I had some sort of guide for stabilizing a digital control loop. I've done analog control loops and had to improvise a bit here and there. When you debug your software and system, try running things open loop at first, just to make sure all of the electrical stuff works first. If the control loop isn't stable, it'll be hard enough figuring out what is going on without worrying about simple electronics.


----------



## more_vampires

Steve K said:


> Circuit simulation is a useful tool for trying things out, especially things that are hard to build in real life. Linear Technology offers a free version of Spice (Simulation Program with Integrated Circuit Emphasis, IIRC). It's a general purpose version. I use it some at work and have used it when debugging a problem on one of my bicycle light designs. You can find it at www.linear.com



There is also a prototyping board made by Xilinx. It has a software CAD aspect with simulation and a programmable controller combined with a breadboard for the hardware. There are many ways to interface it with a computer.

It never was perfect. Still, probably faster than prototyping with discrete logic chips. Pretty much only good for preliminary work.


----------



## calipsoii

Just a quick little update for now, more to come.

New PCB's arrived! oo:





As mentioned, I changed two major things (swung MOSFET around and swapped out boost chip) that required a complete redesign of the board. It's a much cleaner layout now but holy heck are there ever a lot of tiny 0402 components packed closely together on the underside! I had difficulties even with my finest soldering point getting them all on. For anyone who's never seen a 0402-sized SMT component, it fits comfortably on a single ridge of your thumprint. Looks like a big grain of sand. And these are packed in side-by-side to make them all fit on the 14mm diameter board.

I didn't snap any pictures of the soldering since you can refer to my previous post for that.

The great news is nothing smelled like burning. In fact, we have light! 





For now the LED is being powered off the tiny boost converter. That converter exists only to supply 3V to the microcontroller so it can take over and really get things going. As a result, the LED is only seeing 150ma.





The next step is to start writing the firmware. With the hefty inductor/FET combo on this board I'm confident we can squeeze more than 150ma into that emitter. :devil: Stay tuned!


----------



## gunga

Great job! Btw, we share the same soldering station.


----------



## Steve K

congrats on getting the LED to power up... that's always a reassuring experience. 

I've soldered 0402 parts manually, and it's just awful. Once those little things pop out of the tweezers, they are essentially gone. Are you avoiding the manual soldering operation by using solder paste and a solder mask?
edit... not solder mask... what's the name for the thin sheet of metal with holes that you use to effectively silk screen the solder paste onto the pads?? d'oh! <end of edit>


----------



## PointyOintment

Solder stencil. Also, OSH Stencils exists (though I'm pretty sure it's a separate company from OSH Park).


----------



## Steve K

PointyOintment said:


> Solder stencil. Also, OSH Stencils exists (though I'm pretty sure it's a separate company from OSH Park).



thanks for knocking my rusty brain back into gear. 
I've heard that you can get cheap stencils suitable for prototyping, made in plastic or something like it??... as opposed to the stainless steel stencils used when building boards in volume. 

Compared to the days of thru-hole boards, it is tougher/costlier to prototype stuff nowadays. It's cheaper to get multi-layer boards built, but the need to use solder paste, solder stencils, and tiny parts adds cost and difficulty. On the plus side, it's about the only way to get the tiny boards that some of these lights require.


----------



## calipsoii

*Back to the (Bread)Board*

When last we talked I'd just discovered Batch #1 of PCB's had the MOSFET on backwards ohgeez and the boost chip lacked output disconnect tired. Not to fear though! A quick redesign later and Batch #2 was off to the house of perfect, purple, prompt PCBs!

When they arrived a month later, things were looking good! The redesigned board is a lot neater.





And the new boost converter (actually my favorite old standby, a Linear Technologies chip) was happily boosting 1.5V to 3V.





It was time to crack open the IDE and start writing some code. I whipped up a very simple firmware, connected the programming clip and crossed my fingers. I always follow the same programming routine:

Connect the USB programmer to computer and board (success)
Power on the board (success)
Confirm the programmer sees the proper voltage (success)
Read the Device Signature off the chip shakehead)
 
The second I clicked "Read Device Signature", the status LED on the USB programmer went from green to blinking a quick red. 





Hmm, not good. Atmel's website confirms that blinking red means "Short circuit on target". They list a few possible causes, none of which are easy to troubleshoot because I had confidently committed my design to PCB before testing that it actually works. 

Enough's enough. Back to Digikey. Bought all the same parts but this time in giant fun-sized versions.

Each time these boxes arrive it's like Christmas morning as I dig into all the good stuff inside.





This is super cool! It's a little adapter set to turn your various surface mount components into DIP ones.





My boost converter ONLY comes in surface mount so this set was already worth the money.





The Attiny _can_ be purchased in DIP format, but what the heck, since I have all these adapter boards...





To mount the legs you just seat them on your breadboard and solder it all up.










As you can imagine, clicking the power button on this arrangement was a bit underwhelming. 





But with a few more (ok lots more) components, clicking the switch was a lot more satisfying.





Now that we've confirmed the boost converter is working it was time to confirm that this breadboarded circuit was behaving exactly as the PCB does. The USB programmer was snapped back on and the "Read Device Signature" button clicked.









Perfect. Same results. _Now _we can troubleshoot.

I spent some time playing with resistor values and moving components around with no success. The red light continued to blink. I started to wonder if my cable could be the issue, so I pulled the ATTiny off the breadboard and with it hovering in the air clicked "Read Device Signature".










Hmm, works fine. Definitely something on the board. The next step was to go through pin-by-pin and disconnect things. It took maybe 10 minutes to find the issue, and as with the MOSFET problem, I'm going to be perfectly honest with you - it was a silly error and I'm sharing it so others can learn.

PB3 is connected to ground via a 1uF off-time capacitor. I'm going to use it for mode switching. It didn't dawn on me that PB3 is _also_ the SCK (system clock) pin used by the USB programmer. With such a strong connection to 0V potential, the programmer was unable to get the clock pulses into the ATtiny and so yeah - technically the pin was short-circuited just like the status LED said. To test it I dropped a 10kΩ pull-down resistor between the pin and cap and confirmed the issue with the programmer stopped.

So in the end, Batch #2 of PCBs was perfectly fine save for a missing resistor. They can actually be used without issue by leaving the off-time capacitor off, programming the board, and attaching it afterwards.

Phew.

But that's not all! I have a video!


For the first 8 seconds, the LED and ATtiny are being powered by the tiny boost converter. You can see the perfectly flat 2.9V regulation. At 8 seconds though, a couple things happen:

The boost converter is turned off completely by pulling the SHDN pin low
The ATtiny starts switching the MOSFET gate at 500kHz with a ramping duty cycle

The second half of the video might not look like much but it's actually pretty exciting. It's a successful test of the 2nd part of the circuit - whether or not the microcontroller can power itself (and the LED) by taking over the role of the boost converter.

Funny/aggravating little thing I ran into: Did you notice that the voltage never dropped below 2.7V in the video? That's because I wasn't paying close enough attention and the MOSFET I ordered has a Vgs(th) of 2.75V. In layman's terms, you have to supply 2.7V to the MOSFET to make it switch, otherwise it doesn't do anything. The second you drop the target voltage below 2.7V, the switching stops and the microcontroller dies. They do make MOSFETS with a gate threshold as low as 1.75V but I simply bought the wrong one. :tired:

Another fun little tidbit: I couldn't resist cranking the duty cycle up a bit to see what kind of voltages we can get from a 1.5V cell. At around 3.5V I shut it off for fear of melting something. This new setup means we can put a _lot_ of current into the LED. :devil:

I'm going to order a new MOSFET and work on my firmware. Check back in a bit to see how this new-and-improved Spyglass driver is coming along!

>> Return to root post
>> Continue to next post in the series


----------



## gunga

Great reading!


----------



## mk2rocco

Great progress!


----------



## KuanR

Lovely and interesting update


----------



## andi15

Wow, very amazing! Thank you for sharing :twothumbs

Best regards,
Fritz


----------



## Steve K

nice write-up, and glad to see that progress is being made! 

I like the little adapter boards from T.I. I had no idea that they sold that sort of thing! So many of the cool parts are only offered in tiny SMD packages that aren't friendly to home projects otherwise.

I'm a bit surprised that the power supply section could be built up on the proto-board. Proto-boards aren't very suitable for anything involving speed (i.e. high frequency content) or power. If your traces aren't too buried, you could use your PCB's for the power portion of the circuit, and just run short jumpers over to the proto-board. Alternately, you could hack up a bit of copperclad board for the power stuff, which would keep impedances low and provide the capability to carry an amp or two.

On the subject of prototyping... EDN magazine has a blog that discusses a variety of prototyping methods, and has a link at the end to an article that goes into a project that used copperclad board extensively. Definitely food for thought!
http://www.edn.com/electronics-blogs/benchtalk/4440159/Prototyping-methods

Looking forward to the next installment in this story of discovery and conquest.


----------



## more_vampires

Riveting! Thanks!


----------



## tobrien

great update bud!


----------



## MRsDNF

This was really good reading not that I understand a lot of what is going on. l'm looking forward to the next installment.


----------



## calipsoii

Hi guys, seems about time for a quick update!

For starters, Steve K was correct - breadboarding a power supply only goes so far. I changed one component and the whole thing started behaving unpredictably. Ended up soldering everything onto a driver PCB and the issue went away so now I'm prototyping on a semi-finished driver board.

The last little bit has been spent playing with the firmware. Using the ATtiny directly as the switching source has opened up many options I didn't have before. Everything from the frequency to the duty cycle is adjustable and I've been having fun playing with all the variables and watching the results.

I've been working on a very simple 3-speed firmware and right now things are at a pretty sweet spot!

Results are using 1x Eneloop
Emitter is an Oslon Osram HCRI (this is important because it has a Vf of almost 3.2V)
Drive current is true current-control; no PWM is used in the output

Lowest LED drive current: *1 ma
*






Medium LED drive current: *118 ma
*





High LED drive current: *408 ma
*





The low is surely low enough to please the moonlight-lovers. :thumbsup:





For reference, the original Quark 1xAA drive levels on Cree XP-G (also a 3.2 Vf emitter) were:Low: 4 lumens for 48 hours (*10ma*)
Medium: 19 lumens for 6 hours (*50ma*)
High: 83 lumens for 90 minutes (*250ma*)
Max: 95 lumens for 57 minutes (*350ma*)​
So while I'm nowhere near the performance of the magical circuit Zebralight is using, this is still a pretty good! An XM-L2 would certainly boost numbers but my distaste for that emitter is no secret. :tired:

The firmware is still firmly in the proof-of-concept stage. There is significant work to do on mode switching, current feedback and adjustment, etc. But we're making good progress and I hope soon to be able to showcase a nice little 14mm AA boost driver for your consideration.

Happy Labor Day weekend all, more to come soon!


----------



## archimedes

Great update !!

Could you remind me of the approximate max drive current on the Spyglass Gen1 ... ?

Also, have you considered the XPL emitter ? I really like the Oslon, too, but XPL is available in nice tint bins (and CRI up to 90) and maybe could boost output somewhat ....


----------



## calipsoii

archimedes said:


> Could you remind me of the approximate max drive current on the Spyglass Gen1 ... ?



Highest I ever wrote down (might be a touch higher once assembled and resistance is lower) is 240ma.



archimedes said:


> Also, have you considered the XPL emitter ? I really like the Oslon, too, but XPL is available in nice tint bins (and CRI up to 90) and maybe could boost output somewhat ....



I needed something for testing and had this emitter laying around on an MCPCB.  Don't have any XP-L's but I've seen good things about the tint and output so once the firmware work is done I'll get my hands on a few and check it out. I _suspect _basically any other LED would have a higher current since these Osram's aren't super efficient. I plan to try an XP-G2 or something else soon to see how the emitter influences the circuit.


----------



## archimedes

calipsoii said:


> Highest I ever wrote down (might be a touch higher once assembled and resistance is lower) is 240ma.
> ....



So, a 2x higher "high" ... and a 20x lower "low" .... I like it :twothumbs


----------



## calipsoii

calipsoii said:


> I plan to try an XP-G2 or something else soon to see how the emitter influences the circuit.



LED drive current on Cree XP-G2 R3:Low: *2 ma*
Med: *140 ma*
High: *438 ma
*​
I'm going to try messing around with a slightly higher inductor value next. I can't quite hit the frequency I'd originally planned for so the circuit will likely get improved performance with a slightly larger coil. Check back in a couple weeks to see how that went.


----------



## gunga

Aaa ah! Can't wait. This looks promising.


----------



## calipsoii

calipsoii said:


> I'm going to try messing around with a slightly higher inductor value next.



After a bit of experimentation, this coil is fine. I can spend my (very) limited time trying to squeeze 10 extra lumens out of this circuit (that no one can see) or I can get crackin' on the firmware, so I'm doing the latter. The way I see it, Don's quite happy with 15, 45, 300ma in his AA converter and at the end of the day if you need more light than 350-400ma can provide you'll be reaching for a Malkoff and not a 1xAA light anyway. 

Long story short, I'm planning on a 300-350ma max drive for stability and runtime. I may include an option in the programming menu to drive the LED at the max current the circuit can deliver but at that point stability/runtime/etc cannot be guaranteed.

Enough about high modes though, let's talk about lows! In a rather exciting bit of news, I've got my test setup down to 85 µA drive current to the LED. I simply _cannot_ get a good picture but at 0.85 mA you can see the tiny bond wire dots in the phosphor. Did someone ask for a moonlight mode? :naughty:


----------



## gunga

Awesome! I think I need a spyglass. I find 0.2 lumens blinding at times, so this is perfect. 

Gunga the bat.


----------



## archimedes

Unregulated max drive option, in addition to regulated modes ... yes, please


----------



## tobrien

amazing work!


----------



## calipsoii

*Now I Know My ADC's


*_Who's in the mood for a boring technical update?!?!?! You there, in the back, with your hand up. Ya you! This is for you._ ​

I'm afraid this post won't have as many pictures as I normally try for. Not much to take pictures of unless you're into text editors. But hey, just in case you ARE into text editors...






I don't blame you if you don't find that very interesting. I'm about 1200 lines in I'm getting pretty tired of looking at it too. Most of it is comments though. And anyways: lines of code is a terrible performance metric. 

2 of 3 major milestones have been passed on this project so far:

The LED lit up when I connected the power
The microcontroller can act directly as a boost controller
Which leaves the 3rd milestone:

The microcontroller can read how much current is passing through the LED
That milestone was completed last weekend, meaning all 3 are now complete! Getting there was a bit of a challenge and the details might be interesting to some people so I'll share with you what I've learned.

----------

This is a stove. It's hot. You know that and I know that. But exactly _how _hot is it? (in Celsius/Fahrenheit/Kelvin/whatever)




(photo credit: http://mangez.blogspot.ca/2008/08/pavia-italy-shrimp-avocado-salad.html)

To find out, you'd measure it with something like this:




(photo credit: http://www.bedbathandbeyond.com/1/3/cooking-thermometer)

The thermometer takes a nebulous idea (it's hot) and turns it into a tangible measurement (500 degrees). It measures an analog value and generates an approximate decimal value. The thermometer isn't a perfect system - maybe the fire is actually 500.103940203593300493930230394930 degrees and the thermometer rounds it to 500.10. That's fine: it's a close approximation and it gives us a hard number to pin on our nebulous idea.

Now imagine you have a flashlight. It's bright and you know there's a lot of current running through the LED. But _how _much current? We can measure this using our own version of the thermometer, built from:

a sense resistor
an Analog-to-Digital Comparator (ADC)
This is the current-sensing part of my circuit.:





The squiggly line on the far right labeled R7 is the sense resistor. It has a value of 0.05Ω (ohms). The thing with the 8 legs in the top left is our ATtiny85 microcontroller. Pin 3 (PB4) on the microcontroller is the Analog-to-Digital Converter pin and it's connected to the sense resistor. Clear as mud, right? :laughing:

The *sense resistor* does exactly what its name implies - it allows us to sense things. It's connected just after the LED and just before Ground: if current travelling through the LED wants to get to GND (and it does!) then it has to go through the sense resistor first. The most important part about the sense resistor is that we know its exact resistance value (0.05 ohm).

The *analog-to-digital comparator (ADC) *does exactly what _its _name implies: it tries to convert an analog signal (fire: hot!) into a digital one (500 degrees). To do so it needs a few things:

a top reference
a bottom reference
a value to measure
Think of it like a pot of water. It can be empty, full, or somewhere in the middle. Let's say empty is our bottom reference. What is full? Well, maybe full is 6L. We know that because it's stamped on the pot. Now we fill it halfway with water and we know it's probably 3L because we know the top and bottom and we can look at the water level and gauge it to be half-way between both.

When setting up my ADC I chose GND (0V) as the bottom reference. The ATtiny conveniently has a couple voltage references built into it, so I selected 1.1V as the top. Now, so long as I supply something between 0V and 1.1V on Pin 3, the microcontroller will tell me approximately where in the middle my voltage lies. Awesome!

So where does the sense resistor come in? 

Ohm's law states that Voltage = Current * Resistance. Our sense resistor obeys that law! So if I pass a current through it, whether I like it or not, there is also a resistance and a voltage. If I know any 2 of the values, I can calculate the third! Let's try a sample calculation:voltage = 0.500 amp * 0.05 ohm
voltage = 0.025V​
Now let's rearrange the equation:current = voltage/resistance
current = 0.025 volts / 0.05 ohms
current = 0.5 amps​
Now here's where it all comes together: the ADC will read the *voltage* off the sense resistor and we already know the *resistance*. So what's the *current *going through the LED? You bet: I = V/R. Cool eh? 

Now let's get REALLY technical. You ready for this? Buckle up!

The ADC returns a value in the range 0-1023. 0 = bottom reference and 1023 = top reference. If top reference is 1.1V and you supply *0.67V* your ADC will return 623. You can then do the math:(623 * 1100mV) / 1024 = 669mV = *0.67V*​
Great! But let's supply some _MUCH_ smaller voltage values:(0.1mV*1024)/1100mV = 0.09 ADC value. Except we're on an 8-bit processor and floats aren't allowed, so the ADC drops everything after the decimal and returns 0.
(1.1mV*1024)/1100 = 1
(1.8mV*1024)/1100 = 1
(2.1mV*1024)/1100 = 1​
See the issue? We can pass in anything from 1.1mV to 2.1mV and the ADC will always spit out a value of 1. It's simply not granular enough to be able to tell the difference. So what's the big deal? Well, let's look at the difference 1mV can make on our current:I = V/R
I = 0.0011V / 0.05 ohm
I = 0.022A
I = *22ma* LED drive current

I = 0.0022V / 0.05 ohm
I = 0.044A
I = *44ma* LED drive current​
You see that? We doubled the current going through our LED (22mA -> 44mA) and our ADC couldn't tell the difference: it returned 1 every single time. Your eyes could definitely tell the difference though.

So I increased the sense resistor value from 0.05ohm to 0.2ohm. Using our same milliamps as above (22ma & 44ma) let's calculate the millivolts our ADC sees on Pin 3.V = I*R
V = 0.022 * 0.2
V = 0.0044
V = *4.4mV*​
V = 0.044 * 0.2
V = 0.0088
V = *8.8mV*​
Now let's plug those values into our ADC and see if it's still generating 1's constantly:(4.4mV * 1024)/1100 = *4*
(8.8mV * 1024)/1100 = *8*​
Ah HA! Now instead of getting 1 every time, we actually get different values! That's perfect! So why not always use a larger sense resistor? Well, size is one consideration... but probably the more important one is power. Keep in mind ALL the current through the LED must pass through this resistor on its way to Ground. So if you're pumping in half an amp then the resistor has to be able to handle that.

With our 0.05ohm resistor we were dissipating:V = 0.5*0.05 = 0.025V
P = 0.025V * 0.5A = *12.5*mW​
With our new 0.2 resistor we're dissipating:V = 0.5*0.2 = 0.1V
P = 0.1V * 0.5A = *50*mW​
A 400% increase in power usage! This is power that could be used by the LED and is instead being wasted as heat by a resistor. With a high enough current you'll also need to consider power ratings (1/8W, 1/4W, etc) so you don't burn out your resistor.


Phew! That was a lot of typing and you've done a lot of reading! Let's end it with a graph.





*Orange* is the computed amperage calculated using the ADC on my ATtiny.
*Blue* is the LED current read using a $600 Fluke multimeter.

Not half bad eh? :devil:

With all 3 major milestones met, I'm currently working on adding back all the functionality the v1 Spyglass driver had (programming menus, etc). I originally thought we'd lost the ability on this board to read battery voltage, but through a lucky break I now have a free pin and I plan to add that back in. I'm also writing a calibration subroutine that will account for not only the different Vf of various LED's (Cree vs. Nichia) but also the minor variations in a single line-up (N219).

All of this is shaping up into one really kick-a$$ driver. Stay tuned!

>> Return to root post
>> Continue to next post in the series


----------



## KuanR

I read through this but I still don't really understand lol....but it's a great update to progress you are making. Keep up the good work, I still want that #006 light to go with my lamplighter!


----------



## more_vampires

> The *analog-to-digital comparator (ADC) *does exactly what _its _name implies: it tries to convert an analog signal (fire: hot!) into a digital one (500 degrees). To do so it needs a few things:
> 
> 
> a top reference
> a bottom reference
> a value to measure


Calipsoii, you make me happy. 

You are a genius.

Please keep posting.


----------



## Steve K

always good to see an update to the thread! Another fine job of writing up the progress too! 

Little micros are really cool things, and I need to find time to play with them myself. 
Are you doing the coding in assembler, or are you using C or something like that? My experience was with assembler many years ago, and it was good for basic tasks and basic math. 
edit: oh. I forgot... your screen shot of your software editor (or development environment?) is clearly showing C or something similar.

My only software question is whether you are using interrupts... but the need to run the current measurement through the ADC seems like this is using a software loop. What is the loop time? To make it work as a controller for a switcher, the loop would have to be roughly 100 times faster than the switching frequency for the converter (at least that's how it seems to me).

My only hardware question: why is the RC filter designed with a corner frequency of 1600Hz? That seems like a very low frequency for a switcher that should be running at close to 100kHz or so. Granted, there are a lot of non-ideal little spikes and ringing in a switcher's voltages and currents, and these do make it hard to get a clean measurement of the current, but a 1600 Hz low pass filter is going to add quite a bit of lag to the current measurement. Got any scope shots to show what the voltage at the sense resistor looks like??


----------



## tobrien

genius


----------



## gunga

Wow. That tracks the fluke very well!


----------



## calipsoii

Hi guys!

Thanks for the comments! This was the last major unanswered question I had about this circuit (can it accurately read current?) and it's great to have it working. Each ADC is slightly different - some read low, some read high - so I'll have a way to gently tweak it and that should improve accuracy even further. As it is, we're usually within 10mA and I can live with that: it's closer than a lot of commercial lights get.

Steve, I'm always a bit humbled by your questions because I often don't know the answers so in this case I'll try the best I can. 

The control loop for this circuit isn't going to be an analog feedback system (with output being piped back into a pin through a voltage divider). I know what you're saying but that wasn't really one of the design goals - I don't want to recreate an existing integrated boost converter using giant discrete components.  Looking at the block diagrams for a few of my integrated boost IC's, I don't even have room on the 12mm board for everything those dedicated devices contain. 

I'm tempted to say (and I'm really hoping it's true) that in this application such precise and immediate feedback won't be required. Reading through the build logs of other individuals who've successfully built LED power converters, the general consensus was that when using a battery with a half-decent charge and powering an LED at a constant rate, voltage changes were slow and corrections could be done on the order of 10's to 100's of milliseconds if they were even needed at all. This seems to mesh with what I'm seeing during my testing: there's the expected thermal runaway as the LED heats up but otherwise with a constant duty cycle the current wobbles ~0.1ma every so often and that's it. 

That's partly why I don't have a great reason for the 1600Hz RC filter other than that I already had the parts laughing and I don't expect the voltage to swing wildly within 1ms. So far it's been ok and I've been testing with batteries of different chemistries and voltages. If it turns out I need a quicker filter the next boards will get different values for sure.

So yeah: a totally software-implemented control loop with all the latency you'd expect to come with that. The ADC will be polling at regular intervals and adjusting/skipping duty cycle if needed but otherwise just monitoring that nothing suddenly goes awry.


----------



## mk2rocco

I love reading these updates. I understand about 2% but enjoy hearing about the problem solving and progress made. I don't own a AA light yet, but this will definitely be my first (I'm in no hurry).


----------



## Steve K

hi Calipsoii... 
okay.. I understand now. This isn't controlling the converter on a cycle by cycle basis. It's just periodically checking to see if things are still going according to plan. 

Given that the load isn't changing significantly, and the power source should only change slowly, it's not a bad scheme. Since the big variable is the battery, do you do a check of the battery state of charge at power up? i.e. maybe go to a low duty cycle and check the voltage at the sense resistor, and then adjust the duty cycle to compensate?

I'm still curious about the software development aspect of the project... that's something I hope to play with myself.


----------



## calipsoii

Hi all!

Spent some of my free time this weekend working on the calibration subroutine. It was more work that I'd originally anticipated but I have a reliably working function now so that's a big deal! Means we can swap LED's to our heart's content and still be able to guarantee output currents despite differing LED forward voltages.

The calibration is _mostly _automatic - it can find the highest output on its own but it needs your help finding the lowest output. As you'll recall, the ADC can't read the really low milliamps so you have to use your eyes and tell it when to stop.

The high on 1x Eneloop is consistently 410-415mA. My star isn't heat-sinked so I can't tell you how long it can hold that output - I would imagine it will drop somewhat over time.

The low has been even FURTHER improved since my last post - I've consistently calibrated it down to 40 µA. At that point the phosphor changes from yellow to white but not much else. :devil:



Steve K said:


> Since the big variable is the battery, do you do a check of the battery state of charge at power up? i.e. maybe go to a low duty cycle and check the voltage at the sense resistor, and then adjust the duty cycle to compensate?



I'm 80% sure I've freed up a pin to connect directly to Vbatt which makes this easy. It was much harder when the incoming boosted voltage was the only one available. Fingers crossed it works out the way I plan.


----------



## gunga

That's the kind of moonlight mode I like.


----------



## PeterH

My impression is that microcontroller ADCs tend to be slow for driver a switching converter. So a common strategy is to use the ADC to adjust a much faster duty cycle output until the measured voltage is what you want. Which works well so long as neither supply voltage nor load are changing very quickly.


----------



## calipsoii

Hi all!

Daylight savings has me extra sleepy so just a quick update this evening. :tired:

As you can probably tell, making Lamplighters has very quickly consumed all of my precious free time leaving very little for this project. Once I've completed my current run of keychain lanterns I hope to turn my full attention back to this guy.  That's not to say nothing has been happening though! Two major advances have been made in the firmware over the last couple Sundays. 

*First*: I can now read down to sub-milliamp levels using only the ADC. Previously I couldn't read values below 8-12mA but I'm now reliably reading as low as 0.4mA. This is a pretty big deal as it pulls those moonlight lows back under the current regulation umbrella. Previously they were calibrated by hand & eye and they were linear - different battery voltages would cause differing brightnesses.

*Second*: I've finished a rough pass on an ADC calibration subroutine. Each microcontroller ships from the factory slightly different and this results in readings that can be +- 10%. This is a big deal at the lowest lows as it can mean the difference between 0.8 and 1.8 mA (a change your eye is definitely going to see). By running this calibration once for each microcontroller, all measurements are adjusted against a known-good multimeter and all future measurements will be far more accurate.

This was my very first test of the ADC before calibration. It's already an improvement because all data points (even the lowest ones) are being read by the microcontroller - no manual intervention required. You can see the drift of the ADC though - first it reads increasingly high, then it reads low.






After applying a couple calibration parameters (and changing to a fresh alkaline!) you can see we're very closely following the readings from the Fluke.





Long story short: these changes mean accurate and consistent output no matter the battery voltage or output. A good step in the right direction. 

Have a great night and I hope to have more interesting things to showcase to you soon!


----------



## mk2rocco

Absolutely love my Lamplighter, really looking forward to the Spyglass,


----------



## djozz

This is a great project, I just read this thread for the first time. Thanks for doing this, and for the extremely good and enjoyable documentation


----------



## calipsoii

Oh thanks for reading along djozz! I feel bad that I haven't been able to keep up a high momentum on this project but life is just crazy busy right now. The good news is that all the major hurdles have been crossed for v2 and I just need to clean up my code and put it through a thorough round of testing. Already forming a picture in my head of what the host for this driver is going to look like...


----------



## archimedes

calipsoii said:


> ....Already forming a picture in my head of what the host for this driver is going to look like...



I know that Ti is tough to turn at home, but if you are considering outsourcing the host to someone (like TnC for the Lamplighter) ... please do consider titanium [emoji317]

I would really really like a Ti Spyglass Mark II :shrug:


----------



## calipsoii

archimedes said:


> I know that Ti is tough to turn at home, but if you are considering outsourcing the host to someone (like TnC for the Lamplighter) ... please do consider titanium [emoji317]
> 
> I would really really like a Ti Spyglass Mark II :shrug:



I think that'd be pretty cool arch, I'll try to make it happen.  You know I'm hopelessly addicted to brass though, so at least _one_ of them needs to be that wonderful yellow metal. Quite a few steps to go before we're at that point so I'm just going to keep plodding along!


----------



## archimedes

calipsoii said:


> I think that'd be pretty cool arch, I'll try to make it happen.
> ....



 Cool !


----------



## DenBarrettSAR

Great work on this!


----------



## calipsoii

Hoo boy, gonna need to blow the dust off this thread soon. Time for a little update!

With all the Run #1 Lamplighters built I'm taking a few weeks break from that project and have switched my attention back to the 1.5V Project. Should probably do that more frequently since I don't even remember writing some of this firmware code... :duh2:

Been pounding away for a couple weeks on the current regulation subroutine. This is an important one to get correct since a current-regulated driver that can't regulate current belongs on the island of misfit toys.





So what of progress has been made so far?

1. *Driver now finds sub-milliamp drive levels all on its own*. A couple months ago you would have needed to run a calibration subroutine and manually tell the driver when it was low enough. That was also battery dependent so if you switched out a 1.2V Eneloop for a 1.6V L91 the calibration would need re-run. No longer! Microamp drive levels will now be found automatically at runtime no matter the input voltage.





2. *Automatic step-down at high drive levels.* If the driver detects that the cell can't sustain the target drive level it'll step down until it finds an output level that will stay in regulation. In this picture, the Eneloop has no problem maintaining the 325mA drive target but the alkaline can't do it and stepped down to 225mA. If you'd prefer to run your cells into the ground on a linear curve, auto step-down can be disabled in the programming menu. 





That's all for now! With Christmas break coming up I hope to find a few hours to clean up the firmware and finalize the feature set. Stay tuned!


----------



## mk2rocco

Great update!


----------



## Steve K

always nice to hear an update! 

The idea of having a "high output" mode that is adaptable to the power source is new to me. Seems like a good idea. It's certainly something that a microcontroller allows, but couldn't be done with a pure hardware approach. 

For the low output mode, is this the result of using the relatively slow current sensing as a slow feedback method for the mode? My vague memory was that the mode just used a nominal setting for the switching regulator? Or used the battery voltage as a rough way to adjust the nominal setting? Any chance you'll be publishing the flow chart soon? (only sort of kidding...) I've done just enough control loop design to know that it's easy to get in trouble if you don't really know where all of your poles and zeros are.


----------



## tobrien

nice work!


----------



## calipsoii

Well... fingers crossed... we're almost at the finish line!

The firmware is 92% written and 100% tested. Two small things to change and some cleanup to do and I'm ready to call it done. With all the extra duties the microcontroller is now responsible for, the code fills 86% of the memory (which is a lot). 2600+ lines of code and comments all told. If that sound exhausting, imagine typing and testing all of it! :green:

The hardware has been very slightly redesigned to add two more components (!!!!!!!) to an already jam-packed board. Still managed to squeeze it all into 14mm diameter. I have no idea how I'm going to solder them though... I darn near went blind last time. These changes should hopefully:

allow programming of the microcontroller without removing the off-time capacitor (it was junking up the System Clock line)
eliminate a very brief pre-flash at the lowest output levels
Order's been placed at OSHPark and now I just need to hurry up and wait. If all goes well this'll be a solid revision of the first design and I'm excited to start building lights around it.

Stay tuned!



Steve K said:


> Any chance you'll be publishing the flow chart soon? (only sort of kidding...)



Heh, while I've diligently shared all the details of this project on the build log, this is something I'll be keeping a little closer to my chest. I've invested several hundred hours now in writing and testing the firmware (and I don't have many free hours nowadays) so I hope you can understand the reasoning. It's probably not any kind of standard or true control loop and many would probably take issue with it, but it's been tested thoroughly and works well enough for me. It's a 14mm board and the Tiny85 is huge so absolutely everything in this project has been a compromise with size as the constraint.


----------



## mk2rocco

Can't wait to see the finished lights!


----------



## Steve K

calipsoii said:


> Well... fingers crossed... we're almost at the finish line! <...snip....>
> 
> Heh, while I've diligently shared all the details of this project on the build log, this is something I'll be keeping a little closer to my chest. I've invested several hundred hours now in writing and testing the firmware (and I don't have many free hours nowadays) so I hope you can understand the reasoning. It's probably not any kind of standard or true control loop and many would probably take issue with it, but it's been tested thoroughly and works well enough for me. It's a 14mm board and the Tiny85 is huge so absolutely everything in this project has been a compromise with size as the constraint.



Well, I had to ask. 

Perhaps, when you have a moment to review the whole development process, you could compile a short list of lessons learned that would be of interest to other hobbyists considering a similar project??

This is something we try to do at work, and hopefully develop a set of design & development guidelines that can be used by the next engineer starting a similar project.

Also... has anyone ever put together a list of preferred resources? This might consist of good parts suppliers, places to get technical advice, favorite software packages (CAD tools, uC development tools, etc), or anything else? or is this all in a sticky that I overlooked?


----------



## gunga

Hmmm. I will need to get one of these beauties. It sounds amazing and the work involved is astonishing.


----------



## Jason Liddell

calipsoii said:


> *Machining the Head & Body*
> 
> What?! Two updates in two days? I know, I'm as excited as you are. :naughty: When last we left off, I'd just completed the (overly-complicated) driver pill. Just a driver pill does not a torch make though!
> 
> My bandsaw is seriously scary sometimes. Push down too hard and it starts to shake violently... push down too lightly and it actually burns the metal. Exhibit A: 1" of slightly scorched brass.
> 
> 
> 
> 
> 
> By this point you've seen my filthy lathe bench 100x more than you ever wanted, so I'll just let the pictures do the talking. The head has been the simplest part to machine out of the entire project. It was downright pleasurable and the result looks great.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> With the threaded part done, I flipped it around and drilled out the lens window. I forgot to take shots of the drilling and beveling but you're not missing much. :laughing:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> And now, like an awesome movie montage, we jump straight to the good stuff!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The 3 parts fit together like a set of Matryoshka stacking dolls. O-rings keep the pocket lint (and hopefully water) out.
> 
> 
> 
> 
> 
> We're actually not _quite_ done with the head assembly. The reflectors I want to use are slightly (2mm) too wide to slide up into the head.
> 
> 
> 
> 
> 
> The idea was to build an expanding Delrin post which would hold the reflector in place so I could turn a few mm's off it with the lathe.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The post would then be drilled and split. A screw would force the post apart, providing a tension fit.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> That didn't work; the screw spun endlessly in the soft Delrin and the post was not forced apart. The post and screw still seemed like a sound idea, so I parted them off.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> THIS WAS A HORRIBLE IDEA. :duck: I don't know why I thought it would be ok to chuck up a dowel of soft wood in a metal lathe, but it cut horribly and made a _cloud _of sawdust.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> That said.... sometimes it's hard to argue with results.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Continuing my parade of ridiculous ideas, it was time to give the secondary LED a place to poke through. It was late in the day and I was tired, ok?
> 
> 
> 
> 
> 
> In the future I'll use a drill press or something more stable, but for the prototype, I was actually pretty happy with the results. I cleaned up the edges as best I could with an X-Acto knife, then tested a 3mm LED for fit. It's tough working directly on the reflector and not damaging the surface.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Alright, enough with the brains, time to work on something to hold the brawn. 3" of stock is actually too long for my little lathe setup. Working it was just horrible - squealing, vibration, the works.
> 
> 
> 
> 
> 
> I started with my smallest drills and slowly increased the diameters. This whole operation made a horrible ruckus - I'm sure my dog was pretty upset at the squealing.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I'll take some blame for the noise while boring the body out though - look how much boring bar is hanging out of the holder. :green:
> 
> 
> 
> 
> 
> Hmm, tools say we're getting close...
> 
> 
> 
> 
> 
> There is one way to find out, of course.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This is the head end. I learned something pretty important doing this part - even bottoming taps don't cut to the bottom of their hole. So the threads didn't fully form right down to the little ledge and the head wouldn't screw all the way down. I had to bore a good deal deeper and re-thread the hole to get the head to tighten all the way.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The workpiece gets flipped around and the tail is threaded for a McClicky switch. This particular tap is worth its weight in gold - the 11/16x20 thread is considered 'specialty' and they had to special-order it for me (for a couple hundred bucks ). I bored it a _bit _deeper than my plans called for after the adventures with the head.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> With the internals complete, it was time to think about machining the outside of the body. I couldn't do much with the steady rest in the way of the carriage, so I made a little Delrin plug for each end of the light.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Not a perfect solution, but the tailstock live center inserted into the Delrin plug provided enough stability to take a series of light cuts across the surface.
> 
> 
> 
> 
> 
> This would make for a very unnecessarily heavy flashlight body for only 1 little AA battery, so I marked out the taper points with a parting tool.
> 
> 
> 
> 
> 
> Taking great care not to nick the head/tail threads, the middle gets thinned out, dropping a few pounds in the process.
> 
> 
> 
> 
> 
> This is the first time I've used the compound slide since I got the lathe. I feel like the event could have used a glass of champagne or something!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The jaws left a few scratches on the head, so I flipped it around and shaved them off. The Delrin plugs proved mighty effective throughout the body machining. They also had another pleasant side effect: the body rings like a bell when you get it thin enough. Weirdest thing! I thought I was hearing things at first. But sure enough, the cutting tool rings the entire body and the Delrin plugs immediately suppress it.
> 
> 
> 
> 
> 
> Finally! The 4th and final piece of the prototype is complete and the whole thing is ready for assembly.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> But that's another post. I promise it'll have 100% less lathe pictures than this one. :twothumbs
> 
> >> Return to root post
> >> Continue to next post in the series


Wow, seriously amazing, just had a flood of images in my head from metal work on lathe when i was at school, oh so many moons ago.
after what I've read so far, I've never felt so drawn to build my own led torch. Just so impressive


----------



## calipsoii

After many months of agonizing and justifying and pining, the free-falling Canadian dollar has finally pushed me over the edge into an extremely helpful (if maybe not 100% necessary) purchase. :devil:






My first oscilloscope! For anyone not too sure what it is, it's a measuring device used to graphically display such data points as frequency, amplitude, etc. These are things that cannot be measured by a multimeter and cannot be viewed by the human eye so up until now they've been a big unknown in this project (and many others I've been playing with). Being able to visually measure and confirm that what I think is happening is ACTUALLY happening is a pretty huge deal.

The picture up on the screen is the waveform of the voltage being fed to the LED. Here's a screencap:





I've played with the settings a bit to really showcase the form so at first glance it appears pretty dramatic! When zoomed back out to a more reasonable level it's a lot flatter and not quite as interesting. The fantastic part is that this device can be connected all over the circuit to check for noise and stray signals and help troubleshoot that what I think is going on is actually happening.

Like I said, the driver managed to come together without owning a scope but now that I'm just tweaking and fine-tuning the code it's nice to finally have a way to peek under the hood into the inner workings. Expect to see more scope images in the future as development continues. 

Oh, I did mention the OSHPark boards are in the mail and should be here any day, right? More updates to come!


----------



## mk2rocco

Great news! More tools are a good thing!


----------



## DrafterDan

I enjoy seeing this come together!


----------



## Steve K

Congrats on the new purchase!

Scopes are great tools. If you are just working with DC voltages and currents, then a meter is sufficient. Once you get into linear or switching circuits, especially with feedback, then a scope is a lifesaver!

The low-cost digital scopes have really changed life for the hobbyist. About 15 years ago, I bought a good used 100MHz Tektronix scope. It is analog, so it's not doing anything other than showing me the waveform. It's been essential, though! The same is certainly true for your uC based switcher too.

Nice of you to post scope shots, but I'm scratching my head trying understand the details. For instance, the ringing usually results from the inductor running out of energy (i.e. "discontinuous mode"), and the last bit of current bounces back and forth between the inductor and the nearby capacitance. The fact that the voltage is low just before the inductor runs out of energy is confusing me... at least with a typical boost converter setup. Do you just have the LED wired as a flyback diode around the inductor? I may have to sketch this out.. I've seen some clever boost converter arrangements for driving LEDs, and I'm assuming that you are using one of them. 

The other thing that is not clear is whether the scope is calculating frequency correctly. It looks like the time scale is 2us/division, so the period is 10us. That would make the switching frequency 100kHz. However, the scope thinks that the frequency of something is 532kHz. For a waveform this complicated, the scope really doesn't stand a chance of calculating frequency... the ringing is about 3MHz, and there is some ringing at the falling edge of the waveform with some serious high frequency content too. If this light had wires attached to it, you'd have to worry about the FCC coming after you!


----------



## Thetasigma

Just found this project and have skimmed the pages, very cool indeed sir. With the LED, driver, and design I think you have a winner here.

Congrats on the new acquisition as well.


----------



## Crazyeddiethefirst

Congrats on the 'scope, excellent documentation-I just participated on a group buy on another forum (I am very Loyal to CPF, but it is always a good idea to keep a close eye on what else is going on). I wish a select complaining few people from the other forum could read this thread to understand what it takes to bring a project like this to fruition. Your ability to document not just the "what" that is happening but also the "why" is an excellent example of all the variables that must be considered. You remind me of a very talented physician going through a differential diagnosis on a critically ill patient suffering from an incredibly rare disease.(that was pretty obtuse-I meant it as a sincere compliment)...


----------



## calipsoii

Hi all!

First off, apologies for the slow reply. I read each and every one of your comments but I don't like replying until I have some free time to sit down and do it properly. I've been home taking care of our little guy for 2 weeks (and he was sick for a lot of it) so there's just been no time to make a post in this thread. I hope you can understand. 



Crazyeddiethefirst said:


> Congrats on the 'scope, excellent documentation-I just participated on a group buy on another forum (I am very Loyal to CPF, but it is always a good idea to keep a close eye on what else is going on). I wish a select complaining few people from the other forum could read this thread to understand what it takes to bring a project like this to fruition. Your ability to document not just the "what" that is happening but also the "why" is an excellent example of all the variables that must be considered. You remind me of a very talented physician going through a differential diagnosis on a critically ill patient suffering from an incredibly rare disease.(that was pretty obtuse-I meant it as a sincere compliment)...



What a wonderful post, thank you Crazyeddie. I know the pace is glacially slow for a lot of people (myself included!) but I like to think it's an accurate representation of how long it would take someone to teach themselves electronics and try to produce a product while also working a day job and taking care of kids.  We're very lucky to live in the age of instant gratification and same-day shipping and massive overseas factories but it's come at the cost of patience and I agree with you that it's sometimes not easy not to see the forest for the trees. Thanks for reading through the build log - it inspires me to keep up the documentation when people say they've read it. On this forum (and others) we've sort of lost the builders & the documenters, and I would argue a lot of the most interesting posts were lost with them, so I'm trying to do my part in keeping CPF interesting. 



Steve K said:


> Nice of you to post scope shots, but I'm scratching my head trying understand the details. For instance, the ringing usually results from the inductor running out of energy (i.e. "discontinuous mode"), and the last bit of current bounces back and forth between the inductor and the nearby capacitance. The fact that the voltage is low just before the inductor runs out of energy is confusing me... at least with a typical boost converter setup. Do you just have the LED wired as a flyback diode around the inductor? I may have to sketch this out.. I've seen some clever boost converter arrangements for driving LEDs, and I'm assuming that you are using one of them.
> 
> The other thing that is not clear is whether the scope is calculating frequency correctly. It looks like the time scale is 2us/division, so the period is 10us. That would make the switching frequency 100kHz. However, the scope thinks that the frequency of something is 532kHz. For a waveform this complicated, the scope really doesn't stand a chance of calculating frequency... the ringing is about 3MHz, and there is some ringing at the falling edge of the waveform with some serious high frequency content too. If this light had wires attached to it, you'd have to worry about the FCC coming after you!



I'm afraid I once again have to say 'I don't know' when it comes to some of these questions Steve. I would _hesitantly_ say the LED is probably acting as the flyback diode. There is no dedicated one and when I tried adding one the circuit stopped working so I removed it. I very much take a LEGO approach to my designs - I'll build a tiny portion of the circuit, confirm it's working as I need it to, then add something else and repeat. The entire design has been built up this way. The flyback diode wasn't needed (and had a negative effect) so I removed it and never looked back. You're right that the MOSFET is switched at ~125kHz (not 100% sure, thought I had it in comments but don't). The frequency field flickered rather unpredictably so I would say the scope is probably having a hard time figuring it out.

----------------

As mentioned, v2.2 drivers were sent off to OSHPark and I received them a week ago. Had the chance this weekend to build up 4 of them (with 2 different inductor values) and test out the new design!






The good news first:

*Off-time capacitor is working:* We now have the nice mode-switching based on how long the light is off (ala the McGizmo 3S engine). Hurray!
*Pre-flash has been eliminated:* The v2.1 driver suffered from a preflash similar to the original Quark lineup. Boost drivers in particular seem to suffer from it. I've reached a compromise in the circuit design where the preflash is seemingly gone but the circuit is a bit more fiddly as a result.

Ok, and a bit of bad news (of course):

*Microamp drive levels remain... fiddly*: The lowest moonlight lows (<0.5mA) require very careful calibration of the microcontroller or they don't work right. At 1mA+ things are fine but the very lowest drive levels are a tough nut. Each microcontroller must be individually calibrated so it's time-consuming and not 100% guaranteed to work the same in each driver. Honest truth: it's probably fine. My wife says it's fine. The brightness is too darn low to be useful anyways. But I tend to get hung up on the tiny things so this is still an area I'm tinkering with.
*Drive currents still top out at 350mA*: I had hopes that using a 2.2uH inductor would UNLEASH THE BEAST and we'd be seeing 500mA+ drive currents, but alas, 375 is the highest I got it and that wasn't all that stable. This thing wasn't designed to be a barn burner and it remains that way. 

My remaining steps are:

Get over the darn microamp thing already, it's fine.
Clean up the code in case in some distant future other eyes than mine are looking at it.
Hurry up and build the switch.
Get cracking in CAD and get this bad boy in my pocket!

I haven't done a proper project update in a while but I sense another one coming so stay tuned!


----------



## gunga

Looking forward to this. Sounds amazing!


----------



## garman

Wow! I'm just in awe about the electronics work in this project!

Keep up the good work!


----------



## mk2rocco

It's crazy! The coolest part is that this light will be 100% custom and hand made.


----------



## calipsoii

Hi all! 

I had hoped to post an update by now but it's been delayed as I crank away on a particularly tough problem. 

I won't lie: I was relieved to read that Steve/Yitsan's switch also has troubles with 1.2V Eneloops. I've spent almost 3 weeks now banging against the 1.2V barrier and making only tiny advances. I think we're finally getting somewhere though, wish me luck!


----------



## gunga

Good luck bro!!


----------



## mk2rocco

Goodluck!


----------



## Modder

nice project !!


----------



## Modder

nice project ! looking forward to the progress !


----------



## eh4

This is such a cool thread, I'll be a long time reading it. Thanks calipsoii for doing this, and presenting it so well, and thanks all for such interesting comments.


----------



## gunga

Not if I've mentioned it anywhere but I'll gladly pick up a Spyglass if they ever become available. It is just too cool.


----------



## AndyF

gunga said:


> Not if I've mentioned it anywhere but I'll gladly pick up a Spyglass if they ever become available. It is just too cool.



+1. It is a cool design.


----------



## calipsoii

Heh, thanks all. I actually _am_ still working on this project, despite the lack of updates. I don't know if people would rather read piecemeal updates or a single summarized one so I haven't been posting so far. Maybe you can let me know.

The e-switch I've been building is ~75% of the way there. The basic functionality is working - you can tap it to turn on and it'll stay on (soft-latching). You can tap it again to turn it back off. It runs on a capacitor so there is no coin cell needed. It functionally works from 0.8V -> 5V but below 1.5V it has issues with the MOSFET channel not opening completely which throttles the maximum current it will pass. A coin cell would fix that but I don't like the overhead & uncertainty of a switch that requires it's own battery. The capacitor will work so long as the primary battery is charged - a coin cell may suddenly not and I find that idea unacceptable. The design lends itself well to two switch models: a ~1.5V e-switch rated to 4.5A and a ~3.7V switch rated to 10-20A, so if I can get it working I plan to produce those two variants.

The driver circuit is 95% done. I need to remove one chunk of code but otherwise it works perfectly fine. I've been tempted to build a twisty light with the new circuit just so I have something to carry around but I don't find I use pocket twisty's; they're better as keychain lights for me. Once I figure out (or scrap) the switch I'll focus on what the new host will look like.

Cheers!


----------



## gunga

Oh sweet! A 1.5V eswitch would rock for me. I like Li-on but am very happy with eneloops in my lights too!


----------



## archimedes

Awesome update ! One of my favorite threads right here ... :goodjob:


----------



## calipsoii

I think after working on this e-switch project for over a month I'm going to take a break from it. I cannot get the circuit to work reliably on 1.2V (or depleted) cells. Works well enough on 1.5V+ but I like Eneloops too much. Perhaps I'll return to it in the future but for now it's not worth spending any more time on when mechanical switches like the McClicky work so darn well regardless of voltage (even if they are noisy and a little too big ).

Going to turn my attention back to some final driver refinements and then we're moving on to the host redesign.


----------



## archimedes

Thanks for the update ...  [emoji106]


----------



## phosphor22

This light looks amazing and I look forward to this one indeed - being able to use AA Eneloops makes the Spyglass ideal for me.
Thanks for including all the details regarding the build for all of us to follow.


----------



## calipsoii

Hmmm... how about a sneak peek of the first cuts on the Spyglass Mk.II host? :naughty:


----------



## archimedes

Yes ... :twothumbs


----------



## gunga

Woah!


----------



## magellan

Steve K said:


> Congrats on the new purchase!
> 
> Scopes are great tools. If you are just working with DC voltages and currents, then a meter is sufficient. Once you get into linear or switching circuits, especially with feedback, then a scope is a lifesaver!
> 
> The low-cost digital scopes have really changed life for the hobbyist. About 15 years ago, I bought a good used 100MHz Tektronix scope. It is analog, so it's not doing anything other than showing me the waveform. It's been essential, though! The same is certainly true for your uC based switcher too.
> 
> Nice of you to post scope shots, but I'm scratching my head trying understand the details. For instance, the ringing usually results from the inductor running out of energy (i.e. "discontinuous mode"), and the last bit of current bounces back and forth between the inductor and the nearby capacitance. The fact that the voltage is low just before the inductor runs out of energy is confusing me... at least with a typical boost converter setup. Do you just have the LED wired as a flyback diode around the inductor? I may have to sketch this out.. I've seen some clever boost converter arrangements for driving LEDs, and I'm assuming that you are using one of them.
> 
> The other thing that is not clear is whether the scope is calculating frequency correctly. It looks like the time scale is 2us/division, so the period is 10us. That would make the switching frequency 100kHz. However, the scope thinks that the frequency of something is 532kHz. For a waveform this complicated, the scope really doesn't stand a chance of calculating frequency... the ringing is about 3MHz, and there is some ringing at the falling edge of the waveform with some serious high frequency content too. If this light had wires attached to it, you'd have to worry about the FCC coming after you!



I have fond memories of working with the old Tektronix scopes in past decades back in the late 60s and early 70s when they were still pretty big units. Fun stuff.


----------



## calipsoii

archimedes said:


> Yes ... :twothumbs



It's only 6061AL arch, you know I can't turn _other stuff_ on my wee lathe.


----------



## archimedes

calipsoii said:


> It's only 6061AL arch, you know I can't turn _other stuff_ on my wee lathe.


You mean ... it's a 6061Al *prototype*? Before, ya know, making a version from "other stuff"


----------



## Steve K

calipsoii said:


> It's only 6061AL arch, you know I can't turn _other stuff_ on my wee lathe.



while I'm a bit envious of those with proper metalworking equipment, I have to wonder if the evolving 3D printers can replace some of that equipment? Have you ever looked into it? Friends at work used them to prototype non-metallic parts, but I seem to recall some mention of printers that can do metal. 

One of the things on my "to do" list is to look into whatever "maker" groups are in my area and see what sort of fabrication/prototype tools they have.


----------



## Thetasigma

Steve K said:


> while I'm a bit envious of those with proper metalworking equipment, I have to wonder if the evolving 3D printers can replace some of that equipment? Have you ever looked into it? Friends at work used them to prototype non-metallic parts, but I seem to recall some mention of printers that can do metal.
> 
> One of the things on my "to do" list is to look into whatever "maker" groups are in my area and see what sort of fabrication/prototype tools they have.



Metal printing is pretty sweet, but quite rough like a casting. So you'd print a body oversized then machine the surfaces to a precision surface of the correct dimensions.
The question I have is whether the printing time and cost would negate any benefit over just starting from rod stock. Not to mention I don't think there is a metal printer under 10k yet, so cheaper to acquire a decent lathe which you would need anyway.


For the prototype you could try 7075 aluminum, 6061 seems to be a bit soft, and they cut about the same.


----------



## calipsoii

Steve K said:


> while I'm a bit envious of those with proper metalworking equipment, I have to wonder if the evolving 3D printers can replace some of that equipment? Have you ever looked into it? Friends at work used them to prototype non-metallic parts, but I seem to recall some mention of printers that can do metal.



We have a 3D metal printer at work. It's used for rapid prototyping but really at the "proof-of-concept" level. Shapeways has been steadily expanding their metal printing options but if you take a look at their aluminum page, Thetasigma is right - the surface finish is rough and the result looks like it's been cast. I'd be worried about things like threads that need to glide smoothly. Tofty was also experimenting with 3D-printed trit fobs a while ago.



archimedes said:


> You mean ... it's a 6061Al *prototype*? Before, ya know, making a version from "other stuff"



:devil:



Thetasigma said:


> For the prototype you could try 7075 aluminum, 6061 seems to be a bit soft, and they cut about the same.


No 7075 at my local store! 6061 should be fine though - I only want it for it's color anyways. Truly the best investment was buying a set of aluminum cutting inserts with the razor sharp edges. Holy geez what a wonderful experience after trying to hack away at the stuff with a 0° rake HSS insert and a 3/32 radius.


----------



## Steve K

thanks for the info on the 3D printing with metal! Sounds like it's definitely useful under the right circumstances, and certainly has capabilities that my "machine shop" (i.e. hacksaw, drill, and files) does not. 

I don't have any projects in mind right now, but Shapeways might be handy... and probably competitive with going to a local metal shop to have something fab'ed, I assume.


----------



## Thetasigma

Similar to printing plastic, only so much resolution available at the current time. Casting is sort of the original 3D printing technique in a sense, and cast parts are often done like I described, general shape in cast, then machine critical surfaces. Lathes are another example, with a cast body and ground ways.

Not sure what shapeways would run cost-wise, but if it was worthwhile you could design the light in CAD oversized depending on their dimensional tolerance, have the parts made and sand blasted, then mount them in your lathe and turn the bore smooth and thread the parts yourself. Could even leave the outside rough for grip and increased surface area for cooling. Would certainly make for a neat approach.


----------



## calipsoii

Only like 6 more pieces to go!


----------



## Ladd

It's always fun to return to this long running thread to see what's up. Starting to feel like an old friend.


----------



## FroggyTaco

Subscribed & sad I missed it until now!


----------



## calipsoii

Hmm, that driver pill is missing something........... right, a driver!

Luckily, these two just happen to be hot off the soldering and programming stations! :laughing:


----------



## calipsoii

Let's keep the mini-updates flowing with a few pics of tonight's workload.

The lines on the brass are very fine 32TPI threads. It's getting drilled, bored and then sliced into...





... driver retaining rings!





Fit is nice and snug. They screw down further but without some tweezer holes I might not be able to get this one back out.





We're makin' good progress now - stay tuned!


----------



## gunga

I'm all in for one.


----------



## archimedes

Hope I'm on the list, too ....


----------



## FroggyTaco

So wait... This is more than a personal display of wonderfully obsessive attention to detail. There may be examples for others to enjoy?


----------



## mk2rocco

I get excited every time I see activity here [emoji4] 

Keep up the good work!


----------



## phosphor22

Wow it looks great; hope as well that I am on the list for this - I enjoy 'tuning in' regularly to see what is happening...
Love the AA factor.


----------



## archimedes

FroggyTaco said:


> So wait... This is more than a personal display of wonderfully obsessive attention to detail. There may be examples for others to enjoy?


Yes, I have a Spyglass Gen1 ....


----------



## calipsoii

FroggyTaco said:


> So wait... This is more than a personal display of wonderfully obsessive attention to detail. There may be examples for others to enjoy?



It takes a _really _long time to build a light from scratch out of metal and Digikey components. I learned this quite quickly with the Mk.I lights. I expect fully handmade Mk.II lights will remain a rather rare/bespoke item. Let's see how the prototype turns out first and then we can look at things like what's involved in putting together a small run.


----------



## calipsoii

I shot a few test videos while making pills and this one turned out alright! If short video clips are something you guys would want to see more of let me know and I'll set the video camera up once in a while.


----------



## gunga

This is very cool.


----------



## calipsoii

Thanks gunga! I switched to Delrin this evening. It makes these big, soft, beautiful piles of chips that cling to everything.


----------



## gunga

Ha! I wish I could do work like you. It's super cool.


----------



## Thetasigma

calipsoii said:


> Thanks gunga! I switched to Delrin this evening. It makes these big, soft, beautiful piles of chips that cling to everything.



Delrin is cool stuff, makes rather decorative chips depending on the operation.


----------



## calipsoii

*Machining the (Gen. 2) Driver Pill*

Hooooooo boy it's been a long time since I did a proper build post in this thread. Let's cover what's happened since the last post about the ADC:


The driver hardware design is done. It works well and everything still fits on the 14mm PCB.
The driver firmware is written and tested. Aside from 2 quick tweaks, I'd be more than happy to program a light with it and use it.
The drawings have been completed for the Gen. 2 redesign.
So, what we need now is a host to put all this good stuff in! The most complicated (and important) piece is probably the driver pill so naturally it made sense to start there.

For the Gen. 2 redesign I've decided to stray away from my beloved brass (GASP! ) and make the driver pill out of 6061 aluminum. While brass likes a flat & dull cutting tool, aluminum loves a razor-sharp and highly-angled tool. I picked up a couple new alu inserts and MY GOODNESS are they a blast to use! Leave a wonderful surface finish too!





Next up: the o-ring grooves and the threads. For this revision I'm using a finer 28 pitch thread (up from 20TPI on the Gen. 1).















With the external work done, we can focus on the internals, starting with some drilling.










This little tool is called a telescopic bore gauge. It has two spring-loaded arms that hold their position once inside a hole, allowing you to then measure the gauge with a micrometer. Tools such as these are called "transfer measurement" tools since they don't _directly_ measure something, but instead allow you to use a measurement tool that wouldn't normally fit.










Now it's time to widen the hole and flatten the bottom with our boring bar.





We're going to be holding the driver boards in with a threaded retaining ring, so just inside the bore we set things up to be threaded.





This is a test jig I whipped up to ensure the threads we cut work properly on each driver pill. In this case it screws in just as it should.










We're done our internal work so it's time to part off the workpiece!





The parting operation left an ugly little sprue so we chuck the part up backwards and turn down the face.










That's it for lathe operations on the driver pill! All she needs now is some holes for the LED wires.





A few minutes on the mill and the wire holes are drilled out (nice and large to accommodate different wire gauges and MCPCB patterns).





We're done! And it looks great!





But...... we're not done with the driver assembly yet! The driver has TWO boards: the converter and a battery contact board. These two boards must sit the correct distance apart so nothing gets crushed. Whatever holds them apart must not accidentally cause a short. Luckily I still have a couple huge bars of the perfect material for the job - Delrin!





What do I love about Delrin? You can cut pretty much as deep as you want and the lathe doesn't blink. Plus it makes a big, gorgeous waterfall of chips!










If you look carefully at the second pic you can see the drill through the sidewalls. This was a stupid idea but honestly I didn't feel like trying to bore a workpiece that long.















With our plastic straw complete, it was time to slice it into little rings. Lots of them!










We need to be able to pass wires through these rings during final installation, so into the mill they go for slotting.





All done!





Phew! So we're done with the driver pill now, right? Nope, of course not! 

I just can't resist throwing a bit of brass into the mix devil so some round-bar gets some very fine threads turned onto it and the center gets drilled.





Using a fine blade, tiny threaded rings are parted off.





Using a transfer punch, tiny holes are carefully marked into the retaining rings. It's critical they fall right in the middle of each ring.















The little punch hole guides the tiny 1/32" drill bit straight and true. If we're lucky it goes straight and doesn't wander into our threads or out into the middle of the ring. Nerve-wracking!





Phew! A couple close calls but all the rings survive unscathed. 





And now the most exciting part: testing out the fit. Perfect!





You still with me? Good stuff! I'm happy to say we're all done the machining needed for the driver pill. Just need to sandwich some electronics in there and top it all with an LED and we're off to the races.

We have a few more pieces to make before we can call this a flashlight, so stay tuned!

>> Return to root post
>> Continue to next post in the series


----------



## FroggyTaco

Holy Smokes that seems like a LOT of work!


----------



## Ladd

Another great update. thanks for sharing!


----------



## mk2rocco

Alway love reading these updates.


----------



## archimedes

Huge update, great to see ongoing progress, my friend


----------



## KuanR

Excellent update, I hope you remember I have lamp lighter 006 and it needs a matching light in brass!


----------



## phosphor22

I enjoyed following the detailed images - the build log story is building anticipation exponentially!


----------



## calipsoii

*Machining the Gen. 2 Head*

While the baby sleeps let's sneak in another build post, shall we? :sleepy:

Next up - the head of the light! I quite like the aesthetics of the Gen. 1, so not much has changed for the Gen. 2 head. Different thread pitch and a slightly different knurl and that's about it.

We start (as always) with a big chunk of metal. But what's this?! That doesn't look like brass!





Still sticking with the copper alloys, I'm building out the Gen. 2 prototype in 660 bearing bronze. Falling between brass and copper in color, it's a glowing light red with vague hints of purple. It patinas really nicely as well, with dark valleys and polished highlights. Much nicer than brass (which looks kind of ruddy after a while) and copper (which I've never gotten the love for - it looks like old water pipes).





All that said, it's just the WORST to machine (except for perhaps cast iron?). Tiny little chips bordering on dust that are highly abrasive and damn near impossible to clean up. What a mess!





Now it's time to pop the knurling scissors on there and add some diamonds.










I was very lucky this time and the knurls came out clean and clear. I have several other pieces of bronze with ugly misshapen knurls pressed into them. One of my least favorite operations for sure but I just love the results too much when it works out.





After cleaning up the edges of the knurl band it's time to mark out the total length.





The drill bit gets marked and we start drilling out the center. What an enormous pile of swarf eh?















A bit of boring and we're ready for threads. A quick scratch pass first to ensure everything is ok and then the threads can be cut to full depth.










After cleaning the chips off the threads as best I can, it was time for a quick test fit of the driver pill.





After knocking off the sharp edges and cutting the o-ring landing we're ready to separate the part from the bar stock.










The walls are _incredibly_ thin, so when the workpiece gets chucked up backwards the jaws are hardly tightened at all. Makes the final operations nerve-wracking since the lathe barely has a grip on the part.





This is a countersink bit - it puts a nice bevel inside a hole. With so much surface area (6 flutes) touching the workpiece, the friction is high. I had issues with this step since the workpiece kept wanting to move around in the loose chuck jaws. 





We're all done! The head gets popped into a soapy bath and a toothbrush is used to remove the swarf.





Lots of work for something seemingly so simple. 





Thanks for reading along all; I love the comments and will continue to put out pictures and words so you can follow along on this crazy endeavour.

Until next part!

>> Return to root post
>> Continue to next post in the series


----------



## mk2rocco

Beautiful work!


----------



## gunga

Incredible update. I love the details. I also need a gen 2 light.


----------



## archimedes

Photo of the Spyglass Gen1 ...







... and wanting a Gen2


----------



## Ladd

What a great thread. The commentary is engaging and the pictures are stunning.
@archimedes: Man, that's a work of art. 
Do I hear the siren song of a Gen 2?


----------



## archimedes

Thanks @Ladd ... was trying to get a bit creative.

I'll post another, but just to be clear, *the colors are edited* ...






... since I wanted to see what one of these might look like in titanium [emoji14]

Maybe it will inspire someone, huh, @calipsoii ?


----------



## calipsoii

Workin' on it! Need to finish the prototype first to confirm all the changes are ok. All the o-rings have been changed, the threads, the switch assembly, the clip, the driver - this is all stuff that needs pocket-tested before I can say the design is good.

Need to spend an evening practicing my knurls first. Picked up some new scissors that work wonderfully (when they work) but I have a couple hundred bucks of bronze with crappy knurls sitting in my scrap pile waiting to be turned into pill canisters and spinning tops. It's a surprisingly hard thing to get right and you only get one shot - once the material is turned to size, if they come out crappy there's no re-doing it.

Hang tight, working as quickly as I'm able.


----------



## calipsoii

*Machining the Gen. 2 Tailcap*

Wait, what?! A _tailcap_?! Indeed, friends. For the Gen. 2 we're ditching the unibody construction and adding a separate tailcap. There are a couple of good reasons:

Improving the waterproofing at the rubber boot.
Improving the waterproofing by removing the old clip screw.
The new clip will fit between the tail & body, meaning it can be added or swapped easily and without tools.
There are some negatives to this change though:

Many more machining operations required.
An additional o-ring must be added between tail & body.
The distinctive wire clip is probably not an option anymore (we'll see about this one. I really like that clip, maybe something can be done).
I think on the whole it's a good plan and I intend to build a prototype with one. So let's get started! I'm going to spare you as many repeat images as I can. If you really want to see drilling & boring shots please refer to the previous post. 

I spent a good amount of time practicing my knurls before attempting this one. I've already scrapped many hundreds of dollars because the diamonds didn't turn out. Fingers crossed that I have the technique down pat!





The pass has been made and I see diamonds, but they look kind of rough. This could be because of all the swarf that's been generated. Unlike steel, which deforms rather neatly under the intense pressure of the wheels, copper alloys crumble and flake off. All this crumbled metal then gets pressed back into the workpiece on the next rotation, creating a really poor appearance. A heavy flood of cutting fluid helps prevent the issue.





After wiping off the cutting fluid and swarf, things are looking much better for our workpiece.





Clean things up by shaving the tops and beveling the sides and we're really starting to look sharp!





There's a lot of internal work to be done; several different internal diameters plus a couple grooves. Hard to capture all the time spent making the inside of this thing hollow.





This little guy should be familiar to most of you - a McClicky switch. It's going to be called into action right away here as I start cutting the 11/16-20 threads.





Not bad!





With the internal work done, we can flip the piece around and start cutting a bevel for your finger to sit in as you press the button. This is a tough one to judge because the rubber needs room to deform and your finger needs room to fit. Only testing will tell if this design is pleasant or annoying to use.





And we're done! So quick eh?! The pictures go by quickly but it took 3.5 hours in front of the lathe to get to this point. Time-consuming, detailed work this is.





Ah heck, how about an obligatory glamour shot now that we've cleaned it all up with some soap and a toothbrush? 





We're not done until we test-fit a boot and switch in there! The clicking action is nice and clean and there seems to be enough room for my finger. Will need to get it mounted on a body to really tell but things look good so far!





And of course it tail-stands. 





We're making good progress now! Check back again later as I save the largest and hardest piece for last: the body. Then we'll finally see how all these pieces fit together.

>> Return to root post
>> Continue to next post in the series


----------



## Ladd

Check back later? You can count on it!

That's one awesome tailcap, sir!


----------



## archimedes

Can't wait to see the next stage ....


----------



## gunga

Drool worthy.


----------



## mk2rocco

Another excellent update!


----------



## MRsDNF

Looking real good so far.


----------



## phosphor22

Fine visuals, again! Love the updates and seeing the process


----------



## erehwyrevekool

Congrats :goodjob: I like shaved knurling much more than the aggressive one


----------



## Zandar

I can't believe I've missed so many updates! What happened to my instant email notifications? This project keeps getting more and more exciting. Now I really want a gen 2 light but in the interim I think a lamplighter will do!


----------



## calipsoii

*Machining the Gen. 2 Body*

Oh boy was this ever a lot of work! I _started_ machining 5 bodies and _finished_ with 2 usable ones. Let it never be said that owning a lathe makes things cheap. Time, materials and sanity are all resources with a cost. :duh2: 

We start (as we always do) with a chunk of metal. This time there's a lot hanging out of the chuck!





I was feeling wild & crazy for this workpiece so decided to break out the Steel Blue. It's a quick-drying metal dye (also called a layout fluid) that forms an ultra-thin layer that you can scratch to mark your workpiece. It shipped in 3 nested Ziploc bags with a large warning sticker on each and displays warnings on the front, top, and bottom of the bottle. My machine shop instructor only ever said one thing about it: "Love that smell but I guess it gives you cancer or something".





If you buy a half-decent set of calipers, the majority of the body will be made of steel but the tips will be made of carbide (a hard-wearing ceramic). This lets you use them to lightly scratch marks in things... like layout fluid!










Using the scratch lines as start/end points, I cut a little pocket in the middle of the bar stock. The blue dye looks quite striking against the bronze - I wish there was a way to incorporate that into the finished light.





The pocket is _just _wide enough to slip the toolholder into so that I can cut out the remaining body material.





After taking a few passes, the mid-section of the light is looking much slimmer. This drops a lot of weight so that the end result doesn't pull your pants down.





Time for my least-favorite operation of all! *bites nails*





They might look ok at first glance but there's actually quite a lot wrong with these knurls. Just between you and me, after knurling the 5th body I was damn near ready to quit out of frustration. Bronze is exceedingly flaky and my knurling scissors have been abused so much that they're no longer sharp. Those two factors resulted in a lot of really poor looking knurls. I'm 95% of the way to convincing myself to drop the big cash (and I do mean big: at $1200+ they're not an impulse buy) and pick up some cut knurlers. Those beauties are used by the likes of wquiles and Fred Pilon to create the nice diamonds you always see on their custom titanium pieces. Instead of simply smashing the metal together they actually cut it away, which means soft metals like bronze are no problem. We'll see.





The next picture showcases a few different operations: shaving down the knurls, adding the 45° bevels to each side, and cutting the form for the tail. You can start to see the body shape now.





Our little guy gets up at 05:45, I work 8-10 hours, spend 3 hours putting him back to bed and _then _it's out to the garage. I'm pretty good about recognizing when I'm too tired to be running the lathe but occasionally I'll slip up and do things like bump my finger against the chuck jaws while they're spinning at 1100 RPM.





The tailcap end gets threaded 11/16-20. The same pitch as a McClicky switch. Coincidence? :thinking:





One of the core tenets of machining is "keep your tool lengths as short as possible to reduce vibration and prevent chattering". I don't think letting my tiny boring hang out 2.5" would pass with any kind of approval from any half-sane machinist. A good choice would have been a properly sized drill followed by a properly sized reamer. But... this is what I had on hand so... let 'er rip!





Someone once told me if you absolutely must make a high vibration cut, you can press a block of wood against your cutting tool to dampen vibration. So I did that with my ridiculous boring bar and it worked, leaving a nice smooth finish all the way down the bore. 





But does it fit a battery?










Not much more can be done at this point except part off the workpiece. The head end isn't nearly as pretty as the tail.





In between frustrated knurling sessions I tidied up the workshop a bit. Here's where all the magic happens folks. :twothumbs





Once the body was parted off I was left with the fundamental issue of how to clean up the other end. It obviously needed to be re-mounted in the chuck, but with the middle section gone it would no longer fit in the jaws. The solution was to create a soft Delrin collet. The collet would carefully cradle the workpiece while greatly enlarging the diameter, giving the jaws something to hold onto.

























Perfect! Nice and soft with a large diameter to grab on to!





My lathe has 2 sets of chucks: a 3-jaw and a 4-jaw. The 3-jaw chuck is kind of a 'cheater' chuck because you just stick the medal in it and tighten down and all the jaws move simultaneously. The problem with the 3-jaw chuck on an import lathe like mine is that it doesn't spin perfectly true. This is called 'runout' and you can see it as a slight wobble in the metal. It's no big deal if your workpiece spends its entire life chucked up - everything spins around one axis and turns out fine. It IS a problem if you ever remove your workpiece and try to put it back in. Now your partially-finished workpiece is wobbling and your cuts aren't true. In a 4-jaw chuck, each jaw is tightened individually. This gives you fine control over the workpiece but it's a pain in the rear getting things dialed in. For our workpiece, the 4-jaw chuck is now necessary so I pull the old one off to put the new one on.





Here's the workpiece sitting in the 4 jaws. You can see how the 2 slits in the collet fit nicely between the jaws allowing an even grip.





We need to get this thing perfectly center before we work on it. This little tool is called a dial indicator. Wobble in the workpiece causes the hand on the face to move. It's then a matter of tightening the jaws until the wobble disappears.





After 4-5 minutes of adjustments, things are looking pretty darn good!





If it weren't centered properly you would see it here in the wall thickness - one side would be thick and the other thin. Not something we want!





We're working in such a tight space that my standard threading tool won't even fit without destroying things. Since the threads aren't very deep I can switch to this tiny little threading tool bought specifically for this task.





Hey that looks pretty good! The ledge at the bottom gives the head something to tighten down onto for a nice, positive feel. 





Of course we need to make sure the driver pill actually threads in there.





There are sharp edges _galore_ so we start adding countersinks and bevels all over the place. Can't have any sliced fingers or nicked batteries!





Almost done! The knurls are full of flakes and the threads full of swarf so its into the soap bath for this workpiece.





You know, I think this'll work. 





I'm still waiting on o-rings and switch boots (c'mon FastTech, hurry up!) so no final assembly shots until those get here. At that point I'll know whether all the joints are waterproof and the machining correct. That's ok though, gives me some time to flash the drivers and make sure I'm happy with the firmware. You guys'll stop back to see everything put together, right? :devil:

>> Return to root post
>> Continue to next post in the series


----------



## archimedes

Looking good ....


----------



## FroggyTaco

Such an enlightening experience to see what goes into a single flashlight design.


----------



## mk2rocco

Fantastic update! Always an interesting read.


----------



## phosphor22

Yep I will indeed check back! - this is looking fabulous.


----------



## KuanR

Excellent update!


----------



## shrike2222

Good!
:twothumbs


----------



## calipsoii

Hey all! 

You may have been wondering if I'd disappeared on you. _You are not so lucky. _:devil:

The 1.5V Project is still trudging along. The biggest news is that my o-rings from "Fast"Tech still haven't arrived despite ordering them almost 2 months ago. This isn't awesome because our national postal service is now 72-hours from a lockout and then they're _definitely _not going to show up. My local supplier didn't have any in the right size but perhaps something close enough can be found...

The good news is that all the things I _can't_ buy locally have arrived:

McClicky switches
Rubber switch boots
Sinkpad DTP MCPCB's
N219B 92CRI LED's







While waiting on the o-rings I've been putting the finishing touches on the firmware. At 3,300 lines of code I've finally run into the dreaded "no more memory on microcontroller" so any new features are out of the question and some old ones need the fat trimmed.

A bit of sad news on the firmware front: microamp drive levels just aren't going to happen (at least in this revision). I've literally been working on this problem since Christmas and it's time to call it. All that really means is that the lowest I can get the converter to reliably hit is 1 mA drive current (I had been trying for 0.5 mA). Similar to the e-switch project though, it's time to recognize when things aren't working and call it quits. Side-by-side you could tell 0.5mA from 1mA but both are really bloody low and it's more a matter of pride & bragging rights rather than a functional requirement of the driver.

As an aside, I don't have an integrating sphere but N219B's are rated 106 LED lumens @ 350mA and their output curve is _nearly _linear so I'd be tempted to say 1mA gives off about 0.5lm at the LED. No way to confirm that but it seems pretty accurate to my eyes. Should be plenty low for most.

Hopefully good news about o-rings soon so check back once in a while.


----------



## Ladd

Your text always brings a smile. Thanks for sharing the progress!


----------



## archimedes

I'm ok with moonlight, but no firefly modes


----------



## mk2rocco

Thanks for the update! I'm anyway excited to see what's going on here


----------



## gunga

Still totally excited. I thought you were going oslon?


----------



## phosphor22

This continues to look _fabulous_ and I appreciate learning the intricacies of both the making and the thinking processes.


----------



## Thetasigma

Looking good, if you need o-ring, a good hardware store should have a thorough selection of EPDM ones in the plumbing section. You'll probably want the 1/16" thick ones at most.


----------



## Zandar

An excellent progress report, I'm very much looking forward to getting one of your master pieces!


----------



## calipsoii

archimedes said:


> I'm ok with moonlight, but no firefly modes



Thanks arch! I think 1 mA will be sufficient for most people's needs. The frustrating bit is that the circuit _can _dip as low as 330uA but it doesn't behave reliably or stably at that voltage no matter what I try. This is supposed to be a reliable tool that works as you expect it to each time. Seeing the issues with the Lumintop Tool Ti e-switch makes me happy I stuck with the reliable old McClicky, and dropping the finicky microamp levels is probably the right choice here too. 

When my wife asked if I was even going to use the lowest levels I told her "No, they're too dim" and she shrugged and asked why I was bothering. "Because I want to stare at the bond wires while the emitter is running" is a legitimate response but whether it's a good enough reason to justify all this effort is debatable. 



gunga said:


> Still totally excited. I thought you were going oslon?



Oh, there's no doubt my personal light will be rocking an Oslon emitter! Osram even put out a new revision with better efficiency and brightness. Haven't seen them in-person yet so couldn't say if they're as good as the ones I have now. 

3500k is a bit warm for some people though, so I'd be silly not to pick up a few Nichia's for those who want that. Plus the B's seem to be getting phased out in favor of the 80CRI C's so I wanted to snag a few before they're gone.



Thetasigma said:


> Looking good, if you need o-ring, a good hardware store should have a thorough selection of EPDM ones in the plumbing section. You'll probably want the 1/16" thick ones at most.



Thanks for the suggestion, I'll check it out! Most of the o-rings are 1mm cross-section so finding skinny enough ones has been a challenge. We have a seals manufacturing plant in town so I might swing by with my prototype and we can test a few until we find some that fit. The problem with odd sizes like 17.5x1mm has always been that factories don't make them unless there is a need and then they want to make thousands. The o-rings are a relatively easy fix at least - most of the grooves can be widened or deepened if needed.


----------



## gunga

I really like the super dim modes but they are very limited use. So I concur with your decision.


----------



## archimedes

Good news on the emitter choice(s) .... I definitely want the Oslon


----------



## gunga

I'm good with either.


----------



## archimedes

I've much preferred the N119 to almost all of the N219 I've tried.

And the only Osram Oslon I have so far was better yet ... and in the Spyglass Mk I


----------



## mk2rocco

I would love a Oslon if I get the chance to own own one [emoji4]


----------



## calipsoii

To-do list isn't completely finished yet but I think it's high time we get some real-world test data. Onwards... to Phase 2 of testing!


----------



## gunga

Onwards and upward!


----------



## gunga

Btw. Nice vise. What kind is it?


----------



## mk2rocco

Excited to hear the results of your testing!


----------



## calipsoii

gunga said:


> Btw. Nice vise. What kind is it?



It's called a jeweler's vise. Very helpful for electronics work!


----------



## phosphor22

LOoking forward to hearing about Phase 2 testing... and the lowest mode on this sounds just right to me.


----------



## calipsoii

*Putting It All Together*

Despite being done the machine work months ago, I only just now (grudgingly) assembled the light. The reason is pretty simple: once the driver is sealed up inside the host it's very difficult to change the firmware. I've spent many nights flashing and reflashing code changes at my computer desk trying to get things just perfect but there's no substitute for real-world use so it's time to say "good enough" and take this thing out on the road.

-----------

We start with the MCPCB. Most of you already know what it is, but the *M*etal *C*ore *P*rinted *C*ircuit *B*oard is what you mount the LED on. Sinkpad's are extremely expensive, solid copper MCPCB's that directly connect the LED thermal pad to the flashlight body. They're measurably the best MCPCB's on the market in terms of wicking away excess heat from the emitter into the body. They're also really thick and heavy - my little 10-pack weighs more than most of my lights.






These are pretty much impossible to solder with an iron so I applied a dab of solder paste to each pad, mounted the LED, and reflowed it on my skillet. For this prototype unit I've chosen a N219B HCRI LED.





After physically examining and poking the LED to make sure it was completely soldered, I tested it for functionality. If you set your multimeter to 'continuity test' it will ramp up the voltage until a small current flows - the perfect way to test an LED without blowing it away.





Next up: getting the driver mounted inside the driver pill. Here I've soldered some power wires onto my little boost converter (two to the battery, two to the LED).





The fit is perfect! The board is suspended neatly inside the driver pill, resting on a tiny ledge which contacts the ground ring on the driver and serves as both a ground and heatsinking path. The white Delrin collar is the one you saw earlier - it acts as an insulating spacer which will a) keep the battery contact PCB the correct distance from the converter and b) give a bit of room for the wires to fit.





Here I'm trimming the driver wires to the correct length. This is seriously hopeful wishing on my part: my goal is to be able to flip the contact board completely out of the way, allowing access to the microcontroller for reprogramming without completely disassembling the light. It might work, it might not, but I'm going to try. If it does, it'll mean flashing a new firmware is a 10-minute ordeal with no soldering and only a pair of tweezers needed for disassembly.





Hopefully all that extra wire will fit in the driver cavity! The solder points get some Kapton tape to prevent shorts.





These springs were marketed as 'carobronze' which is apparently a Phosphorus Bronze alloy. They have a higher tension than my old ones and seem to be very low resistance.





With all the soldering done it's time to try fitting everything into the driver pill. Fingers crossed - this is where we find out if my estimated dimensions match up to real-life.















Looks good. 





A touch of Arctic Silver thermal paste and then we're mounting the LED up on top of the pill.










The Kapton tape is quite important up here because the metallicized reflector will conduct electricity and could cause a short.





A quick test-fire to make sure everything is working before we proceed.





These rubber switch boots are intended for use with short e-switches. To modify them for a McClicky the central pillar needs trimmed off.





Most McClicky's screw down into the body. Screwing them up into a tailcap (like in a Surefire 6P) is fine so long as the flashlight body contacts the silver ring on the bottom of the switch. In our case neither scenario is happening, so we need to add an additional component: a threaded retaining ring that grounds the switch against the body of the tailcap.










And with that, we're all done! As an added bonus, with our switch boot on one end and an o-ring on the other, this tailcap is almost certainly waterproof.





A tiny Delrin centering ring keeps the reflector centered on the LED. If you look down on a reflector and see the yellow phosphor of the LED you're on the path to a nicely focused beam.





Looking like the rocket from a Saturn V, the reflector sits atop the driver/emitter stack.





The reflector is slightly larger (18mm) than the glass window (17mm). I was having issues getting the o-ring and glass centered during assembly, so it was back out to the lathe for ANOTHER Delrin centering ring (you can see it sitting at the bottom of the head). The part count keeps risin' but if you want great results you have to work for them!





Now THAT'S a centered o-ring. The slight blue tinge is the anti-reflective coating of the ultra-clear lens (UCL).





The whole assembly is threaded down into the head...





... and we're finished!















Ah heck, I can't keep you in suspense. Shall we sneak a peek of the Spyglass v2 compared to the previous version?





In addition to the driver being completely redesigned from the ground up, we've changed a few external things as well:

Driver pill has been changed to aluminum. Not only is it a great conductor of heat, it offers a nice contrasting color band around the head.
Body on this light has been machined from bearing bronze, lending the red warmth of copper with the nice black tarnish of brass.
Tailcap is now separate instead of integrated, greatly improving waterproofing.
You might have noticed one other difference: where's the pocket clip?! I've mentioned before that the previous clip was a pain to assemble and the attachment point really needed refined. For this revision I'm hoping to slip a pocket clip between the tail and body.

This was my first foray into the wild world of waterjet cutting. A local shop in town offered me a small run of prototype pieces, so I brought in my drawings and they went to work. This was the result: 10 pieces of 0.060" stainless steel.





The edges were a lot rougher than I expected. This is probably because most clips are stamped with a die, not sliced with a waterjet.





I wouldn't want to do any great number of them, but for a single prototype I was willing to go at the edges with a file.





There is a nice smooth edge hiding under there, just need some elbow grease to bring it out. 





The surface finish could use some love as well. I started with some wet 600 grit and moved to 0000 steel wool. I brushed the steel-wool lengthwise to give a uniform appearance.










A little elbow grease later and we're left with a much nicer looking clip.





Adding the bends to this clip was MUCH easier than bending the old wire clip of the v1 light.















So? What does it look like?










I spent a good portion of the day comparing this clip to those on other lights I own. 





If I had to rate the holding power and tension I'd probably say:

Stronger grip than Surefire long clips (A2, E2) but less springy and more rigid.
Weaker grip than McGizmo death-grip clip (I'm fine with this; McG's clips have shredded numerous pairs of pants, they're crazy tight). More flex.
Stronger grip and more rigid than DarkSucks Eiger clip.
Closest comparison is probably the Moodoo HDS clip, though the Moodoo clip is probably stainless spring-steel as it seems less likely to deform than this one.
So overall it's a good first go-around! I might tweak a couple things about the design (and possibly the material) but I've been carrying it for a week and it's performed admirably as-is. Do I like the aesthetic better than the v1 wire clip? Ehhh, I don't know I can say that yet. The v1 clip has a special place in my heart but it's not immediately feasible on this design. The new clip offers many benefits over the old: it can be changed or removed without tools, it doesn't compromise waterproofing, and I can cut all kinds of different designs and swap them out as I please.

I'll finish this post with a couple glamour-shots devil. Next update will cover the new driver and functionality so check back later will ya?












>> Return to root post
>> Continue to next post in the series


----------



## Ladd

Another most excellent update!


----------



## gunga

How about a deep carry clip? Please say you are making a few more for loyal Canadians who would love a sample... Like me.


----------



## mk2rocco

Gorgeous work!


----------



## archimedes

When can I send you money ?


----------



## phosphor22

Wow - the end result is stunning - the bearing bronze is really fine looking - along with the two silvery elements with it


----------



## flat-ray

Really nice. It could be a definitive version! Ready to sell.
I too suggest a deep carry sample.


----------



## Zandar

I second Archimedes, I'm ready to Paypal now. I "need" this light in the interest of fostering good international relations with our Canadian neighbors. And the temptation is too great, for me to miss the opportunity, of owning a real Canadian light, and a prototype at that! 
Well done Sir!!!


----------



## calipsoii

Thanks for the comments all! It's great to hear you guys like what you see so far. It's a solid little light and I'm packing it around testing it at every opportunity I get. I still have to try a runtime test or two with the new driver and then I'll post some technical observations up. _Then_ we can discuss building a few more for anyone who's interested.


----------



## phosphor22

calipsoii said:


> Thanks for the comments all! It's great to hear you guys like what you see so far. It's a solid little light and I'm packing it around testing it at every opportunity I get. I still have to try a runtime test or two with the new driver and then I'll post some technical observations up. _Then_ we can discuss building a few more for anyone who's interested.




 oo:


----------



## mk2rocco

That sounds like a great plan [emoji2]


----------



## Zandar

You want to test it? Send it to me and I'll make sure Candle Power Forums most distinguished tester "run4jc" puts it through it's paces. He definitely has the equipment and more importantly the drive to do whatever it takes to evaluate your prototype. And if you so desire he can test the limits of your light as well.


----------



## calipsoii

*15VP v2 Measurements*

Hi all! With the driver installed in a host body it now has proper heatsinking and a reflector which means I can do some real-world testing!

For this prototype driver I swapped out the 2.2uH inductor coil for a 4.7uH model. This adds a bit of stability at the cost of lower average current on high. This increased stability means I was able to experiment with microamp drive levels again (something that was very unstable with the 2.2uH inductor). 

 NOTE: while sub-milliamp drive currents are _possible_ with this driver, THEY ARE NOT 100% ROCK SOLID. 

The issue boils down to the microcontroller being unable to accurately read these tiny drive levels 100% of the time. Adding a bigger sense resistor would fix it (at the cost of overall efficiency). So would re-designing the circuit from scratch (something I'm unwilling to do right now). So I'm leaving the _ability _to set microamp drives in the firmware but recommending anyone seeking stability uses 1mA+. 

In daily use I'd say I notice something wonky with the lowest-low about 20% of the time. I have a small firmware change planned that should reduce that to 10%. But again: experimental.​
Ok! With that disclaimer out of the way, let's dig into some performance measurements!

*Eneloop (old cell, freshly-charged)*






350mA: *90 minutes* until it drops out of regulation
35mA: 950 minutes / *16 hours*
1mA: 24k minutes / 400 hours / *16 days* (calculated)

So while we're nowhere near Zebralight output or efficiency, we're still getting decent output for a decent timespan. Good enough for my daily use.

I'd mentioned microamp drive levels:










They're pretty good! Heck, even 1mA drive levels are still very low output. Here's a comparison shot against some other lights all set to their lowest outputs:










I busted out the light-meter and makeshift light-tube to take some rough output measurements:





Some comparison readings:

*Light**Reading*4sevens 1xAA Quark NW XP-E2977Tain Flute N2192215Spyglass v2 N2193421Muyshondt Aeon MkIII N2193902

Lacking a proper integrating sphere to measure lumens, I'm going to tentatively estimate output somewhere around 90lm on High? Would need run4jc or someone to measure them directly so perhaps I can see about that a bit later here.

Lastly, I shot a few comparison shots to help judge the beam & output against a couple more well-known lights:

Right: McGizmo Haiku 119 CR123





Right: Spyglass v1 Oslon





Right: Tain Flute N219





Right: Quark XP-E NW





Right: Muyshondt Aeon MkIII N219





So there we go! A short summary of my initial driver tests. I have a few changes to make to the firmware to correct things I don't like in real-world use and then it's onwards and upwards. Thanks for reading along!

>> Return to root post
>> Continue to next post in the series


----------



## NiTyson

Woah, awesome machine work! I wish I had tools like that, so many things I could do. It's cool to see that you've invested the time and effort to make what will be the ultimate flashlight for you. I have to ask though, why the 1 X AA format? No offence intended, but current battery tech tells me that light will never put out more than 400 lumens at most, and even then it may run what, 10 minutes? I guess what I'm asking is what is it about the 1 X AA format that captivates your imagination, almost to the point of obsession? I'm not saying what your doing is a waste, It's absolutely AWESOME. It's also really cool to see a custom driver purpose built to pull power from a AA. The current measurement scheme is genious, BTW. ROCK ON!


----------



## calipsoii

@NiTyson

AA is my favorite format, it's pretty much as simple as that! In real-world use I've never found that my pocket light needs to be >100 lumens. If I'm walking the dog I'll reach for a Malkoff or something more powerful. There are already many great offerings in the high-power arena so I don't intend to try and recreate that wheel. I'm finding the AA market continues to be disappointing though, so that's an area I'm willing to put effort into. Plus this project has been one great big ongoing learning experience in many different fields, which is good for a guy who's not getting any younger like me. 

Cheers!


----------



## mk2rocco

Some great updates! Beam pattern looks very nice and I love the AA format. My malkoff mdc aa 219 is one of my favorite lights.


----------



## archimedes

I have used *a lot* of different torches ... _a lot_ ... really.

My virtually perfect AA torch would be my Spyglass Gen1 ... with a higher high ... a lower low ... and in titanium :devil:


----------



## NiTyson

calipsoii said:


> @NiTyson
> 
> AA is my favorite format, it's pretty much as simple as that! In real-world use I've never found that my pocket light needs to be >100 lumens. If I'm walking the dog I'll reach for a Malkoff or something more powerful. There are already many great offerings in the high-power arena so I don't intend to try and recreate that wheel. I'm finding the AA market continues to be disappointing though, so that's an area I'm willing to put effort into. Plus this project has been one great big ongoing learning experience in many different fields, which is good for a guy who's not getting any younger like me.
> 
> Cheers!



I sure wasn't criticizing, mainly curious. I just completed a LED conversion on an old Maglite, but it's so big, I don't think I will use it too much! But I have it if I need it. At least if anyone tries to attack me, I can knock their brains out with it.:devil: That's one of the reasons the police like them so much. I can definitely tell why a AA light would be nice though. My Convoy s2+ is a little big to carry in a pocket all day, and it doesn't help that it lacks a clip to attach it on the outside of your pocket. A AA light is small enough that you can forget you have it, while a 18650 light is a little harder to miss. Btw, did you ditch the secondary LED? I haven't seen it in recent post. Anyway, keep up the awesomeness!


----------



## calipsoii

A wild Spyglass sighting!





Been carrying it every day since built and getting a good feel for what works and what doesn't. Have 2 of 6 firmware changes finished and then it'll be reflashed and tested. So far results are really positive.

High is high enough (in my opinion); v1 Spyglass was definitely too low at times
Low is too low (in my opinion); I might run it at 1-2mA instead of 0.5mA because I simply don't need that low
3 output levels seems perfect - 4 was too many to tap through
I'm running it with mode memory OFF because I like cycling up through L->M->H and not guessing what mode I was on last
The bronze is heavy as hell. I like the color though (look at that tarnish!) so maybe a bronze driver pill and titanium body would look nice?
The groove in the clip runs too high up the center, it needs to be half as long. Holding power is _ok _but I'm going to look for stainless spring steel for final clip
I'd like a hairpin at the top of the clip so that it grabs my pocket material, right now the top slides down the pocket

Still working away here so stay tuned!


----------



## mk2rocco

Looks beautiful after some use!


----------



## gunga

Awesome update. I prefer 4 modes myself with a super low moonlight, but if you do, three, you'd probably want to boost the first level a touch as you have planned.


----------



## archimedes

calipsoii said:


> .... titanium body would look nice? ....


----------



## calipsoii

gunga said:


> Awesome update. I prefer 4 modes myself with a super low moonlight, but if you do, three, you'd probably want to boost the first level a touch as you have planned.



That's the nice part about an end-user programmable driver. I'm not taking anything out, it's all staying in! If you want 4 levels and to set the brightness for each level and disable mode memory it's 3 minutes in the setup menu and you're done. Those were just my comments on how I've setup my light - everyone else can tweak it as they desire.


----------



## Zandar

The lights that evolve from this project are amazing. Are we realistically looking at a few production lights this year?


----------



## gunga

Oh wow. Programmable. Awesome. Can I put a deposit on one now?


----------



## mk2rocco

Very cool! You can tailor the light to the individual user, can't wait for some more progress


----------



## GODOFWAR

Just beautiful


----------



## egginator1

I'm with gunga, taking deposits?? Sounds like a great light.


----------



## phosphor22

egginator1 said:


> I'm with gunga, taking deposits?? Sounds like a great light.



X 3 -- count me in!


----------



## calipsoii

Hah, you guys flatter me!  No deposits just yet while I iron out the last few changes. Stay tuned.


----------



## archimedes

15VP v1 needs a buddy ...


----------



## DellSuperman

Looks awesome. 
Im definitely in for 1


----------



## calipsoii

Hey all!

Just wanted to quickly pop in and say we're still making some progress here. Got slowed for a week by a nasty bit of illness and just finished Thanksgiving weekend, so it's been slow-moving. If you're interested, here are a few of the things I've been up to:

I wrote a bunch of firmware changes to fix bugs and tighten things up. Tried to reprogram the existing head without a full disassembly.






The clip actually fit onto the microcontroller and the computer could see it, so that's promising!





Unfortunately the new firmware didn't work at all and from that point forward I couldn't even get the programmer to connect. I needed new drivers to experiment with.










Even the new boards couldn't be programmed! It was time to take a look at my programming setup. The SOIC clip was looking pretty rough for wear so I ordered new ones. You can see the plastic is really worn on the left one vs. the new right one.





The new clip only _slightly_ helped matters. I then took a look at my makeshift programming cable and it too was getting loose and quite worn. That cable was quite a bit of work to make and constructing a second sounded painful, so I chalked the cable up as a consumable item and decided to simply buy new ribbon cables from Digikey.

The new ribbon cables required an entirely new interface board (to connect them to the programmer) so I sketched out the connections and whipped one up.










The new board allows the ribbon cables to simply be replaced when they get loose/sloppy (along with the clip). A much better design. Here's a comparison of the old vs. new programming setup.





I popped an amber LED onto the new board (so I can see when the target system has power) and then connected the whole thing up at my computer. Success!





I suppose the unfortunate bit is I now have to return to the menial task of debugging my firmware issues, but at least I can do it with brand-new tools! Anyways, just wanted to update this thread so you know I'm still around.  Have a great week and I hope to have more soon.


----------



## mk2rocco

Glad to hear you're feeling better and making progress! Looks like a much nicer setup than the old one.


----------



## GODOFWAR

Good to hear from you again, keep up we are waiting!


----------



## MRsDNF

That was one interesting update. Your drivers are looking real nice. All the best for the debugging.


----------



## Thetasigma

Annoying, but a neat solution that should save you further trouble. Certainly one of the interesting things about building things yourself, are the tools one builds to get there.


----------



## Steve K

the new interface looks much nicer! The addition of the power LED is good too... I know that I'm always forgetting when power is on (or off). I can't count how many times I've started soldering on a board that is still powered (oops).

Are you using magnet wire on the interface board? My habit is to use 30 ga wire-wrap wire. Unfortunately, it's getting harder to find good strippers for it.


----------



## Zandar

Time for an update, it's a new year!


----------



## gunga

I better save up some Paypal...


----------



## calipsoii

Zandar said:


> Time for an update, it's a new year!



The bronze prototype is still working great! Attempts to make more haven't been going so smoothly. The driver is very difficult to calibrate so I have a pile of drivers that don't work reliably which isn't what I want.

I ended up taking a break from the 15VP project to think about the design and decompress a little. I've been working on my Lamplighters in the meantime and would like to return to this one soon. I'll be sure to post an update here when that work starts.


----------



## archimedes

We'll be here ...


----------



## Uriah

A very interesting light I would definitely like to get one!!


----------



## YummyBacon!

Great thread:thumbsup:


----------



## egginator1

calipsoii said:


> The bronze prototype is still working great! Attempts to make more haven't been going so smoothly. The driver is very difficult to calibrate so I have a pile of drivers that don't work reliably which isn't what I want.
> 
> I ended up taking a break from the 15VP project to think about the design and decompress a little. I've been working on my Lamplighters in the meantime and would like to return to this one soon. I'll be sure to post an update here when that work starts.



I see the magic words in the post......"Lamplighters"..... does this mean that they might be available soon? I'm wondering how one might get on the magic Lamplighters list...way up close to the top of the list....


----------



## calipsoii

Mail call! A big box full of components for the completely redesigned 15VP v3 driver just showed up. PCB's are at fab as we speak so once they arrive we can take everything for a spin.


----------



## mk2rocco

Awesome! Hope the redesign works out well.


----------



## egginator1

Great news!!!


----------



## gunga

Exciting!! Can't wait.


----------



## archimedes

Yes, I keep hoping for new updates[emoji106]


----------



## MRsDNF

It appears you have a lot of fun ahead of you. All the best for the construction of what appears to be many drivers.


----------



## calipsoii

Look what just arrived! No idea if they work yet but dang, they sure do look pretty.


----------



## gunga

Woo Hoo! Canadian flag too!


----------



## YummyBacon!

Nice!


----------



## mk2rocco

Beautiful!


----------



## phosphor22

Can't wait to hear more!


----------



## Gordon-B

Hi, new guy here.

I had been thinking about buying a small lathe and making myself a flashlight.

I had no clue how much goes into a project like this.

I am truly in awe of your dedication to this project.


----------



## calipsoii

@Gordon-B

Thanks for reading along! This continues to be a very fun project and I've learned an enormous amount since setting out. If you're thinking of taking a swing at something similar I strongly recommend it!


----------



## Anglepoise

calipsoii;
Thanks for reading along! This continues to be a very fun project and I've learned an enormous amount since setting out. If you're thinking of taking a swing at something similar I strongly recommend it![/QUOTE said:


> Have enjoyed following along with your machining experience. Knurling always frustrates me and is the job I hate most. Congratulations.


----------



## calipsoii

*3rd** 4th Time's the Charm*

Hi all! :wave: 

I owe you a sincere apology for disappearing for.. _(goes back and checks last project update)_... oh boy ... way too long.

Last we spoke, I'd teased some shots of the components for a Version3 of the 15VP converter. The fact that I didn't excitedly come back here probably speaks volumes - it didn't work as intended. Not all was lost though! I learned a significant deal working on that board and it lead me into the creation of (drumroll please)... the *15VP Version4.*







Looks pretty much like all the others, eh? At first glance - yes. But I'll tell you what's exciting about that picture:

It uses standard, widely-available parts
A basic Lo-Med-Hi firmware is 26 lines of code
The same basic Lo-Med-Hi functionality on 15VP Version 2 was nearly 1400 lines of code

It's all contained on one 14mm board - the bottom has a brass battery contact
Versions 1-3 have all been a two-board sandwich that take up a ton of room

It has a large dynamic range
From 1mA to 325mA LED drive current

Every level is true current-controlled (no PWM)
Every one I build behaves exactly the same

The unsatisfying part about that driver? It only pushes 350mA to the LED on High and I want more. :devil: I'm currently waiting on my OSHPark boards for Version 4.1 which should (hopefully!) have an even higher drive current while retaining all of the benefits above. Hopefully. Fingers crossed. 

You may be wondering where all the pictures are! I certainly love documenting and V4 has been no exception, but I have a bit of bittersweet news that I really don't know how to say, so I'll just come out and say it: I won't be maintaining this build log on CPF any longer. 

I wholly intend to continue documenting my quest for the perfect AA flashlight but will be doing so on my portfolio site. There are a number of reasons for that, the two most positive ones being:

It gives me a single place to post my builds of _all_ kinds (flashlight-related and non)
I have better control over the presentation of my builds, including:
using more mixed media
using expanded markup for my text and images
providing a more mobile-friendly experience


I just wanted to pop by and give this thread a bit of closure. Should you be interested in how V4 came together and where it goes from here, you can find me on the internet! Forum rules permit external links but prohibit shilling... I'm not trying to sell you anything other than some pictures and text so I'm going to _very cautiously_ drop this hyperlink here and we'll see whether the mods agree.  


​
It's been my very great pleasure to have you along on this journey - I wish I could personally thank everyone who took the time to follow along and interact with me. Old CPF'ers never leave though, so of course you're still going to find me lurking around (mainly in the Homemade section :thumbsup. I hope to bump into you there, and until then, I wish you all dark nights and bright lights!


----------



## mk2rocco

Found the site! It's easy enough to locate [emoji13] 

I'll continue following along on your site [emoji106]


----------



## DrafterDan

Yes, I'll keep tabs on the updates there.
~D


----------



## HarryN

Gordon-B said:


> Hi, new guy here.
> 
> I had been thinking about buying a small lathe and making myself a flashlight.
> 
> I had no clue how much goes into a project like this.
> 
> I am truly in awe of your dedication to this project.



Hi Gordon, building a home built light will push your knowledge of a number of areas - great hobby.

Just from my own experience, don't buy a small lathe - most are not stiff enough to do accurate machining. They also often cost as much as many larger used lathes from machine shops. This forum has a section on machining, and there are also some really good machining forums out there.

If you can, try to find someone who has a lathe, or take a class at a local community college that has some machining equipment.


----------



## eh4

You Rock, calipsoii! 
I'm searching and bookmarking your site.

... that was trickier than expected to find, 
calipsoii.net .

"It's IN the computer?, it's So Simple!"


----------



## calipsoii

Hey all,

For anyone interested in how things have been going, a quick update:

15VP version 4.1 boards arrived
Low output is now experiencing a flicker problem
High output is now twice as high (750mA)!
v4.2 boards are due to arrive next week

Will let you know how the new boards turn out!


----------



## mk2rocco

Sweet! Still following on your site, looking forward to hearing how the new boards turn out.


----------



## archimedes

Sorry to hear about the flicker, but very exciting news with the higher current on the top end ... :goodjob:


----------

