Source: https://mokxi.com/parts/lamp
Updated: 2026-11-16

Part

# Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

See every part

- 2 pins
- 1 setting
- In 16 projects
- In 1 lesson

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Filament lamp in brief

What it is, and every setting the properties panel gives it.

A miniature filament lamp is a coil of tungsten in a glass bulb, the flashlight bulb of school circuit kits, with two terminals and no polarity. It is not a resistor: tungsten’s resistance climbs with temperature, so a 2.5 V 0.3 A bulb is 8.3 ohms lit and about 0.7 ohms cold, which is what a meter on an unlit bulb reads. Mokxi models the filament’s temperature itself, so a lamp switched on cold draws roughly ten times its rated current for the first few milliseconds, glows up and fades over a 40 to 80 millisecond time constant, and on half its voltage draws about two thirds of its current while giving a tenth of its light. Past about twice its rated voltage the filament melts and, after one warning in the editor, stays open. The model property is the rating printed on the bulb: 2.5V 0.3A, 6V 60mA, 6V 0.3A or 12V 0.1A. The usual mistake is running one from an Arduino pin, good for about 20 milliamps; switch it with a transistor or MOSFET instead. Heat lost down the leads is not modeled.

Family

Basics

Pins

2

model

2.5V 0.3A (or 6V 60mA, 6V 0.3A, 12V 0.1A)

Pins

## 2 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

1

One terminal of the holder.

2

The other. A lamp has no polarity.

How to use it

## How to switch a filament lamp with an Arduino

A lamp wants far more current than a pin can give, so the pin switches it through a logic-level MOSFET. The lamp goes from its own supply, here four AA cells, to the drain; the source goes to ground; the gate goes straight to pin 9. Join the cells’ minus to the Uno’s GND, because the gate voltage only means something measured from the source’s ground.

The circuit here adds a 1 ohm resistor under the source, so a volt across it is an amp and analogRead() on A0 reads the current at 4.9 mA a count. The sketch switches the 6 V 0.3 A lamp on, samples every millisecond, and prints the surge, the running current and how long the filament took to settle. The cycles after the first start warm, and surge less.

Part pin

Board pin

Lamp, terminal 2

Battery plus, four AA cells

Lamp, terminal 1

IRLZ44N drain

IRLZ44N gate

Pin 9

IRLZ44N source

A0, and 1 ohm to GND

Battery minus

GND, shared with the Uno

A 12 V bulb switches the same way from its own 12 V supply, and PWM on the gate dims it; the filament’s 40 to 80 ms warm-up smooths the switching into a steady glow.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

How it is modeled

## What is true about the Filament lamp, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Modeled

Tungsten's resistance climbs with its temperature. The filament runs at about
2500 K at its rating, and its resistance goes as the temperature to the power 1.2,
so cold it is about a twelfth of its hot resistance: a 2.5 V 0.3 A bulb is 8.3 ohm
lit and about 0.7 ohm cold, which is what a meter on an unlit bulb reads.

Inrush. Switched on cold, a lamp draws about ten times its rated current for
the first few milliseconds, until the filament heats.

Warm-up and fade. The filament's heat capacity gives it a time constant of 40
to 80 ms at its rating, depending on the bulb, so it glows up and fades over tens of
milliseconds, where an LED is instant. Flick it on and off quickly and it never
reaches full brightness.

It is not ohmic. The filament radiates its heat away as T^4, so on half its
voltage it runs cooler, its resistance is lower, and it draws about two thirds of
its current, not half. Its light goes as the voltage to the power 3.4: half the
voltage is a tenth of the light. Two lamps in series on one lamp's voltage glow a
dull orange; two in parallel glow fully and draw twice the current.

It burns out. Past about twice its rated voltage the filament melts. A 2.5 V
bulb on 6 V flashes once and is gone, and stays open until the circuit is
rebuilt. In the editor the first time is a warning: the bulb glows blinding and
amber-ringed and keeps working, and a message says what voltage it had; the next
time it blows.

The rated temperature and the warm-up time constants are assumptions in the range
small lamps show; the T^4 and T^1.2 laws are the textbook ones, and together
they give the empirical I ~ V^0.55 rule for tungsten lamps.

### Not modeled

The heat lost down the leads and through the gas (all of it leaves as light and
infrared here), so a lamp cools a little slower than a real one. The slow death of
a lamp run at one and a half times its voltage: here it lives forever below about
twice its rating. Color is drawn from the brightness, not computed.

From Filament lamp, in full.

Projects

## See the Filament lamp in a project

16 built-in projects use it. Each opens in the editor, already wired.

Lessons

## Where it turns up in a lesson

One lesson places it in its own circuit.

### Learn articles

1 lesson

- 3D Printer Firmware: Homing, PID, G-code, Runout

Boards

## The boards it is shown on

Each of these 2 boards has a built-in project with the Filament lamp in it.

- Arduino Uno R3
- ESP32-C3-DevKitM-1

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

Raspberry Pi 5

Raspberry Pi 5: the 40-pin header, driven by main.py with gpiozero.

See every part

## Wire up the Filament lamp

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
