I wanted to make a as cheap as possible game console to carry with your keys, rechargeable and easy to flash without soldering.This is the first prototype of that idea that is based on the Attiny 402, it uses an LIC as battery and the microcontroller itsefls controls the charging with a mosfet.The capacitor gives around 40 min of gameplay with a 5 min. charge.
You can download and test the game here, it should work on any attiny series 0, 1 or 2 just change the pins number to fit the micro you use.
So far the state of the project:
Finished / pros:
- Cheap and use very few parts
- Rechargeable, the LIC works really nice and it recharges quickly, also no dropping.
- The microcontroller manages the charging so no need to add a voltage regulator.
- It can be flashed with the usb cable, not standard though, UPDI needs to be feed intro the D+ signal of USB with a flashing solution like serial to UPDI, I know it isn't standard but it is very convenient and it works really well.
- Now charging works ok using a mosfet controlled by timer A.
- Sleep is implemented.
- Watchdog is implemented to wake up from sleep every 4 sec. checks if device is charging and if the voltage is below 3.8v and above 2.2v to protect the LIC.
(also resets if hung)
It can be flashed using a usb to updi solution feeding the updi signal in the D+ signal of the usb cable.
To do / cons:
- Need to tweak the voltage regulation to use a N-channel mosfet.
Actually I'm using a P-channel because I have in stock, it isn't the end of the world since we are working with 5v, nothing will blow.
Comments