Need Help Activating an MP3 with a PIR

Hi Raymond,
My above reply to Djsfantasi is kinda along the path of what you needed to know about the current draw of the mp3 right? Again, I'm not too sure if I'm even reading the DVM correctly though! Yes, I totally get what you're saying about the relay...I will look into it if I can't get this to work.
Between what you folks are saying I hooked up the np2222 to the wrong pole, the PIR output might be too low to trip the transistor and the MP3 might be drawing too much current for it as well!
Jeez, I really need to confront my fear of math and figure out current laws!
Just keep plowing ahead. There are different ways to get that device to do what you want - have fun with it and there are plenty of people here who can help.
 
Again, I'm not too sure if I'm even reading the DVM correctly though!
Yes, it is important to be able to use the meter correctly.

If you start out with the mp3 player hooked up and playing....
mp3 c.jpg

Set your meter on Amps and at a higher scale than you think is needed - even the highest scale you have, like 1 amp, for example. Then, insert your meter into the circuit, like this:
measure current C.jpg

Now, you can move the scale down if needed. It is important that the mp3 player is playing when you read the current.

BTW: I was looking at that little player and ended up buying 5 of them off of the bay for all of about 65 cents US each! Of course, they will take so long to arrive that I may not remember what they are.
 

Thread Starter

Brianaala

Joined Feb 15, 2019
62
Hi Raymond,
Thanks for the visuals! Yeah that's what I did; it was maxing out at 27.5 mA which I'm sure the transistor can handle. I also tried on the breadboard to reverse the transistor as DJ mentioned above to have it flow to ground instead of +5v...it didn't change anything. I think my next course of action will be to go hunting with the meter and see if one of the components (other than the MP3 player) has failed.
As for the GPD2845; they are so super cheap! They work like a charm too; they have an onboard 2W amp and can play any mp3 file. They also seem to accept just about any SD card I have put in so far; from 128MB to 32G.
 
Hi Raymond,
Thanks for the visuals! Yeah that's what I did; it was maxing out at 27.5 mA which I'm sure the transistor can handle. I also tried on the breadboard to reverse the transistor as DJ mentioned above to have it flow to ground instead of +5v...it didn't change anything. I think my next course of action will be to go hunting with the meter and see if one of the components (other than the MP3 player) has failed.
As for the GPD2845; they are so super cheap! They work like a charm too; they have an onboard 2W amp and can play any mp3 file. They also seem to accept just about any SD card I have put in so far; from 128MB to 32G.
Hmmm, well a couple of things.

First 27.5 mA seems very low if the MP3 player is in the process of driving the speaker. It is important that you measure the load at its maximum.

Second, if you miswired the 2n2222 you could have fried it, but you can test it out with a couple of resistors and an LED and see if it is still working.

Yeah, after I looked at it, I thought it could have some use in toys/game/gagets. Having to use a card is actually a bit of pain and adds expense, but many of us have several lower density ones hanging around doing nothing - I know I do.

Keep us posted.
 

djsfantasi

Joined Apr 11, 2010
9,237
Hi Raymond,
Thanks for the visuals! Yeah that's what I did; it was maxing out at 27.5 mA which I'm sure the transistor can handle. I also tried on the breadboard to reverse the transistor as DJ mentioned above to have it flow to ground instead of +5v...it didn't change anything. I think my next course of action will be to go hunting with the meter and see if one of the components (other than the MP3 player) has failed.
As for the GPD2845; they are so super cheap! They work like a charm too; they have an onboard 2W amp and can play any mp3 file. They also seem to accept just about any SD card I have put in so far; from 128MB to 32G.
My post was actually a lot more specific than just switching the transistor position. I questioned your base resistor as well.

To be sure you’ve chosen the correct resistor, we need to know the highest current draw of the MP3 module. I agree with Raymond in that 27.5mA seems to low to make sense. Follow his lead and retest.

As a reminder, this is the relevant part of my post:
rule of thumb for the base current is 1/10th of the current for the load. This is why Raymond has stated that you need to know the current requirement for the load. If you’ve tested the MP3 player as he outlined in post #4, you can directly measure the current by putting a DVM in series with the +5VDC lead to the MP3 player.

Let’s call your measured current I(load). To determine the appropriate base resistor, use the following equation (I’ve used some general values here).

