Frosty Flake controller for Cooler Master Storm QuickFire Rapid keyboard

After a sudden brain wave last week I had been googling to see if anyone of the mechanical keyboard models had easily modifiable firmware and realized that the very keyboard I was typing on had a removable daughter board… and there was already a ATmega32U2 (note U2 & not U4) replacement controller available for it called the Frosty Flake.

I ordered one of these and will be documenting my changes to the firmware here. Here are a few photos of it next to the original board (thinner and flimsier).

I also decided to remove the top plastic cover on my keyboard to give it a more naked look and taped up the controller to avoid shorting it. I plan to make a transparent acrylic laser cut cover for the Frosty Flake.

01d135d9843b976dcbb92e615f0c9c0427f32cd37b

Advertisements

Power Raspberry Pi directly with Lithium Ion rechargeable batteries

From reading Adafruit’s excellent dissection of the (then new) RPi Model B+ power supply I had learnt (from the schematics) that 5V GPIO pin was directly connected to RT8020AGQW step down DC/DC converter (5v to 3.3V/1.8V) which automatically switches to a low-dropout mode.  So it should be possible to power a RPi B+ with much less than 5V at the GPIO 5v pin. Relevant excerpts from the data sheet:

Two operational modes are available : PWM/Low-Dropout auto-switch and shutdown modes. Internal synchronous rectifier with low RDS(ON) dramatically reduces conduction loss at PWM mode. No external Schottky diode is required in practical application. The RT8020 enters Low-Dropout mode when normal PWM cannot provide regulated output voltage by continuously turning on the upper PMOS.

Rds_RPi

Since I did not have the right equipment to test for this at that time I tried calculating it from the datasheet. Assuming a worst case Rds of 0.5 ohms for the PMOS at a current of 700mA (model B+, camera module, USB wireless) I get a voltage drop of 0.35V across the PMOS. So if we ideally want 3.3v at the output, then VIN should be 3.65V. At this point I should add that I am not completely sure if that is the correct way to estimate the dropout.

Now that I own an adjustable power supply I wanted to test that out. The only RPi I had on hand was a model A+ so thats what I used.

DISCLAIMER: All numbers below are from a very rough test and come with no guarantees. This means that if your house burns down or something terrible happens because of using something I said then I am not  to blame for that.

Test A:

I tried booted the RPi at 5V, with a keyboard and HDMI monitor connected. Then I launched Minecraft (wish the RPi foundation included a stability testing benchmark) and started lowering the voltage. For the short duration of time that I tested I was able to run without any brownouts at 3.5V. Going lower to 3.4v or even 3.45V would cause random reboots, which brings us to the next test.

01945a9c7fc4c34230ff0884c13f99afb23d015780

Test B:

While the RPi was rebooting I increased voltage back to 3.5V but noticed that was not sufficient and the RPi stayed stuck in a continuous reboot cycle. I was able to see the RPi booting up messages but at some point during that it was get reset. In hindsight I should have tried to make a video to figure out when exactly the reset happened. I next tried 3.6V which also did not work. I was only able to stop the reboot cycle at 3.7V.

01a07dcba2cc9da5ee10bc21b2964d116874a85c34

Test C:

Next I unplugged the keyboard and plugged in wireless dongle and again tried lowering the voltage. I was able to sustain a download over wifi with X server loaded at 3.5V.

Conclusion

The calculation was fairly accurate and as expected the model A+ was able to operate at a lower voltage than calculated because of using less current.

Coming back to the title of this post, I went down this path because I wanted to minimize components and was wondering if I could directly power the RPi for my remotely controlled home rover from the Li Ion battery. Searching for lithium ion battery discharge curves I see that at 1C rate reaching 3.5V would be somewhere in the 60% to 80% discharge capacity of the battery. So if I want to use the full battery capacity I should use a step-up converter, but if I don’t care about that I should be able to power up a Rpi with a lithium battery connected directory to Vin. Monitoring the current and voltage to the RPi might also be a good option to ensure stability to raise early warning if the voltage goes too low.

Relevant products:

Adafruit INA219 breakout to monitor current and voltage to the RaspberryPi.

CPS-3205 power supply bought from ebay