Try   HackMD

The plan

Use cases

Powering phone while navigating

Charging a powerbank on the way

Charging a powerbank via a solar panel?

The specs

VinMax=?==20Vpp
VinMin=5.5V?==5.5Vpp

IDCinMax=0.66A[0]

PinMax=13.2W

[0]: Limited by current sensor resistors

Design

Power flow:

0-20Vpp
0-20VDC
Dynamo
Active rectifier
Solar
MPPT step down
Battery controller
USB C out
LiPo Battery
ESP32
Front light
Back light

Data flow:

ESP32
Battery controller
Front light
Back light
MPPT step down
Active rectifier
LiPo Battery

Power input

Single phase AC or DC voltage from 0Hz to theoretically 100kHz.

Active voltage doubling rectifier

Can rectify actively with low rectification losses (

RDSon,max=18mΩ) over MOSFETs or passively over high current schottky diodes.

  • 1.1A input fuse
  • 20VDC voltage clamping
  • Additional input for DC voltages (solar)
  • Input voltage pulse counter for speed/movement detection

Add switch for voltage doubler/full bridge rectification?
Add switch for capacitive voltage divider?

DC/DC MPPT converter

  • Input/output voltage and input current measurement.
  • Controlled via ESP32.
  • Low loss DCDC converter via half bridge MOSFETs
  • 10A single shot fuse for battery
  • !BUCK_SD has to be high for the IC to work

DC/DC step up converter 5V USB

Device name ACT2802b

  • controlled by a powerbank IC
  • 2.2A USB output
  • USB A
  • USB C

USB C for charging?
ST USB C Charging IC Interesting path, but maybe not top priority as the power output is limitited from the dynamo so we won't get near USB C charging speeds.

USB C with PD is not really a viable option as we can not provide the needed power (even without we can do 5*2.2=11W)

DC/DC step up converter 6V lamps

  • controlled by the ESP?
  • "light me home" function, light stays on for 60(?)sec after stopping. Safety feature for waiting in traffic?
  • Can be set to blinking/dimming while standing?

Code

void setup(){
    initAll();
}

void loop(){
    driveBuckConverter(findMaxPowerPoint());
}

idiot is coding

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

TODO

  • Test if programming works
    • Test if serial print works
  • Initialize all GPIO's
    • Check if GPIO's are working properly

L1 - L4 are not working. (wrong pins)

  • Make BUCK converter
    • Open loop PWM (constant pwm)
    • Closed loop PWM
    • Closed loop PWM with flyback MOSFET
    • Maximum power point tracking
  • Turn on and off front and backlight with buttons
    • Feedback over LED
  • Turn on and off USB output with buttons
    • Feedback over LED
  • LED for "battery is charging from dynamo"
  • Dynamo power as output (serial or BT?)
  • [ ]

Improvements

ADC

A lot of variance on the ADC measurements.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Interesting links

Git repository

Git

Datasheets

Theory

Ti document about buck converter calculations.
mppt

https://docs.gimp.org/2.10/en_GB/gimp-tool-foreground-select.html