want to learn more about smart switches...

papasan

Enlightened
Joined
Mar 25, 2001
Messages
621
Location
Northern Virginia
i've always wanted a single push-button type switch that can do multiple functions on my home-made flashlights, but i've never known the first thing about going about it...now that i've gotten a little soldering, circuit layout, etc. under my belt i was thinking it would be a good time to start learning...

something like the, as i understand it because i don't have one, the photon3 and photon fusion control circuits...

so, i would imagine that this requires some sort of flash-able or programmable IC that could be flashed with some sort of PWM control circuit and then put in-line with the batteries...

anyone have any experience in the arena they'ld liek to share?...perhaps some web addresses to check out or something...

thanks...
 
Azoteq in South Africa makes the "IQ Switch" for flashlights, etc. It comes in about 5 board types each which can be configured in several modes. It provides autopower off, instant on, 3 brightness levels, fast/slow strobe and permanent on. It also has a finder LED function.

Two things, notice that is works better in three wire mode with a LED as the light source. This rules out using a tail switch because I don't want to run a wire up the battery compartment.

Second, I am not sure you can buy this in hobbist quantities.

They sent me a sample and literature awhile back. Looks like it might be used in the Photon III. Hope this helps...

Peter Gransee
 
i figured you wouldn't want to do it like that because of the signal that needs to get from the tailcap (switch) to the controller in the head...

looks like an interesting sight, a versitile switch, but i'ld rather make it myself...this electronic hobby stuf is fun =)...
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by papasan:
i figured you wouldn't want to do it like that because of the signal that needs to get from the tailcap (switch) to the controller in the head...

looks like an interesting sight, a versitile switch, but i'ld rather make it myself...this electronic hobby stuf is fun =)...
<HR></BLOCKQUOTE>

This is a classic use for a small (8 pin) microcontroller and a power FET. Though then you'd have to learn to program the microcontroller, and it would require a 3-wire connection.

If you're interested, the microcontrollers to look at are probably the small (12C*) PICs (http://www.microchip.com) and the Atmel AVR (the ATtiny series).
 
thanks for the site...dunno what i'm looking at yet, but it'll sink in eventually =)...

now that i think about the switch and the microcontroller could be seperate entities...i assume you could program it so that if the power went out and back on quickly it would change modes, yeah?...then just put the microcontroller on the regulator PCB...
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by papasan:

now that i think about the switch and the microcontroller could be seperate entities...i assume you could program it so that if the power went out and back on quickly it would change modes, yeah?...then just put the microcontroller on the regulator PCB...
<HR></BLOCKQUOTE>

Actually, the microcontroller itself can be the regulator (no need for extra parts). I'm working on a 3 or 4 cell booster circuit based on the Atmel ATTiny15L microcontroller, which has a 100-200KHz PWM unit and a 20x differential amplifier, 4 channels of 10-bit A/D, and a precision voltage reference on an 8-pin chip. It runs off 2.7 to 5.5V, so I can run it with no external regulator. The differential amplifier can amplify the voltage across a current sense resistor (two pins used), there's two pins for voltage and ground, one for sensing battery voltage, one for the PWM output, one for a pushbutton, leaving one pin free!. Though the smallest case this is in is a SO-8 (5x5mm), it hardly requires much extra circuitry... two caps, an inductor, a diode, a sense resistor, maybe a couple of resistors to divide the battery voltage, and a N-channel FET or NPN transistor and you have a boost regulator with fancy modes!
 
now that i have some keywords i've read more on eproms and cmos chips...looks like start up would be expensive because of the expensive programmer...i've found a couple sites that have plans to build your own but looks way more involved than i want to get...

is there places where you can send a program to and have them make the ICs for you?...i would imagine that the development software has an emulator built in so you could see what's happening...

as for the RC thoughts, interestign idea...of course, all the active components (those requiring power like the transmitter and reciever) would need access to both positive and negative battery poles, so all the electronics need to be grouped together so it kind of nullifies the need to be remote...unless there's two battery compartments...
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by papasan:
now that i have some keywords i've read more on eproms and cmos chips...looks like start up would be expensive because of the expensive programmer...i've found a couple sites that have plans to build your own but looks way more involved than i want to get...

is there places where you can send a program to and have them make the ICs for you?...i would imagine that the development software has an emulator built in so you could see what's happening...
<HR></BLOCKQUOTE>

The free Atmel software includes an emulator. However, the emulator doesn't always emulate the on-chip resources (like for instance the A/D converter).

You can make an AVR programmer using little more than a few resistors connected to your parallel port pins. There are many plans on the web for these.

See, for instance, this site.
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by papasan:

how do you erase these 'attiny' chips?...by the EM field method?...will this adapter do it or do i need to make something else?...
<HR></BLOCKQUOTE>
It will do it. You don't erase them, you just program over them.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
it seems that the lowest operating voltage for those chips is 1.8V, and that's only a couple...any manufacturers that make them with a start-up of under a volt?...
<HR></BLOCKQUOTE>
Not that I know of. But there are "charge pump" ICs that are tiny and will supply 3.3V from 0.9 to 1.8V input (20mA max; these would also run LEDs!).

Look at, for instance, the TI charge pump ICs.
 
heh...an od thought to use a charge pump to power up your switching converter IC =)...of course, it would work but now your subject to both system's ineffeciencies...

is this how your powering your torches?...if so what kind of efficiencey are you getting?...

btw, don't charge pumps put out negatively charged power?...how does this work?...
 
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by papasan:
heh...an od thought to use a charge pump to power up your switching converter IC =)...of course, it would work but now your subject to both system's ineffeciencies...

is this how your powering your torches?...if so what kind of efficiencey are you getting?...

btw, don't charge pumps put out negatively charged power?...how does this work?...
<HR></BLOCKQUOTE>

No, I'm not doing this. You asked whether there was a microcontroller that worked below 1.8V. The inefficiencies on the charge pump would be insignificant in a lighting application; even if the charge pump were 75% efficient, that would mean that it would be wasting perhaps 2-3mW of power, since the microcontroller itself uses so little power.

I'm not too interested in a single-cell solution, as it would have to be a C or D cell to do any good, and you might as well use (say) 4 AA cells.

There are a number of different ways to do charge pumps; the simplest uses a couple of transistors and a diode to charge a capacitor and then add its voltage to the input voltage (making a voltage doubler). The commercial ICs are more sophisticated. Only a few are inverting; most are intended for just this purpose: getting logic voltage (3, 3.3, or 5V usually) out of one or two cells.
 
so say you have a 1 or 2 cell light and used a charge pump step-up to provide power to an eprom that controls the on/off function of the light...say the charge pump shuts down at .9V...what happens when the voltage drops below .9V?...i would imagine the light wouldn't be able to turn on until the voltage was raised...what happens when the light is already on and the voltage dropps below .9V?...would it stay on until the voltage was raised?...
 
ahh...most excellent, much easier on my brain =)...thanks for the site...

i haven't done any programming since high school...should be fun...

how do you erase these 'attiny' chips?...by the EM field method?...will this adapter do it or do i need to make something else?...

it seems that the lowest operating voltage for those chips is 1.8V, and that's only a couple...any manufacturers that make them with a start-up of under a volt?...
 

Latest posts

Top