Positive to Positive

Hello! :slight_smile:

I have a circuit I was woundering if you could help me with. I want arduino to control an PNP transistor. The case is that the arduino will not always be on, so I want the output pin to be HIGH when in use.

Since there is no such thing as a PPP transistor, and I don't want to use relay, will this work? ;

Two transistors, NPN to control an PNP..

I am guessing that it works, but is there a better way or is this the way you usually do it?

Just to clarify, the HOLD is from Arduino, Batt+ is from battery, and HOLDV is back to the circuit to kinda hold the power on until Arduino is done. It will then make the HOLD port low and the circuit will stop. When a pushbutton is pressed the circuit is live again and will turn off when the ardu pin is low again..

I am uploading the whole schematic just in case it is easier to understand what I am thinking :slight_smile:

cap.JPG

I am guessing that it works

Never guess in electronics. That circuit will not work.

Two transistors, NPN to control an PNP..

Where? Both those transistors are NPN

Grumpy_Mike:
Never guess in electronics. That circuit will not work.

Yes, that is what I ment. When arduino outputs +5 volt, it grounds the first transistor (2N2222) and then the S8550 is grounded and should then lead between collector and emittor?

That's why I asked, But is there a reason why it don't work? Are you thinking of the whole circuit or the two transistors?

Do you maybe have a better way to do it? :slight_smile:

This will not work. You can use a PNP transitor and a pullup resistor. The transitor will turn on when it's driven low. Don't fotget the base resistor.

But is there a reason why it don't work?

Yes it is a noncense, you explain why you think it would work. Then I might be able to put you right.

Also that lock signal is wrong, it is as if you donโ€™t know how a transistor works.

want arduino to control an PNP transistor. The case is that the arduino will not always be on, so I want the output pin to be HIGH when in use.

So wht is wrong with using the 5V line on the Arduino? That is high all the time the Arduino is on.

I am not an expert AT ALL, I am just trying and failing. I am learning as I go.. This is why I ask while I learn.

As of my understanding of transistors is that if you give them positive or negative on the base (pnp or npn) then it will lead through emittor and collector. This will increase or decrease after what you input on the base.

jendalinda: Nice, I will look in to this, did not know how to google my issue, but using a pulldown is a good place for me to start :slight_smile:

then it will lead through emittor and collector

The word โ€œlead through โ€œ is not helpful.

A transistor can be connected in three ways, common emitter, common collector normally called an emitter follower, and common base. It is only the first two configurations you need concern yourself with.

With an NPN transistor the emitter must always be closer to the ground than the collector. It is not a switch like a relay, it matters what way up you wire it.

In the common emitter mode switch the emitter is connected to the ground, the collector to a load and the other end of the load to a positive supply. The base should have a seriese resistors in it and limit the current to about one tenth of the current the load will take.

The emitter follower mode has the emitter connected to the load and the other end of the load to ground, with the collector connected to the positive. Then any voltage on the base appears on the emitter / load only minus 0.75V. It can not act as a switch it only follows the base voltage, no base resistor is needed in this case.

Your circuit does not follow this usage.

Yes, you can use the processor to control the power. The NPN driving a PNP will work and reduce the current draw from the processor digital pin. The idea is ok, just more than needed.

A single P-channel mosfet that is adequately rated to carry the operating current can be driven by a digital output. If the gate of the mosfet is pulled up by a largish resistor, the transistor will be normally off. The processor would hold the gate low while it needed power then raise it to turn off the power.

The power button will need to be held on for long enough for the processor to initialise. People are slow but variable. 10ms - 100ms on a button might be ok.

Do some experiments, find out how long the power stays on when the button is pressed and released. Look at the code and get the HOLD signal active as soon as possible.

Maybe a large capacitor would hold the supply up long enough after the button was released for the processor to get control.

Measure the supply current and voltage and check the voltage needed for the regulator and then calculate the size of a cap needed to supply that with acceptable voltage drop in the time available (I=C*dV/dT).

