07/03/2014 at 21:58 •
I added load sharing to the charger so that the device can run off USB (or any other external 5V supply) or off the battery. Either external or internal power are then fed into a pololu 5V step up/down regulator. Here's a picture of the charger circuit and the explorad board:
In the above picture, the battery is supplying power (the red wire from the Teensy is open, upper left corner). After a while (1h 15m), I connected the charger to the Teensy to give it 5V from USB, so it switched to that supply line and started charging:
It stopped charging after about 6h, but the device was still supplied from USB. So I disconnectd USB power again (6h 15m) and the battery was used again. The was no power loss in between, so I can connect or disconnect external power while the device is running.
I have no idea why the readings were so flaky, but it might be due to the very old battery. I'll see if I have a newer one somewhere.
07/01/2014 at 21:02 •
All parts are here, I can build the charger circuit.
The first step was to build the charger - without load sharing - on a breadboard. These are the parts I used:
- An old Siemens S65 phone battery: Li-Ion, 700 mAh. It has a third pin in addition to + and -, which is connected to an internal NTC (I think) to ground (I think). It can be used to measure the battery's temperature.
- an MCP73832-2ACI-OT battery charger chip and capacitors for input and output,
- a low-current LED with a 1k resistor to indicate the charging status,
- a 10k resistor to set the charging current to 100 mA,
- a 10k pull-up between the battery's thermistor and 5V. Together, they are a voltage divider that is used to generate an input signal for an ADC.
An AVR is measuring both the battery voltage and the thermistor divider voltage and outputs them over USB serial, to be logged on my computer. The battery is currently charging and I'll post a plot of that later if it doesn't catch fire until then. To make sure that the battery temperature rises during charging, I've placed it in my computer's warm exhaust air.
06/08/2014 at 20:38 •
I finished the enclosure by adding cutouts for a switch, the USB cable, and an extra reset/program button for the Teensy.
The perfboard is also finished for now, I'll only need to modify it again when I add the touch wheel. The buttons are now connected to a PCF8574A, because I might need I²C later anyway. Here's a picture without the Teensy and cables:
And one with the Teensy and the cable that goes to the main device:
The small switch in the lower right corner will later be used to enable power.
When the code really locks up, the Teensy downloader can't just reset the board over USB, so I added an extra reset/program button that can be accessed without opening the enclosure. It sits next to the user buttons and can be pressed through a small hole in the front which was not yet drilled in this picture:
A very simple piece of example code has shown that everything is hooked up correctly (I can read the buttons).
06/03/2014 at 13:35 •
I cut out a piece of perfboard to fit into an enclocure that is comfortable to hold in one hand, added mounting holes, decided where the buttons should be and drilled holes for them into the enclosure:The buttons will be through-hole devices, but mounted on the soldering side. That allows me to put the microcontroller and all support circuitry on the other side and when I push the buttons, their solder joints are pushed into the PCB instead of being pulled out (I've made bad experience with that).
(The image should be upright...)
05/31/2014 at 13:03 •
Today I removed the small buttons board from the explorad breadboard to a new breadboard with a Teensy 2.0:
The yellow wire is the Serial1 Tx line (TTL, nothing fancy like RS232).
The code currently just debounces the buttons and sends a short string over Serial1 at 9600 8N1. Example:
b 0 0
means that button 0 (left) has been pressed. No further string is sent for that button until it is pressed again. The second '0' means that this was an "initial" press, not a software repeat (which I plan to implement), so
b 0 1
would mean that button 0 was pressed, and the software inserted a repetition.
There's still plenty of space for more hardware, like the LiPo charger, touch input hardware, and so on.
05/28/2014 at 22:22 •
The explorad or the input device must contain a power supply. As the whole device will be mobile, I need to charge it without too much hassle. While the explorad should stay mounted on the telescope, the input device can be detached.
If the input device contains the LiPo battery, it's probably easier to charge the battery. There are small charger ICs for that purpose, and I even found an example of a circuit that uses the MCP73831 and provides load sharing - it can charge the battery from USB and at the same time supply the load:
As the load requires 5V, I will need a step-up converter. They are readily available as small modules. Furthermore, the Teensy 2.0 can be used to control charging and send status information to the main device.