Help with modifying solar light

Thread Starter

deanfourie

Joined Nov 6, 2022
13
Hi Guys!

So, I’m not usually a fan of Solar, but in this particular situation I have no real choice!

I’ve got these super bright LED solar lights, and I want to customize them to work with a simple on/off switch, AKA an ESP32. The issue is they have 3 settings of brightness and also they work off motion.

What I want to do is to disable the motion sensor completely, and leave the solar charging working. But basically just be able to turn the light on and off. Ideally from an ESP GPIO but if all else fails, from a relay.

I’ve tried driving the LEDs directly off the battery but it’s no good, they are too dim. I’m guessing I need to go through the MOSFET to drive them at full brightness.

Could any smart cookie here tell me where I need to wire in order to achieve the above. Basically just like + through the MOSFET then I can maybe switch the negative with a GPIO?

I’m not great with electronics at this level so any help with this is much appreciated.

Thanks!

pcb1.PNGpcb2.PNG
 

Ya’akov

Joined Jan 27, 2019
9,152
Welcome to AAC.

There is no reason why the LEDs would not be full brightness if you are applying voltage directly to the anodes and cathodes. The lithium cell will provide, nominally, ~3.7V which is certainly enough to forward bias the LEDs.

You’ll need a current limiting resistor to avoid overdriving them.

On the other hand, the output of the PIR chip is probably your best bet for GPIO control of the light. It will already be at the right level, and it is designed to turn on the light. If you cut the trace and apply 3.3V there you can see if it works the way you want. Which chip are they using for the PIR?
 

Thread Starter

deanfourie

Joined Nov 6, 2022
13
Thanks, I'm not sure what chip. There actually a full teardown and explanation of this light here.


The problem is there is a still a switch which selects modes. You can push the switch and it will select between 3 modes, bright, half bright and half bright always on.

Literally the only reason I need the board still would be for the solar charging, other then that its wasted space and to close the giant hole up for the pir :p

Thanks!
 

Ya’akov

Joined Jan 27, 2019
9,152
Well, it‘s a terrible light. But basically you can hijack the charging circuit and MOSFET switch like this:

1681814411227.jpeg
1. Cut the trace here to isolate everything but the charging, LED array, and MOSFET.
2. Cut the trace here to isolate the MOSFET from the MCU and connect your GPIO to the MOSFET side
3. Cut the trace here to make the load on the 18650 cell and MOSFET more reasonable but probably still high.
(You can remove one of the resistors instead, or even cut it with nippers.)

You will also have to connect the 0V (ground) from your MCU to the 0V on the board. You can do this at the lithium cell minus connection.
 

Thread Starter

deanfourie

Joined Nov 6, 2022
13
Well, it‘s a terrible light. But basically you can hijack the charging circuit and MOSFET switch like this:

1. Cut the trace here to isolate everything but the charging, LED array, and MOSFET.
2. Cut the trace here to isolate the MOSFET from the MCU and connect your GPIO to the MOSFET side
3. Cut the trace here to make the load on the 18650 cell and MOSFET more reasonable but probably still high.
(You can remove one of the resistors instead, or even cut it with nippers.)

You will also have to connect the 0V (ground) from your MCU to the 0V on the board. You can do this at the lithium cell minus connection.
Wow thanks this is great!

One question, I notice that youre cutting the 3v4 reg out? Wil that still work?

I may power the ESP using that 3v3 reg rather then from 5v, is that possible?

Also, could you possible show me where to cut these traces on the other PCB image, I'm not great with electronics of this level haha.

Thanks
 

Ya’akov

Joined Jan 27, 2019
9,152
If you try to power the LEDs and your MCU from that rather anemic 18650 your battery life is going to be quite poor. The 3v3 regulator is the on-board MCU power supply and isn’t needed any more if you are just going to take over its functions.

If you want to keep the regulator, cut the trace on the other side of it, and the traces that go to the Vcc of the MCU and PIR.

If I get some time later I will make up the photo, it‘s a busy day today.
 

Thread Starter

deanfourie

Joined Nov 6, 2022
13
If you try to power the LEDs and your MCU from that rather anemic 18650 your battery life is going to be quite poor. The 3v3 regulator is the on-board MCU power supply and isn’t needed any more if you are just going to take over its functions.

If you want to keep the regulator, cut the trace on the other side of it, and the traces that go to the Vcc of the MCU and PIR.

If I get some time later I will make up the photo, it‘s a busy day today.
Oh ok I did wonder about this and what would be the most efficient way to do this.

So you recommend not to power the esp from the 3v3 reg and rather power directly from the battery?
Also power it via the 5v supply rather then the 3v3 I take it?
 

Ya’akov

Joined Jan 27, 2019
9,152
Sorry for the delay, here’s the PCB markup. Please do double check against the schematic to be sure it is correct. I am as sure as I can be, but just as with writing proofreading is smarter than I am.

1681991781086.jpeg
 

Thread Starter

deanfourie

Joined Nov 6, 2022
13
Thanks for this!

Do you recon you could also show me where to connect if I wanted to utilize the PIR sensor onto a GPIO on the esp32 aswell?

Thanks!
 

Ya’akov

Joined Jan 27, 2019
9,152
Thanks for this!

Do you recon you could also show me where to connect if I wanted to utilize the PIR sensor onto a GPIO on the esp32 aswell?

Thanks!
You will need to leave the 3v3 regulator connected so you should cut the trace marked G to isolate the MCU from 0V as the easiest way to disconnect its power. Cut the trace at X and you can connect to the pin of the PIR that it comes from.

1681996162428.png
 

Thread Starter

deanfourie

Joined Nov 6, 2022
13
But if it's asleep, then it's not doing Wi-Fi, which I assume is the reason for using an ESP rather than Arduino or simply a toggle switch.
It will sleep at sunrise and wake at sunset.

That way when the light is solar charging the esp is off allowing for maximum charge
 

bassbindevil

Joined Jan 23, 2014
828
Well, if you have an ESP32 already, you can try and see if it's efficient enough. If it isn't, apart from BT and Zigbee (used by Philips Hue devices), there's also Mysensors, which just needs an Arduino and a low power radio module:
https://www.mysensors.org/build/connect_radio
It's possible to bridge Mysensors to be controlled by Philips Hue:
https://forum.mysensors.org/topic/6510/mysensors-hue-bridge
Of those options, Bluetooth might be the easiest to set up, but something that you control over WiFi and a bridge would be more flexible and powerful; you don't need to be within Bluetooth range of the lights, and you can have voice control or scheduling using your smart devices.
 

Thread Starter

deanfourie

Joined Nov 6, 2022
13
Well, if you have an ESP32 already, you can try and see if it's efficient enough. If it isn't, apart from BT and Zigbee (used by Philips Hue devices), there's also Mysensors, which just needs an Arduino and a low power radio module:
https://www.mysensors.org/build/connect_radio
It's possible to bridge Mysensors to be controlled by Philips Hue:
https://forum.mysensors.org/topic/6510/mysensors-hue-bridge
Of those options, Bluetooth might be the easiest to set up, but something that you control over WiFi and a bridge would be more flexible and powerful; you don't need to be within Bluetooth range of the lights, and you can have voice control or scheduling using your smart devices.
Yea I have reserved myself from any HUB based setups to be honest. HUE, Zigbee etc and i've primarily stuck with ESPHome and it has been bulletproof since and does not require any internet connection or cloud based shannigans.

Thats why I mainly use the ESPs and I hardwire 99% of my stuff, nothing runs on battery except for on this occasion.
 
Top