I set out to create a device similar to the LEGO Powered UP Hub but with more features including, more ports, rechargable battery, and programmable firmware.
PCB Design
Housing
Features:
- 3 motor ports, PWM at 9v
- ESP32
- Female 6x2 IO pins to ESP32, ground and 3.3v
- Full bridge rectifier to handle wrong polarity
- Power button (that allows ESP32 to turn itself off)
- (optional) Boot button to allow writing firmware
- 7.4v battery (2x 3.7v in series) with battery charging and balancing
- UART header for firmware updating
- (if space allows: USB port for firmware updating with USB to serial. If no space, UART header is fine)
- Status light
- Battery voltage sensing
- Power connected sensing (if space allows. Not vital)
Power
- Input should be between 7v-10v. The full-bridge rectifier will drop the input voltage.
- 9v boost regulator, such that the motors are always running at 9v
- Seemless switching from battery to input power, also when motors are running
- 3.3v regulator for the ESP32
- Battery is a 7.4v battery (2x 3.7v in series). The charging circuit should handle over-charge, over-discharge, and over-current. The battery should be safely charge.
- Motors, at 9v each use max of 2A stalled current (unlikely), 100mA no load current. 3 motors in total.
- ESP32 at 3.3v, max current 250mA
Battery charging safety concerns
- The charging circuit should be okay with frequent power input disconnects.
- The circuit should not be constantly charging the battery. Only when battery drops below 60%, programmable.
BMS
We could use a separate BMS pcb instead:
Source: https://www.aliexpress.com/item/1005006110205675.html
Battery
Source: https://www.mylipo.de/Lipo-Akku-600mAh-74V-30C-60C-JST-Stecker
- Voltage: 7.4V
- Capacity: 600mAh
- Weight: approx. 34g
- Dimensions 48 x 25 x 17mm
- Configuration 2S1P
- max continuous load 30C = 18.00A
- short-term load 60C = 36.00A
- JST-XHR Balancersnschluss
- Charge 3C = 1.80A if you have to be quick
- (our charging recommendation 1C = 0.60A)
- Supplied with JST connector