Author Topic: MightyHat Schematic?  (Read 4430 times)

Tony Weil

  • Jr. Member
  • **
  • Posts: 60
  • Country: us
MightyHat Schematic?
« on: December 28, 2017, 12:14:17 AM »
Is there a full schematic for the MightyHat available anywhere? I have my new MightyHat all hooked up and really like it compared to the breadboard homemade version I have been running for thr last year.  I am particularly interested in understanding the workings of power in general, battery backup and charging, Pi latched power and the power switch. In some instances, the power switch doesn’t really do anything and I want to understand it better.

Thanks for a great product,
Tony

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat Schematic?
« Reply #1 on: December 28, 2017, 02:30:48 PM »
See bottom of the MightyHat CAD page.

Tony Weil

  • Jr. Member
  • **
  • Posts: 60
  • Country: us
Re: MightyHat Schematic?
« Reply #2 on: December 28, 2017, 06:56:12 PM »
Thanks Felix. I thought I had searched there, but I guess not.

The power design is very sophisticated. I was wondering how one could power from USB/5V jack directly, from a charged battery or from a charging battery.

Recently, I tried to do something similar with some Moteino Weathershield nodes I wanted to be able to power from a 5V wall wart using a barrel connector, (no battery present) or a Lipo battery and or both. If 5V were present, charge the battery using an Adafruit Lipo battery charger and run off the battery. I ended up putting in a manual 3 pin jumper so I could feed 3.7V from the Lipo Battery or 5V from the wall wart to the Vin of the Moteino. Removing the jumper acted like an on/off switch. Not very sophisticated, but it worked.

Tony Weil

  • Jr. Member
  • **
  • Posts: 60
  • Country: us
Re: MightyHat Schematic?
« Reply #3 on: December 29, 2017, 01:42:57 AM »
Here is a schematic and photo of how I built a few WeatherShield Nodes that could run off Lipo Battery, Battery with charging from Wall Power or just Wall Power. This offers a lot of flexibility. In general, I run the nodes off the battery and charge them as needed. The jumper also can act as a simple power switch.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat Schematic?
« Reply #4 on: December 29, 2017, 11:21:36 AM »
Nicely done :)
I made the Power Shield do something very similar. USB charging, 5V boost to Moteino (although it could run directly off the LiPo). Adding the WShield would then make it a 3 stack compact board (size overall dictated by battery).

Tony Weil

  • Jr. Member
  • **
  • Posts: 60
  • Country: us
Re: MightyHat Schematic?
« Reply #5 on: December 29, 2017, 04:54:44 PM »
The Powershield looks nice. Why does the Powershield info say to avoid plugging in USB without a battery hooked up? Will the VBAT or VBAT_SWITCHED voltage not be compatible with the input of the LTC3525 in some way?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat Schematic?
« Reply #6 on: December 31, 2017, 12:42:24 PM »
The USB input goes into the MCP73831 which will try to charge the battery. If there is no battery, weird stuff can happen especially if you plug in the battery afterwards, or if there is a dynamic load on the output of the charger (ie no battery, but the power shield is powering something).

kulozik

  • NewMember
  • *
  • Posts: 2
Re: MightyHat Schematic?
« Reply #7 on: December 14, 2018, 10:51:37 AM »
The USB input goes into the MCP73831 which will try to charge the battery. If there is no battery, weird stuff can happen especially if you plug in the battery afterwards, or if there is a dynamic load on the output of the charger (ie no battery, but the power shield is powering something).
I don't think that is mcp73831 problem. There is a mistake on the schematic.  Drain and source of PMOS1 are swapped. Look at the direction of the substrate diode - it should be the other way around. When you pull out the usb plug this diode should initially start conducting while gate voltage of PMOS1 drops and the transistor takes over. Mightyhat obviously works, but during this switching process voltage on uusb_or_vbat may drop to lower value than you would like for a period of time that would depend on the load. I also suspect you wouldn't need that PMOS2, NCHAN + resistors circuit if VBat of U1 was isolated when powered by usb. Now it is not . Btw I you wanted to disable U1 would be much easier to use Prog input (drive it high).
Please correct me if I am missing something.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat Schematic?
« Reply #8 on: December 14, 2018, 11:50:06 AM »
I don't think that is mcp73831 problem. There is a mistake on the schematic.  Drain and source of PMOS1 are swapped. Look at the direction of the substrate diode - it should be the other way around.
I don't think so.
The PMOS drain goes into the load side. The source has to be determined with respect to gate voltage. To turn the PFET ON, gate has to be below Vgs threshold.
If we swap the drain and source, Vgs won't be satisfied when there is no USB power.

kulozik is correct, my assumption was not. The threshold can be met even with drain and source inverted, which would block VUSB ever getting into VBAT regardless of the body diode drops.
My follow up comment below Uncle Buzz's.
« Last Edit: December 17, 2018, 07:53:44 PM by Felix »

kulozik

  • NewMember
  • *
  • Posts: 2
Re: MightyHat Schematic?
« Reply #9 on: December 15, 2018, 08:33:32 AM »
You forgot about the diode between source and drain of PMOS1. What you wrote  would be true without  that diode which starts conducting in the absence of Vuusb (Source goes in the load side).
Let's assume that Pmos1 is initially in "OFF" state. Vdrain = Vsource + 0.6V. In your example Vgs = -VBat, in mine Vgs = -Vbatt +0.6V. I don't know what pmos transistor you used, but in practice that 0.6V difference would not prevent PMOS1 from switching to "ON" state. Unless of course Vbatt is very close to the threshold and you can't afford to lose 0.6V.  Fortunately you can find transistors with threshold as low as 1.8V or even lower.
« Last Edit: December 15, 2018, 10:55:06 AM by kulozik »

Uncle Buzz

  • Full Member
  • ***
  • Posts: 146
  • Country: fr
Re: MightyHat Schematic?
« Reply #10 on: December 16, 2018, 05:26:41 AM »
To my mind, kulozik is right. On my schematics with a battery charger like this (MCP73831 or MCP73123) I put the Pmos symetrically : When charging, the 5V from usb lock the Pmos gate and avoid the battery (and the charger) to supply some power through the Pmos, and since the 5V even with drop through the diode is higher than the battery voltage, the diode of the Pmos lock the current to go into the battery.
Without 5V, the battery current can go through the diode of the Pmos, and as the gate come to 0V, the Pmos is unlocked.
I use some Pmos wich start to conduct at about 1V like DMP2005UFG, DMP2005UFG, SiA427DJ and equivalents (full opened at 4.5V, but very low Rds at 2.5V), we just have to check the leakage current which could be as high as 10µA on some very low Vgs Pmos.

With your schematics, The ~5V from VUSB_OR_VBAT can charge the battery if to the 2 drops from the shotky and the diode inside the Pmos are lower to 0.8V
I can add than I have no weird stuff happening when there's no battery plugged

Note from microchip : http://ww1.microchip.com/downloads/en/appnotes/01149c.pdf on page 2
« Last Edit: December 16, 2018, 05:47:46 AM by Uncle Buzz »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MightyHat Schematic?
« Reply #11 on: December 16, 2018, 10:28:57 AM »
Thanks guys, I checked the thresholds and there is a PMOS1 body diode drop of -0.8V (max -1.2).
Technically this and the 3A schottky will drop VUSB to below 4V which would prevent VUSB to unintentionally charge VBAT.
But anyway PMOS1 can be inverted with a desirable effect of blocking VUSB in all cases.
I will do this in the next revision.
« Last Edit: December 17, 2018, 07:56:14 PM by Felix »