If the radio isn't needed immediately, a similar arrangement could be used to turn it on, reducing the turn on current so a cap would be more likely to work.

Have fun. Let us know how you get it to work.

Pogo

Thank you :slight_smile: Will look into using mosfet. I saw the video on Make's youtube channel regarding transistors, thought I had it now!! :sweat_smile:

What this circuit is supposed to do is that when the mailman opens the mailbox door, the circuit will start. It will then send a signal to the receiver notifying me about mail. So the lid will be open long enough to send the message, but I am trying to learn so I keep adding more just so I can read more about different components, but also, learn more programming as the code will be more difficult.

After the mailman has opened and closed the lid, and the message has been sent, then the circuit will wait for me top open the part with the lock. It will then reset the circuit :slight_smile: This means I will not get a lot of notifications, only one until I reset the whole thing by unlocking and grabbing my mail :slight_smile:

I made a modification on my circuit now. Also, I will add a resistor between base and output pin. But need to read on what value that resistor should have.

It will work as you want then, once you get the transistor(s) wired properly.

Have fun.

Pogo.

After the mailman has opened and closed the lid, and the message has been sent, then the circuit will wait for me top open the part with the lock. It will then reset the circuit

You see how important context is. Instead of asking about how you think you should solve the problem, telling us what the problem actually is will allow us to propose a much better solution.

The circuit you need is called a flip flop, it has two states and can be flipped into each state with a pulse.
The first pulse you can supply with your push button which will then latch the circuit on and power the Arduino until you send a second pulse, from your Arduino to turn it off.

You can even do this with a thing called a latching relay which operates in the same manner. The best type of latching relay for this is the two coil type, pulsing briefly one coil turns the relay on and pulsing the other turns it off. That way there is zero current drain when it is off.

Latching Relay Info

Hello :slight_smile:

I got an PM from mr. Paul__B helping me with the schematic, thought I'd share it here in case somebody else have these kind of questions :slight_smile:

Paul__B gave me the following things to fix with my circuit;

There are quite a few blunders in that circuit, so it will certainly need a bit of work!

"Q1" is drawn upside down. It confuses yourself and others if you show a ground symbol pointing upward. The ground symbol should be below the transistor and indeed, connect to the emitter, while the "LOCK" connection will be the collector. The current limiting resistor in series with the base is missing as indeed are those for your Vcc switching transistors.

The diodes and resistor to ADC6 should not be there as they would be applying 12 V to that input. Whatever purpose you intended will need to be figured out when the rest of the circuit is fixed.

The "Mailman" and "Admin" inputs should switch to ground, not 12 V. Via diodes, they can pull down the gate of a P-channel FET whose source is BATT+ and whose drain feeds HOLDV. A 10k pull-up would be between gate and source. While you can use transistors, the proper FET makes it a whole lot simpler. Then an NPN transistor with emitter to ground (downwards!) and collector to the FET gate will hold the circuit on when the 22k resistor in series with its base connects to "HOLD".

If you have a go at drafting those things out, we can then check it again to see if you are getting it right.

PS; Thank you for reaching out :slight_smile:

Attached is the new schematic, I did some changes, I read about the voltage divider so I used that 3 places, on the two switches, and on the input that had the two diodes before (ADC6) this is to be used to check the battery voltage.

The Q4 (previous Q1) has been flipped and gotten an resistor, AND is now the right way with the ground symbol at the bottom :wink:

The two switches is still leading positive volt, but do now have an voltage divider so the 7,4V goes to the 7805 circuit, while the divider steps it down to 5V and goes to an input of the chip.

I will be looking into FET and MOSFET as they are after what I read, essential! I have now used a relay. This is not essential since I really want to learn all about this kind of electronics, but I also want to order the PCB so I can jump on the next project :sunglasses:

I actually printed out the schematic and brought an yellow marker to chech it all, so I am glad I got help :art: