Momentary switch to power ON a circuit

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
Most of the time, on simpler Circuits, I won't even bother with a proper PCB, ever.
A "Vero-Board", AKA, "Through-Hole-Boards", and about ~75 other names for
a PCB-Board with Copper-Plated-Holes laid-out in a "Grid-Pattern" covering the whole Board,
will do just fine in a "permanent" application,
I guess it depends where you live and how conveniently/at what price you can get custom PCBs.
I live in China and here it takes just two to three days to get a custom PCB made and a couple of dollars. For seven more dollars you even get the professional steel mask if you want to semi mass produce your boards.
It's pretty hard to beat that kind of service
 

LowQCab

Joined Nov 6, 2012
5,101
Does that Price include populating the Board with Components ?, Wow !!!

As far as Simulation-Software goes,
and even though there's a fairly steep Learning-Curve,
and even though I don't use it myself due to that Learning-Curve,
"P-Spice-for-TI" is Free-Software that is probably the most widely used and accepted
Simulator amongst the regular-contributors here in these Forums.
There may be other Free-Versions of P-Spice that I'm not aware of,
the Link is for the Texas-Instruments-version.
.
.
.
 
Last edited:

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
Does that Price include populating the Board with Components ?, Wow !!!

For two dollars you only get the PCB alone, but you can get it with the components soldered for extra money. The price is calculated according to the component price+a fixed fee per component (I don't remember how much but its pretty cheap). I don't know how big of a price difference there might be between the chinese version of the website and the foreign one.
I had a few other boards assembled by them and it wasn't expensive at all, the only small issue is that they don't always have every component available in stock.

The final quality is great, I have no complain about their service. This time I decided to solder the components myself, so I only got the PCB made as well as the steel mask (wasn't absolutely necessary, but it made applying the soldering paste a lot quicker). Then I just had to put the components using tweezers and use my little reflow oven to solder everything. Pretty easy, and it works great...if you don't invert the mosfets and the transistors, of course...

I'm not sure if I'm allowed to mention it here, but the service I used was JLCPCB (I'm not working for them and I'm not affiliated in any way, just a happy customer). You can do 100% of the work online, you start by designing your circuit in EasyEDA which is an online circuit designer, then you route your circuit, and then you can click on a button to order the circuit directly from there. They have pretty much every possible option to do every kind of circuit you want up until 20 layers.
I think their service is available outside of China as well, but I don't know how long it takes to deliver. You can have a look at what price it would take to make a board you designed here, just input your gerber file and select the options you want, it's pretty fun to do.


As far as Simulation-Software goes,
and even though there's a fairly steep Learning-Curve,
and even though I don't use it myself due to that Learning-Curve,
"P-Spice-for-TI" is Free-Software that is probably the most widely used and accepted
Simulator amongst the regular-contributors here in these Forums.
There may be other Free-Versions of P-Spice that I'm not aware of,
the Link is for the Texas-Instruments-version.
Great I'll check that, thank you!
 

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
For reliably switching in my LTspice sim, I had to increase C4 in your circuit to at least 20µF.
And once again you were right!
At first I put a 10uF and it still wasn't enough.
Unfortunately these were the biggest capacitors I had available in the shop, so I put another one in parallel and now it seems to work great!

Now there is still one little issue remaining: I noticed that there is a big voltage drop at the final diode, which takes away power from the fan. Because of this sometimes the fan struggles a little bit to start from time to time.
Is there a diode with a lower voltage drop I could use?
 

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
So what's the purpose of the diode?
I see no useful purpose for it in this application.

A Schottky diode has a lower forward voltage drop.
The purpose of the diode is to prevent the back EMF from the fan's motor to go back into the circuit when I try to power off.
I can confirm it is necessary because I tried bypassing it and it became impossible to turn off the circuit.

Would a schottky diode achieve the same result (allowing forward current to pass but stop back current) with minimal voltage drop?
How do I choose a suitable one for my application (I never used schottky diodes before so I don't really know how they work) is there any drawbakc or thing to consider?

Thanks again for your patience!
 

panic mode

Joined Oct 10, 2011
5,041
Schottky diode is doped differently. it works just like regular diode but forward voltage drop is lower (also max reverse voltage is lower too). that makes difference when load needs precise voltage or when current is sufficient - lower voltage drop means less power wasted as heat. but for small fan i would say it works so don't bother...
but if that bothers you, you can simply use another transistor (much lower voltage drop). pretty sure the problem will go away if you try larger capacitor too or use shorter presses.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,706
A bit of advice, a bit late for the TS.
Throughout my whole career I never commit to a PCB until I have verified that a circuit actually works. AND, I HAVE had to make the designs of others who delivered non-functional fully stuffed circuit board assemblies work, when the design did contain a few flaws. (That is the result of being hired to replace the one discharged)
Thus my prejudice against production of unverified designs. Fixing an error prior to release for production is much simpler, cheaper, and vastly less damaging to one's reputation.
 

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
A bit of advice, a bit late for the TS.
Throughout my whole career I never commit to a PCB until I have verified that a circuit actually works. AND, I HAVE had to make the designs of others who delivered non-functional fully stuffed circuit board assemblies work, when the design did contain a few flaws. (That is the result of being hired to replace the one discharged)
Thus my prejudice against production of unverified designs. Fixing an error prior to release for production is much simpler, cheaper, and vastly less damaging to one's reputation.
Well yes but it's easier said than done.
In this case, it was also more expensive as well.
Also, eveyone keep saying that I should have checked before but few people specified exactly how it was supposed to be checked.

I believe I did my homework as much as I could by using a simulator. Actually it turns out that the circuit was indeed perfectly functional, it's just that I mixed up the mosfets and the transistors. Also, keep in mind I'm a novice and don't have much fancy equipment like specialised breaboard systems for small smd components or stuff like that.

Anyway, the circuit works fine and I finished making my little air purifier, it works great. The goal was to reproduce the design of the original anycubic purifiers, but to have enough battery for it to run for at least 24hours instead of just 9. This objective has been more than achieved, great success!
Thanks to everyone who contributed, and especially LowQCab and SarahMCML who found the mistake !

Here is the thing after 3D printing the casing and reflowing the PCB:
IMG_20240704_215411.jpg

Then I painted the casing after some light sanding and assembled the battery module with its PCB:
IMG_20240705_200510.jpg

Finally, assembled next to the original Anycubic one:

IMG_20240705_205403.jpg
 

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
There's nothing specialized about a breadboard.
You can use a vector board and hard-wire the components to it.
In case you haven't noticed these are not through hole components, they are 0306 SMD ones.
Sure I could probably buy one of these boards, then buy all the corresponding through hole components in the hope that they would work exactly the same, wait for a week for these to arrive, then wire them on this breadboard and test it. I calculated the cost and it would be around 5 USD here. Then I would still have to make the final board, one more week of delay, plus purchase the SMD components, which was about 5.5 dollars in total.
So 10.5 dollars and two weeks, in the hope that through hole components would behave the same, that my manual routing would be correct and that my soldering skills were sufficient.

Or I could just spend the 5.5 dollars, wait one week instead of two and avoid most of the drama by ordering a very cheap board after testing the design in a simulator.
I chose this option as it seemed more appropriate to my particular situation. I guess if you already have all the stuff around you might prefer to choose the first option.
 

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
A Schottky diode has a lower forward voltage drop.
Well, I just tried installing a Schottky diode in place of the flywheel diode and it didn't work as intended, unfortunately.
The forward voltage drop is a lot lower, so the fan got significantly more power, which is great... But it doesn't seem to prevent current going in the reverse direction, which was the whole point of having a diode there.
So basically, I can turn the circuit ON, but it just won't turn OFF because the fan backEMF turns the system back on again.

Bummer.

I used this one, because it had a remarkably low forward voltage drop value. It was fairly expensive so I'm a bit disappointed by the result:
PMEG2020EH,115 SOD-123F 20V, 2A MEGA Schottky Barrier

1720756402136.png

I suppose the issue might have to do with the reverse current? I kinda assumed there wouldn't be any problem with such low values, but I was obviously wrong.

So I've reinstalled the original diode.
I find it strange that no one managed to invent a diode that has no significant voltage drop, basically its just a simple check valve it shouldn't take that much energy to simply stay on.

Anyone got a better suggestion for a more suitable diode? I need the lowest possible forward voltage with the lowest possible reverse current. At least that my understanding of it right now, feel free to correct me if what I'm saying is complete nonsense ;)
 

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
Ok I kept playing a bit with Falstad simulator and came with this idea: instead of putting the diode in line with the load, what if I were to put a zener diode right after the resistor who controls the current going to the transistors gate?
In theory the diode should limit the currents going back from the fan motor because they can't reach the necessary voltage breakdown values for the diode to allow significant current to pass towards the transistors gates?

At least that was my idea of it.

The simulated circuit is visible here

And here is a screenshot of it, as you can see I just added a zener and I simulated the back EMF load with a capacitor:
1720776397170.png

In the simulator it seems to be working relatively well. It powers ON instantly and it powers down with a variable press duration: adjusting the capacitor value allows to change the minimum delay between two consecutive press as well as how long the button needs to be pressed for the system to turn off.

Am I onto something or is this design flawed? Any expert opinion is very welcome.
 

PhilTilson

Joined Nov 29, 2009
154
Why not put the diode directly across the fan connections, reverse-biased, of course? That way you get no forward voltage drop, but the back EMF is directly shorted through the diode, so can't interfere with the rest of the circuit.
 

crutschow

Joined Mar 14, 2008
38,561
Why not put the diode directly across the fan connections, reverse-biased, of course? That way you get no forward voltage drop, but the back EMF is directly shorted through the diode, so can't interfere with the rest of the circuit.
Won't work because the "back EMF" is not reverse voltage as from an inductor, but the same polarity as it's running voltage.
 

crutschow

Joined Mar 14, 2008
38,561
Am I onto something or is this design flawed?
It works on timing so that might be problematic.

How about connecting an N-MOSFET from the output to ground with its gate connected to the P-MOSFET gate.
Thus when the P-MOSFET turns off, the N-MOSFET turns on and shunts the motor voltage/current to ground.
 
Last edited:

Thread Starter

Forcerouge

Joined Jun 29, 2024
24
Why not put the diode directly across the fan connections, reverse-biased, of course? That way you get no forward voltage drop, but the back EMF is directly shorted through the diode, so can't interfere with the rest of the circuit.
Unfortunately this solution doesn't seem to work in the simulation, you can try it here if you want it's very fun to play with: https://tinyurl.com/25wqt7bm
 
Top