Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Switches, Relays & Input
  4. ›AC Dimmers, Triacs and SCRs

Component guide · Advanced · 3 min read

AC Dimmers, Triacs and SCRs

Controlling Mains Loads

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerHow phase control worksWhich loads you can dimMains safetyTry itCommon mistakesFAQsParts and next steps
Short answer

An AC dimmer controls a mains load by switching a triac on partway through each half cycle. A zero-cross detector tells the microcontroller when the AC wave passes 0 V, and the code waits a delay before firing the triac through an optocoupler. A longer delay means less power. This works for incandescent lamps, heaters and universal motors, but not most LED lamps or induction motors. Mains is lethal, so use an enclosed, isolated module.

Key specs at a glance

Triacs
BT136 (4 A), BT138 (12 A), BTA16 (16 A): conduct both directions
SCRs
Conduct one direction; used in pairs or with rectifiers, battery chargers
Zero-cross
Optocoupler output pulsing at 100 Hz on 50 Hz mains
Opto driver
MOC3021 (random phase) or MOC3041 (zero-cross switching only)
Timing
0 to 10 ms delay after each zero cross on 50 Hz mains
Cooling
About 1 to 1.5 W lost per amp in the triac; heatsink needed
!Safety: Mains voltage can kill

This part is often wired to 230 V mains. Do all wiring with the plug pulled out, keep mains wires inside a closed box with strain relief, add a fuse, and never touch the board while it is plugged in. If you are new to mains wiring, have an electrician check it before you switch on.

01

How phase control works

Indian mains is 230 V at 50 Hz, so each half cycle lasts 10 ms. A triac stays off until its gate is triggered, then conducts until the current reaches zero at the end of that half cycle.

  1. 1
    The zero-cross circuit sends a pulse at each zero crossing.
  2. 2
    The microcontroller waits a delay: 1 ms gives nearly full power, 9 ms very little.
  3. 3
    It pulses the opto driver, which fires the triac for the rest of that half cycle.

A library such as RBDdimmer handles the timing using interrupts and a timer. Power does not change linearly with delay, so use a lookup table for even brightness steps.

02

Which loads you can dim

Good

incandescent and halogen lamps, heaters, soldering irons, universal (brushed) motors in drills and mixers.

Only if marked dimmable

LED and CFL lamps; even then, they may flicker.

No

induction motors (fans, pumps) except with a controller made for them, transformers not rated for it, and electronics with their own power supplies.

For simple on and off switching of mains, an SSR or relay is simpler. Zero-cross SSRs cannot dim; they switch only at zero crossings.

03

Mains safety

  • ✕The triac's heatsink tab is often live. Insulate it or use an isolated-tab part.
  • ✕Keep the whole module in a closed, earthed or double-insulated enclosure, with no exposed screw terminals.
  • ✕Fuse the live wire and size wiring for the load.
  • ✕The microcontroller must connect only to the optocoupler side. Never connect a USB-connected board to mains-side ground.
  • ✕Add an RC snubber for inductive loads.
  • ✕If you are not trained in mains wiring, use a certified commercial dimmer or have an electrician check your build.
04

Try it: Power dissipation calculator

Change the values and the diagram and results update as you type.

05

Common mistakes to avoid

  • !Touching the module or heatsink while plugged in.
  • !Dimming non-dimmable LED lamps or induction fan motors.
  • !Using a MOC3041 zero-cross opto for phase dimming.
  • !No heatsink on the triac at high current.
  • !Exposed mains terminals and no fuse.
06

Frequently asked questions

Can Arduino control a 230 V lamp brightness?

Yes, with an isolated triac dimmer module that has zero-cross detection, in a safe enclosure.

What is the difference between a triac and an SCR?

A triac conducts in both directions and suits AC; an SCR conducts in one direction only.

Can I dim a ceiling fan with a triac module?

Not reliably. Fans use induction motors that need dedicated fan regulators.

Why does my dimmer flicker?

Timing jitter from other code, noisy zero-cross pulses, or a load that is not dimmable.

What is zero-cross detection?

Sensing when the AC voltage passes 0 V so the controller can time each half cycle.

Parts for this guide

  • 220V AC 2000W SCR Voltage Regulator / Speed Controller
    ₹99View
  • SCR AC Voltage Regulator (Dimmer / Speed Controller)
    ₹320View
Shop DC Motor DriversShop DC-DC Converters

Calculators

Power dissipation calculator

Terms in this guide

TRIACA semiconductor switch that conducts in both directions once triggered, used to switch or dim AC loads. It turns off by itself when the current falls to near zero.Zero crossingThe instant an AC waveform passes through 0 V. Dimmers time their firing from it, and zero-cross relays switch on there to reduce interference.OptocouplerA component that passes a signal through light between an LED and a phototransistor, electrically isolating two circuits.InterruptA hardware signal that makes the microcontroller pause its program and run a short function immediately, for example when a button pin changes.HeatsinkA metal part that draws heat away from a component and releases it into the air.

Keep learning

ComparisonIntermediateSolid-State Relay vs Mechanical RelayA mechanical relay closes metal contacts with a coil, so it switches AC or DC with almost no voltage drop or leakage, but it clicks and wears out.3 min read · Switches, Relays & InputComponent guideBeginnerRelay ModulesA relay module is an electrically controlled switch that lets a microcontroller turn a separate circuit on or off, such as a 12 V pump or a mains lamp.4 min read · Switches, Relays & InputComponent guideIntermediateOptocouplersAn optocoupler contains an LED and a light-sensitive transistor in one package with no electrical connection between them.3 min read · Semiconductors & ICsConcept explainerBeginnerAC vs DCDirect current (DC) flows one way at a steady voltage, like a battery or USB charger.4 min read · Electronics FundamentalsHow-toIntermediateHeatsinks, Fans and Thermal PasteEvery part that drops voltage while passing current turns that power into heat.3 min read · Power & Batteries

Sources

  • WeEn BT136/BT138 triac datasheets
  • onsemi MOC3021 and MOC3041 datasheets
  • ST AN-439 triac phase control application note

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerHow phase control worksWhich loads you can dimMains safetyTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide2 items · ₹419

220V AC 2000W SCR Voltage Regulator / Speed Controller · SCR AC Voltage Regulator (Dimmer / Speed Controller)

Ask the Community

Ask a question