
D6 is the correct direction, it is in there to only run if the solar is connected backwaysFor starters, your led current limiting resistors seem too high - R12, R37, R40, R42. Eg R40 is limiting on a 3V3 line, so you are supplying about 25uA to that LED.
And is led D6 is reversed?
Yes am i am intending, which is why im trying to seek help from more knowledge people.You need to give more information on what you are trying to do. There are so many mistakes, re- read the data sheets and start again.
I suggest you use a commercially available ESP32 module.
Are you intending to create a pcb for this design?
Thanks for the feedback.As has been said, many issues, some less problematic than others, however there are some very serious issues with your 12v switching on sheet 8.
For a start the MOSFETs you specify AOD4185 are P-channel, but you are using them as N-channel devices, switching the low side of the load, which appears to be your intent, judging by your drive arrangements. As it stands the load will be permanently powered on through the MOSFET's body diode (at least until it expires in a puff of smoke!).
Even if they were intended to be N-channel this may not work reliably. The MCP23008 GPIO extender is operating off 3.3v, so the maximum output voltage is 3.3v but it could be as low as 2.6v (Vdd-0.7 from datasheet). You are using the BC817 as an emitter follower, so the emitter voltage, and therefore the gate voltage of the MOSFET, will always be 0.6v below the base, i.e. 2.0 - 2.7v. This insufficient to fully turn the MOSFET on as they (or their N-channel equivalent, AOD4186, which is what maybe I think you meant) are not spec'd for a gate voltage <4.5v. We don't know what you are driving, but with a 10A fuse at F3 I'd hazard a guess at something drawing up to 1A? At a gate drive of 2.7v (the threshold voltage where the MOSFET is just turning on) the on resistance will be substantially higher than the spec'd 20milliOhms, maybe over 1 Ohm and there is potential for the MOSFET to overheat.
If you had intended to use the P-channel device, which is a common approach for switching the high-side of the load, then this is a suitable arrangement:
View attachment 343897
Now the MCP23008 is turning on Q2 which pulls the gate of Q1 down to approx 2v, or -10v referenced to the 12v rail, turning Q1 hard on and generating little heat. Although you could leave out the zener D1 and just rely on the R1/R3 voltage divider, 13.2v on the original diagram suggests an automotive connection and so the zener is included as good practice to protect the gate from spikes >+/- 20v which could occur.
I would suggest, if you haven't already done so, breadboarding a substantial part of this project (you don't need to do it all at once) to verify it works as intended.
You're welcome. Further to my suggestion, I'd add a 10k resistor from the base of Q2 to ground as well. Why? During reset/power up, and until configured, the GPIO output of the MCP23008 is an input and therefore high impedance. Depending on PCB layout, environment, state before reset, etc. you could get stored energy and/or coupled transients which briefly turn Q2, and therefore Q1, on, which probably would be undesirable.Thanks for the feedback.
ive change my deisgn to look like yours and it makes a lot more sense especailly the diode bit not sure how i didnt realise that.
If u have anything else that is major that i show looka t right away that would be awesome thanks

I'm not sure why you think that? A typical 18v 160W panel produces a maximum of 9A shorted and 23v O/C, the MPPT is typically 8.5A @ 19.5vWhile connecting a solar panel incorrectly with reverse polarity, you may just get away with lighting LED D5.
But connecting an 18V panel with the CORRECT polarity will likely instantly destroy Q1, Q2 and U7 !
If Q2 blows open circuit, it will probably then blow D7 as well....
Look at the 'protection' diodes in U7 & Q2.

I'm not sure why you think that? A typical 18v 160W panel produces a maximum of 9A shorted and 23v O/C, the MPPT is typically 8.5A @ 19.5v
Reversed no current flows, forward biased the MOSFET body diode turns on and then the channel enhancement takes over. The dissipation in the MOSFET is around 1.6W, well in spec on an appropriate heatsink.
Thanks again.I'm not sure why you think that? A typical 18v 160W panel produces a maximum of 9A shorted and 23v O/C, the MPPT is typically 8.5A @ 19.5v
Reversed no current flows, forward biased the MOSFET body diode turns on and then the channel enhancement takes over. The dissipation in the MOSFET is around 1.6W, well in spec on an appropriate heatsink.
View attachment 343991
I agree the mistakes in the OP diagrams make it harder to understand, especially if you've never seen such circuitry before, but the OP has got it essentially correct despite some silly lapses in basic drafting that a little extra proof reading would have uncovered. This doesn't help his cause as many on this forum will just walk away from such. But we all make mistakes from time to time. I try to give people the benefit of the doubt, once at leastI may have been a little dramatic, but.....
Who knows what panel rating is to be connected?
Just another reason that a decent description of what is trying to be achieved on any project is necessary.
U7 - What is it doing? (Also, why U?).
It's reverse diode is permanently conducting current.
What is meant by 'then the channel enhancement will take over'?
The good news is, the diode is rated at 20A on a suitable heatsink.

Again, the incorrect drawing belies its purpose. D7 protects the gate of U7 if the supply voltage rises above 15v by clamping the gate to source - 15v. It carries negligible current eg (supply - 15v)/10k.D7 zener. - No parameter spec. Needs to be rated at ~10amps / 150W continuous for the solar panel suggested.
Anything less and it will be destroyed.
What is it for?
Agreed, Q2 is drawn upside down. Shown correctly above.Q2 - AO3400 is configured so its reverse diode is always conducting.
'Solar Switch' input can do nothing.
Q1 - BC807 is rated at 500mA, 460mW, 45V.
Well now, I will add one more comment.I agree the mistakes in the OP diagrams make it harder to understand, especially if you've never seen such circuitry before, but the OP has got it essentially correct despite some silly lapses in basic drafting that a little extra proof reading would have uncovered. This doesn't help his cause as many on this forum will just walk away from such. But we all make mistakes from time to time. I try to give people the benefit of the doubt, once at least![]()
View attachment 344033
U7/D7/R13, though incorrectly drawn by the OP and correctly so above, is a standard reverse protection building block that I've use extensively on battery powered projects. Its a little confusing at first if you've not seen it before because the P-channel MOSFET (U7, no idea why 'U' either) appears to be used backwards. And indeed it is! Most people don't appreciate that most modern power MOSFETs are actually bidirectional once turned hard on. In this arrangement, when power first applied initially the body diode conducts. The gate pin is tied to ground via a resistor, so is -ve wrt the source pin. As the source voltage rises towards the drain voltage, the MOSFET turns on bypassing the body diode and the total supply current is now flowing 'backwards' through the MOSFET channel. At this point the voltage drop across the channel is only milliVolts (180mV @ 10A or so) so the body diode is non-conducting, and the dissipation in the MOSFET is around 1.8W, well in spec for that MOSFET assuming enough copper under it.
When the supply is applied in reverse, the body diode blocks and the MOSFET remains off, so no current flows and the circuit is protecting what follows.
Again, the incorrect drawing belies its purpose. D7 protects the gate of U7 if the supply voltage rises above 15v by clamping the gate to source - 15v. It carries negligible current eg (supply - 15v)/10k.
Agreed, Q2 is drawn upside down. Shown correctly above.
However, this is one area I think is actually wrong, It's purpose is to turn the solar charging off, by shorting gate to source of U7 with Q1, driven by Q2. But as soon as U7 goes off the body diode starts conducting and pulls the LOAD voltage to a diode drop below VSOLAR. I tried an LTSpice simulation of this and it agrees with me. That why I suggested a second MOSFET as per post #9 above.