Category: DIY (Do-It-Yourself)

3-LED flip-flop circuit

I made this circuit sometime back and I am still unsure of how it works. I saw a 2-LED version from Talking Electronics and tried this 3-LED version. All the explanations I found online are confusing. Apparently, one of the capacitors drains charge from its side of the circuit and switches off its transistor. The resistor connected to it ensures that it accumulates charge slowly. While this happens, it turns on the transistor on another side of the circuit. When that transistor turns on, the its LED lights up. When the first capacitor is fully charged, it stops supplying charge to this transistor and its LED turns off. By this time, its capacitor is accumulating charge and turning on another transistor and the LED connected to it turns on. This repeats one after another. At least, that is my understanding. It could be wrong. The flip-flop delay is controlled by the capacitor and resistor values. The voltage supplied to the circuit should be just enough to light up one LED.

Electronic Dice circuit using Arduino Uno

A re-creation of a e-Dice found in a children’s book

Some years ago, I went to a book exhibition where they literally sold imported books by the kilo. I am not speaking metaphorically. They sold books by weight. One of the books I bought was a children’s book. It had a circle-shaped plastic electronic toy stuck to the cover. It was an electronic dice. It cut through all pages and you could play a different board game on each of the pages in the book using the dice.

The dice construction was simple. Several LEDs were placed in a circle. When you pressed the center button, the LEDs lit up one after another along the circle. The dice also had a clear-plastic membrane speaker. The whole thing was powered using button-cell batteries. I saved the speaker and threw the dice away after the batteries ran out.

Silly me! I was then only interested in speaker circuits. Now that I am learning to play with Uno, I decided to re-create the dice. I have a ATtiny85 chip with which I will make this a self-contained toy. The ATtiny85 has 6 pins to connect the LEDs (I will hack the reset pin) and that leaves nothing for the speaker. I gave it a direct connection to power.

The circuit is simple. Connect the positive leads of the LEDs to the digital out pins marked for analog use (~). Connect the negative leads to a 220-ohm resistor. Connect the other end of the resistor to the ground pin on the Arduino. Connect the speaker parallel to the resistor. Add a 1uF capacitor to speaker terminals if the sound is weak.

Almost all dice circuits online are dumb. Not this one. It has sound and will be fun for kids to play with. I will order a circle-shaped sticker with numbers so that the dice is fully functional like the original toy.

Adding stain and shellac finish to my DIY wooden boombox speaker

After painting my 2.1 subwoofer amplifier music system, I decided to paint the older boombox. I had created my 5-volt tablet-battery-powered dual-LM386 boombox stereo speaker system last year but it has remained unpainted. Recently, I fixed a long-standing problem with the speaker selector switch and added a LED sound level indicator. I decided the build could now be considered stable. It was time to paint.

As it was made of real wood (not plywood or particle board), I decided to apply a layer of shellac, rather than paint. This would highlight the natural contours on the wood and not be obscured by paint. Other options for shellac were polyurethane, wax+linseed oil combo, and lacquer. When I was a kid, I had seen a carpenter applying shellac on a door and so I knew how to do it. I decided to go with shellac this time.

Before applying the shellac, I had to choose a stain (color layer). The first store had red-brown, teak, charcoal and walnut. I assumed teak and charcoal were dark. I had no idea what walnut was. They had had no color swatch on paper for me to select the color from. The bottle had no color label either. I wanted it to look like the stock of an AK-47 but did not know how to describe or identify it with a name. At the second shop, they had yellow.

I sanded the wood with 120 silicon carbide paper. I have more nicer paper but I did not use those. I applied the yellow stain all over the wooden box and rubbed the excess off with a cloth. The red stain, which I tested on the bottom was too dark and I did not use it. I could have diluted it but did not know how. After five minutes, I applied a coat of shellac (Sheenlac) with a brush. I then waited ten minutes and applied another coat. There were some areas where the shellac was uneven. I ran them over the next day. Under some angles of light, my shoddy workmanship is visible but from a distance nobody is wiser.

The speaker used to look look like this.

Cheap DIY solar-powered home lighting system with PWM charge controller, 12-volt battery & LED strips

Costs less than ₹6000

40 watt solar panel – ₹2000

PWM charge controller (5amps) – ₹300

12v 26A battery – ₹3000

LED Strips – ₹25 to 50 per meter

Switching board – DIY

The wiring is simple. You bring a two-wire cable from the solar panel to the PWM & connect it to terminals marked Panel. Similarly, connect a two-wire cable between your 12v lead-acid battery and PWM terminals marked Battery. The Load terminals are connected to the LED switching board. The LED strips are placed in various rooms and connected to the switching board using 2-wire cables.

The PWM charges the battery when the Panel voltage is above 12 volts. It also cuts off supply to Load terminals if it draws too much current or if battery voltage falls below 12 volts.

I let the 26-amps SMF battery charge during the day and leave the LED lights on for the entire night. The LED switch board has its own always-on LED as an indicator. Initially, I had a 7 amps UPS battery. It provided lighting only for a few hours.

I put some plastic cover on them to protect from rain water. Otherwise, it is maintenance free. 

On the solar panel terminals, I soldered a diode in reverse polarity to protect the panel from any wiring mistake. The PWM would have its own reverse polarity diodes I suppose.

My DIY 2.1 Subwoofer Speaker Sound System with MP3 player & FM Radio

Four years ago, I bought an amplifier board online. The seller said its output was 70 watts and it would require a 3 amps 12-0-12 volts transformer. I did not know much speaker wattage and never built the amp.

Recently, I bought the biggest subwoofer (8-inch) I could get. A carpenter built the speaker box as per my drawings. I had two 3-inch full-range Philips speakers, which I used as satellites.

