XIAO Voltage Drop 240829

Hello Arduino forum,

Have bread boarded the schematic shown in JPG
titled 'Closet Seed XIAO SAM SD12.

The circuit employs a PIR to send a signal
to the XIAO microprocessor to saturate
a MOSFET that opens the gate to four
12 volt LEDs that are bright enough
to light a walk-in closet.

In the past the method was to load
the breadboard, power the circuit
and wonder why 80% of the time the
system did not work.

So a method building and testing
has been adopted.

First the PIR was installed and
powered and the output of the PIR
was tested positive at 3.3 volts.

Then the 7805 voltage regulator
was put in and that it was confirmed
that the 7805 was receiving 12 volts and
outputting 5 volts.

Next the XIAO MC was installed
with the sketch Closet_ATtiny85_240120.ino,
attached herewith, and after it
was noticed that XIAO power indicator
LED was lit a resistor and 5 mm LED
(D1 on the schematic) was connnected to pin 3 and
D1 began to oscillate at the programmed
interval.

A second resistor/LED pair was then connected
to pin 3 of the MC which is timed to
send a signal for twenty seconds.
The LED showed that the MC was sending
the signal that is designed to go to
the Gate of the MOSFET and was
confirmed that the signal is 2.6 volts.

Finally the MOSFET was installed and the
and the MC pin 3 connected to the
MOSFET Gate as shown in the schematic.

But for some reason the 12 volt LEDs
will not light.

The lead to the 12 volt LEDs was
moved from the MOSFET Drain to
ground and the lights came on.

The MOSFET was tested and replaced.

The signal at the MOSFET Gate reads 2.6 volts
when the MC is sending a signal.

When the 12 volt LEDs are not connected to
the system the voltage between the 12
volt rail and the MOSFET Drain is
11.8 volts but when the 12 volt LEDs
are applied the voltage the power
rail and the MOSFET drain drops to
6.8 volts.

Tests of the 12 volt LEDs with a
5 volt power source shows that
5 volts will not make the
12 volt LEDs light.

So what about plugging the 12
volt LEDs makes the MOSFET
Drain drop to less than 7 volts?

Thanks.

Allen Pitts

Closet_ATtiny85_240120.ino (3.7 KB)

Vgs(th) for the IRF540Z is listed as 2-4 volts. If you're only seeing 2.6V on the gate, the MOSFET likely isn't turning fully on. Perhaps try an IRL520N with a Vgs(th) of 1-2 volts?

Hello van_der_decken and the Arduino forum,

Today the IRL520N arrived from Mouser Electronics
and was installed in the breadboard application
of the schematic shown in JPG
titled 'Closet Seed XIAO SAM SD12'.

The circuit now operates as designed.

Shout out to van_der_decken for the
excellent solution.

Thanks.

Allen Pitts

PS. An installation of the Closet circuit was
adapted as an under-cabinet installation
as shown in
Closet_ATtiny_Undercounter_Install_Doc_240109.jpg
(Note: The schematic shows nine LEDs. The
installation employs eight LEDs.)

There are two major differences between the
Closet breadboard (post#1) and Under Cabinet install

  1. The Closet breadboad uses an Seeed XIAO SD12.
    The Under Cabinet uses an ATtiny 85.
  2. The Closet breadboad operates four lamps.
    The Under Cabinet operates eight lamps.

The difference in microcontrollers
is ignored since they both have the same function
and operate the same.

The Under Cabinet operates eight
bi-pin disc LEDs
Part Number G4-xWHP21-DAC-HH
G4 LED Light Bulb - Bi-Pin LED Disc - 20W Halogen Equivalent - 350 Lumens - Single / 10-Pack | Super Bright LEDs
The LED discs are 12 volt, 3 watt lamps that pull .25 amps each.
So eight of them draw 2 amps.

When first installed the lamps were quite bright, we will
call this Bright X. After a few weeks the Under Cabinet
install would come on at Bright X and then after about
ten seconds, dim to Bright Y. Now after three months
the Under Cabinet install comes on at Bright Y.

It is surmised, because Under Cabinet install operates
as designed, but in diminished capacity, that the
defect is, as it was in the Closet circuit that is solved above,
in the voltage or current going to the lamps.

The plan is to replace the IRF540Z with the IRL520N
and see if a replacement transistor will solve the
issue with the lamp brightness.

Bad plan.
For the Closet breadboard, you need to find a MOSFET with a Low Maximum Rds(on) specified at a Vgs of 3.3V or less, otherwise you will have similar problems

For the under cabinet you should find a MOSFET with a Maximum Rds(on) of 175mohms at a Vgs of 5V or less or you will have the same problems.