One cell to 12 V
An 18650 cell into an MT3608 boost module set to 12 V lights a 12 V lamp, and keeps it lit at 12 V as the cell runs down. There is no microcontroller in it: the simulator solves the 3 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Beginner About 10 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $3.50. On Mokxi they're free.
What you'll learn
- A boost converter raises voltage
- Power in matches power out, plus losses
- Lower input voltage means more input current
- Set the output before connecting a load
- Difficulty: Beginner
- Time: About 10 minutes
- Parts: 3
How it works
This circuit has no code. A single 18650 Li-ion cell holds 4.2 V when full. An MT3608 boost module raises that to 12 V, which lights a 12 V, 0.1 A lamp at full brightness.
A boost converter cannot make power from nothing. The lamp takes 1.2 W. From a 4 V cell, that is 0.3 A, plus roughly 10 percent for the converter's losses. As the cell runs down, the output stays at 12 V while the cell gives more current.
The module's trimmer sets the output voltage. If you set it below the cell voltage, the output is not that low: it is the cell voltage less a diode drop, because a boost converter cannot step down.
Parts list
3 parts, plus the jumper wires. They retail for about $3.50; on Mokxi they're free.
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| MT3608 boost converter module pin VIN+ | Battery: AA, coin cell, LiPo pin V+ |
| MT3608 boost converter module pin VIN- | Battery: AA, coin cell, LiPo pin V- |
| Filament lamp pin 1 | MT3608 boost converter module pin VOUT+ |
| Filament lamp pin 2 | MT3608 boost converter module pin VOUT- |
The notes that come with it
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// One Li-ion cell to 12 V with an MT3608 boost converter.
//
// There is no microcontroller here. Press Run and the simulator solves the
// circuit.
//
// WHAT IT IS. An 18650 cell, 4.2 V when full, into the little blue MT3608
// module. Its trimmer (the volts property) is set to 12 V, and the output
// lights a 12 V, 0.1 A lamp at full brightness.
//
// THE NUMBERS. The module's readout says 12.0 V. The lamp takes 1.2 W, and a
// boost converter trades amps for volts and makes no power: from a 4 V
// cell that is 0.3 A, plus about 10 percent for the converter's losses.
//
// THINGS TO TRY. Set the cell's charge to 10 percent: it is down to about
// 3.1 V, and the output stays at 12 V while the cell gives more current to
// make up for it. Set the module to 5 V and the lamp dims. Set it to 3 V,
// under the cell: the output is not 3 V but the cell less the diode's drop,
// about 3.9 V, because a boost converter cannot step down.
//
// ON THE BENCH. A module comes set to whatever the factory left it at, often
// more than 20 V. Turn the trimmer with a meter on VOUT+ before anything is
// on the output.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- The lamp is dim This project
Check the module trimmer is set to 12 V. A lower setting dims the lamp. - On a real module, the output is far too high This project
New modules often come set to over 20 V. Adjust the trimmer with a meter on VOUT+ before connecting anything. - The battery is wired backwards, or the voltage is too low or too high for the circuit. A fresh AA is about 1.5 V, a LiPo is 3.7 V nominal and 4.2 V full. Battery: AA
Match the plus and minus marks. Check the voltage your parts need. Two AAs make 3 V, four make 6 V. Never feed a LiPo to a 3.3 V chip directly at 4.2 V. - The circuit resets or browns out when a motor or servo starts. A battery has internal resistance, so the voltage sags under load. Battery: AA
Use a fresh pack with enough current rating. Add a 100 uF or larger capacitor near the load. Power motors from their own pack and join the grounds. - The output voltage is wrong or only follows the input. MT3608 boost converter module
Set the output with the trimmer while measuring it with no load. It can only step up, so VOUT must be above VIN. Input range is about 2 to 24 V. - The supply sags or the module gets hot. MT3608 boost converter module
A boost module draws more input current than it delivers. Check the input source can supply it and use short, thick wires. Stay within the module's rated current, around 2 A. - The lamp is dim or does not light when driven from a board pin. Filament lamp
A lamp needs far more current than a pin gives (a pin is limited to about 20 mA). Switch it with a transistor or MOSFET from its own supply that matches the lamp's voltage rating. - The lamp's brightness lags or it burns out the switch when it first turns on. Filament lamp
A cold filament draws several times its running current at first. Size the switch for that surge, not just the steady current.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.