Re: This isn't working

Feb 11, 2024 Last reply: 2 years ago 3 Replies


> This is much too late to be useful, but you do need to work exactly what you are trying to. The first thing that worries me is that you don't spell out how long the momentary switch closes the contact.


> At first blush, one might be inclined to ask, "How long does a finger press any button?" I think I know what you mean, however. Certainly most people pressing a button won't typically be able to reliably close a momentary switch and keep that contact for less than about 50 ms. It should be obvious that anyone who is not an idiot would experiment with closure times, and I am not an idiot. In the simulator, I emulated button closures as short as 1ms and as long as 10 seconds. The design to which I pointed, modified in order to work with the required voltages, cannot work. There may be some PFET transistors that high enough thresholds to allow them to work with voltages this high, but I know of none. Certainly I do not have any.
>
>> You then go on to say you want the same momentary switch to turn off the lamp if you press it when the lamp is on.
>
> Um, yeah, an On / Off switch is a pretty ubiquitous sort of control. Indeed, almost all implementations of switched rotary encoders employ the integrated switch in that way, the fact the encoders have momentary switches notwithstanding.
>
>> Life gets a lot simpler if you set up micropower latch to switch between two states - lamp on and lamp off.
>
> I am not entirely sure what you mean, here. I could use a separate SPST switch to power up the device, but that would use up more real estate on the back of the device, and real estate is quite limited. Not only that, but two separate controls for light power and intensity is a bit strange.
>
>> It's output can drive the transistor ( the FQP47P06 P-channel power MOSFET). If you have separate logic to treat an output from the momenetary contact as a latch toggling input - directing it to at the Set or Reset inputs to an RS latch - the design can be pretty straightforward.
>
> Yes, but this only works if the logic is energized when the device is shut down, or if the logic can be waked up with the momentary switch. The latter is what I have chosen to design using discrete components.
>
>> You can buy a CMOS S/R latch, but even 4000 series CMOS has a maximum voltage rating of 18V.
>
> Precisely. I might be able to beat the quiescent current draw using a clever power supply scheme and micropower logic, but this design uses less than 65 microamps, and that is pretty good, I think.
>
>> It isn't going to be as cheap or as simple as what you've tried, but it is designable.
>
> The design below seems to work pretty well, at least in the simulator. Do you know of something better / simpler? Do you have any ideas for improvement?
>
>
formatting link
>
>

Your X1 complementary NPN/PNP voltage follower has the bases floating when the button isn't pressed, they could pickup noise.


The button current is very low and may not be enough to make good contact with time and corrosion, many precious metal contacts have some minimum operating current.


The zener D4 will almost certainly be horribly leaky at those micro-amp currents and not work the way you expect.


Here is one way of doing something similar, using a NPN/PNP latch triggered by a short button press but reset on an extended button press. The standby current is zero. The button current can be many milliamps to tolerate dirty or worn contacts. I separated the latch from the PMOS load switch but you might be able to combine and eliminate the PNP - I wasn't sure if the load had a lot of capacitance etc.


formatting link

piglet



Perhaps they buy them on Aliexpress for $2

formatting link
Or to answer the implied question, the manufacturers are not buying their parts from Digikey.

Stick a 14500 lithium-ion cell in there instead of the AA for increased brightness. These are great for reading laser marking on ICs, also inspecting drywall for flatness etc.

I like this part of the ad: Emitting Color: black

Arie

If you overdrive it enough, it becomes a Darkness-Emitting Diode (DED).

Cheers

Phil Hobbs

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required