R(base) = (3.3-0.7) / (I(load)/10)

Is the calculated value close to the 220Ω that you have?
 

Thread Starter

Brianaala

Joined Feb 15, 2019
62
Hi folks,
Ok I tested the circuit again with the DVM and here's the issue: I am almost sure that I'm reading this right:
In the section labeled "DCA" which I take to mean DC Amps, it has 4 settings: 200m, 20m, 2000μ, 200μ. The "200m" and "20m" I am assuming are mA? Is that correct? If so it is definitely reading ~24-27.6mA while the MP3 is playing.
 

wayneh

Joined Sep 9, 2010
18,115
Does your meter have a 10A range? This usually requires moving the lead to a special socket on the meter. It should read about 0.03 if you’re really only drawing 27mA.
 
Hi folks,
Ok I tested the circuit again with the DVM and here's the issue: I am almost sure that I'm reading this right:
In the section labeled "DCA" which I take to mean DC Amps, it has 4 settings: 200m, 20m, 2000μ, 200μ. The "200m" and "20m" I am assuming are mA? Is that correct? If so it is definitely reading ~24-27.6mA while the MP3 is playing.
What is the brand/model number of your meter (or a link)?
 
Well, that seems to be what it is pulling - I still find it hard to believe that it could drive a speaker and all the rest and only draw that, but that is what you are reading. [When I get my boards, I hope I remember the thread]

So, now you can go back to @djsfantasi posts and plow ahead - yes?
 

Thread Starter

Brianaala

Joined Feb 15, 2019
62
Hi everyone,
first of all you are all saints for putting up with my ignorance and I'm learning a lot so thank you very much!
OK so there has been a (sort of) new development: I probed around using the volt meter and realized that the Emitter of my PN2222 was only putting out about 1v. So I looked at the datasheets for my components and the PIR can handle 5-20v, the NPN up to 60 on the collector, and the MP3 up to 12, so I upped the input voltage to 12. It worked but the NPN is reading a constant voltage of 3.4 at the base thus the mp3 will play continuously. What have I done wrong?
 

wayneh

Joined Sep 9, 2010
18,115
Hi everyone,
first of all you are all saints for putting up with my ignorance and I'm learning a lot so thank you very much!
OK so there has been a (sort of) new development: I probed around using the volt meter and realized that the Emitter of my PN2222 was only putting out about 1v. So I looked at the datasheets for my components and the PIR can handle 5-20v, the NPN up to 60 on the collector, and the MP3 up to 12, so I upped the input voltage to 12. It worked but the NPN is reading a constant voltage of 3.4 at the base thus the mp3 will play continuously. What have I done wrong?
Do we have the latest schematic?
 

wayneh

Joined Sep 9, 2010
18,115
Hi Wayneh,
The schematic is the same as the original post, I just upped the vcc voltage to 12.
That schematic won’t work with an NPN transistor. You’d need a PNP transistor if you want a high-side switch. I’d prefer the NPN low-side switch but the emitter should be at ground and your load on the collector.

Wait, are you wanting to control power on/off to this thing or just pull a pin on it high or low?
 
Last edited:

Thread Starter

Brianaala

Joined Feb 15, 2019
62
Hi Wayneh,
Ok I put the transistor on the low-side (collector connected to the (-) lead of the mp3, base to 3.3v and the emitter to ground. But the transistor got very hot (even at 5v Vcc)! Do I need a higher resistor to the base?
 

wayneh

Joined Sep 9, 2010
18,115
Hi Wayneh,
Ok I put the transistor on the low-side (collector connected to the (-) lead of the mp3, base to 3.3v and the emitter to ground. But the transistor got very hot (even at 5v Vcc)! Do I need a higher resistor to the base?
It should be fine to use 1k or more there.

I’m not sure why it’s getting hot though!
 

wayneh

Joined Sep 9, 2010
18,115
It will rule out excessive base current as the cause of the heat. You only need about 2-3mA of base current if your load is not more than 30mA.
 

Thread Starter

Brianaala

Joined Feb 15, 2019
62
What is the base voltage before the resistor?
Well, when it was on the (+) side it was reading 3.4v but on the low-side (even with the 1k on the base) it keeps getting really hot so I don't have time to read it.
Since they seem to abbreviate the transistors to 2 letters; how can you tell which type it is? It could be PNp or nPN...
 
Top