My original design was much more complicated but it was a lot of work and I simplified it with minimum parts. Still it has an MP3 media player, volume controls (also on the remote), FM radio, and two 5-volt dispensing USB ports (for, say, a Bluetooth reciever). I also added a jack input hanging outside from a hole (that also acts as the pressure vent) to reduce strain on the media player.

Later, I found the amplification was provided by TDA1544q IC. This is a car amplifier providing a total of 44 watts of power over two or four channels. The board uses two channels for the satellites and other two are bridged  for the subwoofer.

The orientation of the pots is flimsy as they are separate from the amp board. The front panel is too thick. Currently, they are hanging from a piece of plastic.

This was the first time I worked with AC. I got a AC-compatible flip switch.

The amp was considerably compromised by me twice when I connected the amps to it in the wrong way. The caps exploded. I replaced them. With sloppy soldering, I damaged the volume control pins when I bought it. Once I connected the sound the wrong way and the subwoofer and one satellite became silent. It drove me mad before I figured it out.


I could not get veneer and decided to paint. Nobody had pink-color paint for wood surfaces. I got that from an auto paint store. Unfortunately, it went too dark. Now, it looks psychelic dark pink.

An easy “Joule Thief” inverter circuit to power an electric torch with two LEDs using only one 1.2 or 1.5 volt (dead) battery

My handmade torch with a Joule Thief inverter design. The missing piece of the ferrite core can be found at the top of the battery. That’s the coil. The rubber band is used to hold down a momentary switch on the plastic tubing so that this photo could be taken.

These days, electric torches (flashlights) use LED bulbs. An LED bulb typically requires a minimum 1.85 volts to power on. Usually, a battery of two 1.5 volt cells (providing 3 volts) is used in torches to power them. If the voltage supplied by the cells in the battery falls below 1.85 volts, the LED will not light up. The “dead” cells in the battery will have to be replaced even though they still have considerable energy in them.

A “Joule thief” can be used to power an LED bulb using just one 1.5 (non-rechargeable) or 1.2 (rechargeable) cell. A “Joule thief” is so named because it can use just one cell. It can also power an LED with a cell that is deemed dead. The Joule thief circuit accomplishes this by using a coil to store energy and then generating spikes of voltages to turn the LED on and off several times a second. For human eyes, the LED appears to be lit up.

A Fritzing version of a Joule thief circuit

There are many videos on the Internet on how to build one. There are a number of misleading ideas of what is required to make it work. No need a circular ferrite core. I used a broken piece of ferrite core piece from a transformer salvaged from a failed phone charger. The number of windings on the coil does not increase the voltage. Instead, it affects the frequency of the voltage spikes. The voltage output is determined by the base voltage supplied by the battery and saturation level of the ferrite core. The windings need not be evenly spaced or anything like that. However, they need to be close to the ferrite core.

Parts required:

  • Two white LEDs
  • One non-polarized 0.1 uF capacitor
  • NPN transistor
  • 220 ohm resistor
  • jumper wire
  • ferrite core piece
  • winding (enameled) wire or any insulated wire

Construction:

  1. Take two strands of equal-length enameled wire and wind it around a piece of ferrite core, say 20 to 40 times. Remove the enamel from the four ends of the coil. Twist/solder two ends of different wires. Use a multimeter continuity test to ensure that you are not tying the ends of the same wire. You can also use a LED+button cell combo to do the continuity test. Connect this tied end to the battery’s positive terminal.
  2. Now, you have two ends of coil that are free. Connect one end to a resistor and the other end to the collector of the transistor.
  3. Connect the other end of the resistor to the base of the transistor.
  4. Connect the LEDs and capacitor parallel to the emitter and collector of the transistor. The emitter is on the negative side.
  5. Connect the negative lead from the emitter of the transistor to the negative terminal of the cell.

Sound-activated LED lights using NPN transistor

What is wrong with the multi-colored LED light? Is it real?

I have started experimenting with transistors. The amplified AC sound signal forked from the speaker (connected to the base) is enough to turn the transistor on.  The supply voltage is connected to the LED onwards to the collector and a resistor  is connected to emitter (connected to ground).

I had some strange clear transparent LEDs. They turned on when on of the signal was connected to the collector but they did not react to the speaker signal. Stragely, one of the LEDs started glowing in all sorts of colors.

UPDATE: The clear LEDs are RGB LEDs. They follow their own (color) switching rhythm and are unsuitable for being sound-reactive.

How to create a cheap DIY backlit keyboard

Well, it is not really backlit. It is rather “overlit”. I took a clear-plastic-and-cardboard case, added a few LED bulbs and a transistor and connected them to 5 volts from a USB port. It is a cheap solution but far less expensive than a real backlit keyboard.

A cheap DIY solution for lighting up your computer keyboard.

How to power 12v LED strip using 5v USB port – add a step-up transformer

USB ports supply 5 volts. The 12v LED strip requires at least 9 volts. I bought a step-up DC-to-DC boost transformer circuit which can step up from 1.5v and up it up 24 or 32 volts. It took 5 volts from the USB port and boosted it up to 12 volts to the LED strip.

WARNING: Before connecting the output to any equipment, measure the output. The output voltage can vary widely depending on the input voltage. I fried an MP3 player module with 24 volts. So be careful. The circuit has a nut in the three-prong resistor which changes the output voltage. You can turn it several times in either direction to fine-tune the output voltage.

12v LED strip is powered by USB port using a step-up transformer circuit

Plastic box housing the transformer circuit has 2.1 mm plug (12 v) and socket (5v). I also added a 2.1 mm socket to the LED strip and a plug to a USB cable. (The USB port on the cable from the power bank was custom-built. I use it for electronic testing.) The power bank is also a custom-built one from 18650 batteries salvaged from a laptop battery.