My hacky way to boost voltage on Tiny13A with zero parts

Hey guys. Made a simple boost converter from Tiny13A. It uses 2 pins and can boost voltage for 2 LEDs. It operates on 1.8 to 3 volts. It only needs tiny13A and an inductor. Since Inductor is just a piece of wire and you will be using the micro for other stuff as well, it’s pretty much a zero part converter :smiley:

video

I am putting it here in a hope somepony will find it useful! :3 Please tell me what you think!

Code:

void boostLed(byte seconds, byte anodePin, byte cathodePin)
{
//A--------.       .------|____|-----K
//    |     UUUUUUU    |    
//    |             L1 |       R1
//    |      \\        |
//    |------|>|-------|
//    |                |
//    |                |                L1=~330uH
//    |                |                R1=220R - 1K
//    |      \\        |                VCC=1.5V - 3V
//    |------|<|-------|                LEDs are green/blue/white

	


	byte DDRout=(DDRB|(1<<anodePin))|(1<<cathodePin);//set both of the pins as output
	byte DDRin=DDRB &~ ((1<<anodePin)|(1<<cathodePin));
	PORTB|=(1<<cathodePin);
	PORTB&=~(1<<anodePin);

	//unsigned long int loopcnt=seconds*100000UL;
	for(byte k=0;k<seconds*10;k++)//inner loops to save space on the device compared to using unsigned long
	{
		for(byte j=0;j<100;j++)//edit those values to calibrate the time in seconds based on your clock speed
		{
			for(byte i=0;i<100;i++)
			{
				//no loop unrolling here, as I am running low on flash anyway...
				DDRB=DDRout;
				_delay_us(9);
				DDRB=DDRin;
				_delay_us(1);
			}

		}
	}
	

}

An inductor and a resistor are two parts. Counting the battery, the micro and the two LEDs, I get six :wink:

Most solar garden lights are based on this approach.

jremington: An inductor and a resistor are two parts. Counting the battery, the micro and the two LEDs, I get six ;)

Most solar garden lights are based on this approach.

Well... I beg to differ. This was not a boost converter project, just a part of a clock project.

I had a micro, a resistor, 2 LEDs, battery and I needed to boost convert.

I used 1 extra part.

I was sharing this so people know this is possible and they don't have to get a boost converter just to boost LED voltage.