Mon 25 February 2013

Desperate times

Desperate times1 call for desperate measures2:





1 late sunday afternoon, nearly dead battery and a charger cable broken in the worst possible spot: 2mm from the connector

2 perfboard, solder, ziptie, electrical tape and bit of wire


Wed 04 July 2012

r0ket as Universal Charger

Here’s another nice use case for the µc³ r0ket:

Since it features a build in 3.7V LiPo cell and a fitting charging controller the r0ket basically can be used to charge LiPo or LiIon single cell batteries found in phones, media players, cameras or even toy helicopters.

After I realized that I had forgot to charge my camera and didn’t bring a charger to the easterhegg either I was happy that I already had set up one of my r0kets for charging external batteries.

First you have to unplug the build in LiPo battery and attach the VCC (right) and Ground (middle) pins to the appropriate pins of the cell you want to charge. If the battery you are about to charge has a temperature sensor connect it to the leftmost pin on your r0ket. Otherwise connect the left and middle pins with a 10k resistor.

With the voltage l0dable you will even be able to monitor the charging progress.

WARNING: This setup is only meant for single cell LiIon or LiPo batteries. Bad things will start to happen, if you try to charge multiple cells in series. Also keep in mind that lithium cells can burn or even explode if not handled properly, so always be careful and don’t blame me if you fuck up your carpet.

charging a camera battery


Sun 21 March 2010

Ixus Remote Control Cable

The alternate CHDK firmware I am running on my Ixus 55 gives you the possibility to remote trigger the camera with a modified USB cable.

By attaching this cable to an Arduino board you can control your digital camera in all kinds of projects.

The aim

The camera should take pictures when the arduino “tells” it to do so. Since this is only a proof of concept right now, I will be using a button that is attached to the arduino as a trigger.

Basic layout

The button and the USB cable are wired up like this to the arduino:


The following code will make the arduino power the USB cable for 10ms when the button is pushed.



const int camPin =  13;    // USB pin 1 connected to digital pin 13
const int buttonPin = 7;   // vcc of button
static int pressed = 0;    // variable to remember button state
int buttonState = 0;       // initialize button state 

void setup()   {
  pinMode(camPin, OUTPUT);          // initialize camPin as output
  pinMode(buttonPin, INPUT);        // initialize buttonPin input
  digitalWrite(buttonPin, HIGH);    // set buttonPin to high 

void loop()
  buttonState = digitalRead(buttonPin);

  if (buttonState == LOW && pressed == 0) {		// as soon as the button is pressed
    pressed = 1;					// pressed state is set to "1".
							// This way the following commands will only executed once,
							// regardless how long the button is pressed.
    digitalWrite(camPin, HIGH);				// set camPin to high
    delay(100);                  			// wait for a 1/10 of a second	
    digitalWrite(camPin, LOW);    			// set the Cam off	

  if (pressed == 1 && buttonState == HIGH) {            // reset pressed state, as soon as the button is released
    pressed = 0;

The camera script

Now the camera has to take a photo as soon as the arduino powers up the USB port. This is archieved by activating the remote capabilities in the cameras CHDK menu at Main Menu > Miscellaneous Stuff > Remote Parameters > Enable Remote and loading this simple remote script.