Z41 Smart Switch

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia

You guys have incredible timing. I received a PCB revision this morning (like literally 5 minutes ago) and some new components were shipped last week. The good news is that the ULP version works perfectly, I'm just focusing on beefing it up now. It's no good if it's too fragile!

The bad news is that while the Z52/57 switch works, it's even more fragile and beefing that thing up is a bit trickier. It also doesn't help that I forgot to add a ground ring to the middle (and most important) PCB, so it's got no way of being soldered in place. I've decided to cease development of that version until the ULP version is 100% complete and shipped. So to be clear, the 52/57 version is coming, I'm just pausing work on it so I can focus on one thing at a time.

- Matt
 

880arm

Flashlight Enthusiast
Joined
Aug 29, 2011
Messages
1,752
Location
Wildlands of Western Kentucky
Good stuff Matt. It's probably smart of you to focus on only one part of the project at a time. I'm a living example of what it's like to have too many things going on simultaneously and not making effective progress on any of them!

You're pushing the envelope with what you're doing. We're all watching with keen interest!
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
Ok, I hate to ask, but I'm really curious.

This thing has a fet and a microprocessor . . .
Is it possible to program this thing to operate as a multimode PWM regulator/softstart for Incan users ?

Electrically, it seems identical from what I can tell. It's just be a change in programming.
 

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia
Ok, I hate to ask, but I'm really curious.

This thing has a fet and a microprocessor . . .
Is it possible to program this thing to operate as a multimode PWM regulator/softstart for Incan users ?

Electrically, it seems identical from what I can tell. It's just be a change in programming.

It can be done with a simple firmware change but it's not something I'm actively pursuing at the moment. I have used an ATMEL ATTINY13A MCU in SOIC8 form, so if you take that out of the housing it would be very easy to reprogram.
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
Yeah I understand. Maybe when this project is all done and production is in motion it would be an option you would look into.

Many incan drivers have been made, and are currently available that run "Tiny" processors, just none that fit in a surefire tail.
There is plenty of example code you could tailor to run this device. Might even be able to convince one of the Incan driver programmers to write the program.

Is the processor accessible by the end user ?
 

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia
It's something I will look into, yes. The processor is accessible as it sits on the 'lid' of the assembly, so you could even attach a SOIC clip to it without haven to de-solder it. I like to make most of my things modder friendly* :)

- Matt

* total fluke this time though haha
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
That's awesome.
I finally got around to reading all your posts on this thread.
I think the only hookup is that running it as a PWN regulator would run down the coin cells.
It's not uncommon for me to run my lights on mid power most of the time and only turn them to 100% when I need to blast for distance.

As is, it would still be great for Incans as a high speed low drag switch. (high current low res).

Still haven't seen a price, but if I can afford it, I'm going to pic one up.
 

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia
Yeah that is a problem. Currently the MCU switches to a deep sleep mode when you're not actively using the button. This means LONG life. The problem is it can't be in deep sleep mode while running PWM. As a generic soft-start switch though it would work very well.
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
A softstart alone can make a huge difference for an incan bulb as the inrush current of startup is when the bulb is stressed the most.
I figure a softstart could easily quadruple bulb life.

Meanwhile, I've played around with running LED drivers off a PWM to see if I could dim it. They didn't care for it so much.
I'm noticing a lot of drivers are coming with build in low voltage protection.
This means a softstart might register a false positive and cause the driver to shut down right away.
Same with multi mode dimming. I'm thinking most good drivers worth their salt won't respond well to that.
In fact, some drivers are even using similar tech as this switch, which means if you attempt to dim them, that lack of voltage might cause resistance in their circuit causing an overload, much like if you try to run that fet undervolted.

I'm only bringing this up because I recall mention in this thread of people wanting to know if you could make this multimode to dim a single mode driver.


Now you realize of course, your biggest challenge might be production demand. I feel you are going to sell a heap of these.
 

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia
I've just had the most thoroughly frustrating 24hrs. I received the latest PCB revision during the week and sat down Sunday afternoon to build a switch using this new PCB. The whole point behind this revision was to improve the durability of the pin mounts. Mission accomplished; before, if you knocked them hard enough (which didn't take much) they snapped right off. These ones are mounted so securely you can bend them 90 degress without them coming loose. I don't recommend doing that though!

However, when I assembled the switch it didn't work. It drove me insane. The low voltage protection wasn't outputting the right voltage (or any voltage at all) and the FET activation pin wasn't budging. I must have tried 6 different tests last night before giving up and going to bed. I got NO sleep thinking about the switch. Plus my GF had a cold and was snoring like a banshee. My alarm went off for work and I was wrecked.

Screw it. I took the day off. Got up at 11am and went straight to work on this switch.

Turns out the firmware works on the ATTINY-13V but NOT the ATTINY-13A. I wasn't paying attention to this (not that I had ever specified it) and kept grabbing new MCUs from my bucket without checking what specific 13 model it was. I got it working about 10 minutes ago and the only difference between working and non-working switches is the A/V moniker. Lesson learnt.

Only thing to do now is to wait for the latest (and hopefully last) revision of the 3D printed spacers and we could very well be ready to roll :D

- Matt
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
Hah, I just went thru'the same thing with a FET switch I was building.Made the stupidest mistake ever.
After hours of work, found I had my G and S reversed. Had to take it all apart and start over.
 

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia
Hah, I just went thru'the same thing with a FET switch I was building.Made the stupidest mistake ever.
After hours of work, found I had my G and S reversed. Had to take it all apart and start over.

I did that with the very first prototype of this switch. My issue was I had to wait 4 weeks for a new PCB :(
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
I did that with the very first prototype of this switch. My issue was I had to wait 4 weeks for a new PCB :(

My very first FET switch prototype short circuited horribly. It was a work of art, so clean and well put together.
To make the design work I had to run my bulb contacts in reverse polarity, which was fine, until I installed it into the mag.
Then when the outside metal contacts of the bulb mount, now positively charged touched the aluminum reflector mounted into the negatively charged body, well, let just say the whole thing when into melt down, hah.
 

Mattaus

Flashlight Enthusiast
Joined
Mar 29, 2011
Messages
1,765
Location
Brisbane, Australia
One of my biggest problems when it comes to PCB design is obsession with layout neatness. It increases the time it takes me to complete a project, and sometimes I screw something up as a result of insisting on a trace going a certain way. It results in MANY revisions :(
 

Conte

Enlightened
Joined
Dec 15, 2009
Messages
735
Location
Canada
I hear ya.
Never done PCB's but have done a lot of point to point and peg board. Building Tube Guitar amps was quite the hobby of mine at one point.
Layout is critical in high gain circuits to avoid parasitic oscillation. And even when you get that right, the grounding scheme further complicates things. You want to keep it simple, but sometimes that damn ground buss gets more complicated then circuit itself just to get things running right.
In the end, overworked and sometimes burned out components.

Got a software program at one point that made it easier to lay things out, but it's more sitting at the desk behind a computer and not as interesting as doing the work. It's saved me money in solder and iron tips tho', I'm sure.
 
Top