Just wanting some advice on the above setup thanks.
I’ve made simple setup where if someone triggers the motion sensor, it plays a lightening & thunder sound on the mini mp3 player. The sound causes the leds to flash on and off via the mosfet. Triggered by the sounds levels.
I would like the set up to stay in place for a decent time and to prolong the life of all the parts.
Can anyone see any part that they would improve from a safety / prolonging the life of the components? I fell I should have a resistor on the speaker out to Arduino AO. But I’m not sure what one?
Apart from the redundant A0 connection, looks ok. I personally don’t use a divider to DFR RX, just 1k in series. What vol setting in the DFR code? I rarely go higher than 20 to minimise risk of distortion.
I'll give you my usual advice. If you are building a circuit on a breadboard, use a breadboard compatible model of Arduino, like a Nano, instead of an Uno (or Mega or Due) which is physically (rather than electrically) incompatible with breadboards
The 10K resistors are in the wrong place. The circuit probably still works ok, but it's more correct to use the 10K to pull down the Arduino pins, not the MOSFET gates.
Does that make any difference? Yes. In the way you have connected them, the 10K combined with the 470R make voltage dividers which will reduce the voltage at the MOSFET gates from 5V to around 5*10000/(10000+470) = 4.8V. So only a small drop in this case.
The higher the voltage at the MOSFET gates the better, to reduce the on-resistance of the MOSFETs to a minimum, which gives maximum brightness to your LEDs and minimum heating of the MOSFETs.
I am using the AO connection as my sound from mp3 to the Arduino so it can trigger the leds. I’m guessing I should probably be using the TX instead. Is that what you would do?
Regarding the leds current use. I’m not entirely sure, plus I’m now going to add 5 led strips instead of 2. I’m using 5m 30 led per meter strips. Power in is 12v 5 amps. I’m working on the principle that as long as I have enough amps then the leds should use the current they need. Is this sensible?
Thanks for the feedback.
So I should re-position the 10k resistors on the mosfet gates to where the pin leaves the Arduino before it gets to the mosfet?
I put the resistor at the mosfet gates based on this video ( see 2 mins )
OK. That is fine but for protection, I would put a 1K resistor in series with the connection.
Are you Using it to modulate the intensity with PWM or turn them on/off?
I’m working on the principle that as long as I have enough amps then the leds should use the current they need. Is this sensible?
Yes that is true but most solderless breadboards can't handle more that 1A. You need to check the current.
In that video, there is no resistor between the Arduino pin and the MOSFET gate, like your 470R resistors, they are directly connected by wire (which is not advisable). In that case the 10K is both between the gate and ground and also between the Arduino pin and ground. There is no difference.
But you, correctly, have a current limiting resistor between the Arduino pin and the MOSFET gate. So it makes a difference where you connect your 10K pulldown.
If you see my image here. I the mosfet on the left is the original setup. The one on the right now has the 10k resistor shifted to before the 470 ohm one. Is this correct? As you were suggesting?
The 10k pulldown resistor should be connected between the output pin and ground, 470R gate resistor between output pin and gate. Pulldown resistor should not be connected directly to gate.
So the total current will be (8 x 6)/12 = 4A. You are OK!
Should I be thinking of a heat sink?
Let's see. The current is 4A. the MOSFET resistance is 0.025Ω,
The power dissipated as heat will be 4² x 0.025 = 0.4W. No heatsink needed but they will get warm