Step 1: Disclaimer
Step 2: Design Requirements and Parts List
- Cast Aluminum enclosure with lid (4.5″ x 2.6″ x 1.2″). This was the smallest enclosure I could find that had a lid large enough for the LCD screen I had.
-Arduino Micro Pro. Chosen for it’s insanely small size. It’s barely taller than the PCB itself.
-FTDI cable. The Arduino Micro Pro doesn’t have a serial to USB chip like full sized Arduinos, so you need this to program it. Basically the chip is in the cable.
-USB Lipo Charger. This is a nifty part from Adafruit to charge Lipo batteries. It’s got some protection built in which is good because Lipo’s can be dangerous if you’re not careful. The only thing I don’t like about this board is that it’s kind of large. The charging IC is really small and I think they could have made it smaller. The height is good though.
-DC to DC step up. Everything I used except the alcohol sensor was 3.3v, so this booster let me run 5v to the sensor.
-3.6v, 1200 mAh Lipo battery. Nice and thin, and enough power to run the breathalyzer for a long time.
-128×64 Graphical LCD screen. Since it’s graphical, it allows individual pixel addressing. That meant I could add graphics easily. It also has a backlight.
-MQ-3 alcohol sensor. Weird pinout, but simple to use once you figure it out.
Step 3: MQ-3 Sensor
Step 4: Electronics Testing
Step 5: Enclosure
I then realized that I hadn’t taken the thickness of the enclosure into account for the USB port. Since the port is soldered flush with the edge of the circuit board on the charger, I had to solder some extension wires to it and attach it to another USB port that fit in the hole I milled. Make sure you get the polarity of those wires right or else you'll kill the charging board (like I did).
I noticed that while there was no load on the board, it charged the battery fine. Once I connected the output to the rest of the circuit, it wouldn’t charge. So I was forced to add toggle switch. When you charge, the switch is off and the charger has no load. When you turn the switch on, power is drawn from the battery, but it won’t charge. Because I didn’t have a lot of time to solve this problem, the switch was kind of a quick and dirty fix. You can either use the switch method or find a charging board with a higher current capacity, or implement a more elegant autoswitcher.
Step 6: Software
Here's my code.