@alialiwa20054:gaynormccownhackclub: Gaynor McCown Hack Club :gaynor-mccown-gradient: OnBoard :onboard: NFCard!
@karmanyaahm7+Ok I spent 5 hours last night trying to figure this out, but what worked was just sleeping. I woke up a Eureka moment regarding this power ORing design.
So, I have a battery (say +3V min) and USB (+5V). I want to drive VDrive from the USB when it's connected, else the battery. img1 is what Unexpected Maker's feather s3 does. img2 is the most basic ORing design.
img2 will mix the two inputs in the right way because the battery has a lower potential. The BATT Diode has one job: Protect the battery from charging directly through USB. Then, because the battery has a lower potential, the battery won't push current. i.e. when USB is plugged in and VDrive is 4V (assume diode voltage drop of 1V), because the Cathode of the diode is more positive than the Anode, VDrive is 4V & BATT is 3V. So, no current will flow from BATT to VDrive.
When USB is unplugged, pretend that half of the circuit doesn't exist and BATT powers VDrive. However, Vdrive will be at 2V, because the diode drops some voltage from BATT.
Now, why is img1 better? it seems more complicated. But, the trick is that instead of a fixed voltage drop, turning the MOSFET on causes the drop to be ~100 mOhms. At 1A, that is a .1V drop - significantly better than the diode - not only does it save energy, it allows you to use the battery down to a lower voltage.
There are 3 states to this MOSFET arrangement:
1. VUSB is 5V, VBAT is 4V. G > S. Transistor does not conduct. Additionally, since S > D, no potential gets applied backwards onto the battery.
2. VUSB is 0V, VBAT (D) is 4V. G = S = 0. Now, since S < D, current can flow across the body diode. This brings S up to 3V.
3. Now - S = 3V, G = 0V, G < S and the MOSFET is enabled.
4. If VUSB is enabled again now, go back to step 1.
None of this probably makes any sense but I should clean it up and write a blog post.
@alialiwa20054OnBoard 2023 | Day 4 :onboard:
Today, I designed my Computer Scientist NFC card! :hack-cat-ali-a-saleh:@alialiwa20054OnBoard 2023 | Day 3 :onboard::gaynormccown: Gaynor McCown Hack Club :gaynormccownalt: NFC card.
💡 Stunning, innit?@alialiwa20054OnBoard 2023 | Day 3 :onboard::gaynormccown: Gaynor McCown Hack Club :gaynormccownalt: NFC card PCB front.
@leom7+Demo of partially functional PCB business card!@alialiwa20054OnBoard 2023 :onboard: Day 2 |
Schematics Rev 2.0!
@alialiwa20054NFCard PCBs first schematics draft for Hack Club OnBoard 2023