Go Down

Topic: Adding WiFi to my Keypad Lock (Read 354 times) previous topic - next topic

herbschwarz

What happens when the battery gets weak and
cannot run the motor? Can the door still be opened?
Herb

pranavmittal611

Not sure what you mean by connecting D1 and D2 to ground -- they're not connected to ground.  The diodes function as an OR-gate. 
Without R2, Q2's Gate would always be either 3.3V-VD2 or 5.0V-VD1.  In other words, there would be nothing to pull the Gate to ground, so Q2 would never turn off.  So, R2 is a Pull Down Resistor.FDV303N
In the schematic, D1 and D2 are connected to the gate via R3, which I understand. But why are they both connected to ground via R2, as I can see in the schematic? I've never used pull down resistors before. I have always connected GPIO to base/gate via a resistor on the base.

Thanks.

wvmarle

That's because this is a MOSFET (voltage driven), not a BJT (current driven).

When both inputs are grounded the diodes prevent the gate from being pulled low as well. That's what that resistor does for you.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

pranavmittal611

What happens when the battery gets weak and
cannot run the motor? Can the door still be opened?
Herb
Yes. I have designed the circuit so that apart from the 9V battery pack inside there is a battery connector outside also. And a power switch for the battery is also outside. So in case the battery is dead, just switch off the battery, put another one from outside, open the door and replace the battery.

I've connected both batteries to the same slot on the power supply though, which will give me 3.3v and 5v. Is this okay? Or is there a better way to connect a backup battery?

PaulRB

9V batteries, if you mean PP3 size, are a poor choice for any Arduino circuit. I am surprised that it has the strength to move the solenoid!

A better choice would be 4xAA NiMh cells. You can connect them to the 5V pin on the Uno, instead of the Vin pin. If you don't have NiMh cells and a charger, please get them, but if you insist in using non-rechargeable AA cells, use 3x not 4x.

pranavmittal611

9V batteries, if you mean PP3 size, are a poor choice for any Arduino circuit. I am surprised that it has the strength to move the solenoid!

A better choice would be 4xAA NiMh cells. You can connect them to the 5V pin on the Uno, instead of the Vin pin. If you don't have NiMh cells and a charger, please get them, but if you insist in using non-rechargeable AA cells, use 3x not 4x.
Thanks for your suggestions.

I would be using 6xAA batteries to get 9V. For the backup connector outside, I'll use a PP3 though.
Won't 3x be 4.5v, less than the arduino requires? I would have used 4x but the solenoid needs 12v and it would be easier to boost 9v to 12v, or will 4x do?
I'll see if I can get NiMh cells.
Maybe I'll get a 5V solenoid.

wvmarle

I would be using 6xAA batteries to get 9V. For the backup connector outside, I'll use a PP3 though.
Do check whether that can actually activate your solenoid.

Quote
Won't 3x be 4.5v, less than the arduino requires?
It'll do just fine at that voltage at 16 MHz. When full alkaline batteries are about 1.6V each, most of their life 1.3-1.5V, when pretty much drained down to 1.1-1.2V.

Actually an 8 MHz Pro Mini runs just fine on two AA batteries... even if they're down to 2.4V. You'll anyway have to go for a Pro Mini or so, or you can never get somewhat decent battery life.

Indeed, do get a 5V solenoid instead. Makes life a lot easier.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

ReverseEMF

#22
Jul 18, 2019, 04:53 pm Last Edit: Jul 18, 2019, 05:06 pm by ReverseEMF
Indeed, do get a 5V solenoid instead. Makes life a lot easier.
But, consider that a 5V solenoid will require more current [something like twice as much], to achieve the same pull force.  So, if the 12V solenoid you are currently using, is at, or near, the edge of adequate, then, a 5V solenoid will, likely, demand too much current for an Arduino output pin.  In which case, you would still need a driver.

Also, from the seat of my pants comes an aversion to driving anything inductive, directly from an MCU output -- even with flyback protection.  I like the idea of a buffer between such evil, and my precious MCU.  Just a superstition ;)


"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

wvmarle

Of course, a 5V one needs more current, but as it's a solenoid I assume it needs a driver anyway. Just one voltage less to deal with, that's always a plus.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

ReverseEMF

Of course, a 5V one needs more current, but as it's a solenoid I assume it needs a driver anyway. Just one voltage less to deal with, that's always a plus.
Ahhhh...I get it ;)
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Go Up