Arduino Light Sensor – Circuit and Code Example

This Arduino Light sensor circuit is a simple example that shows you how to connect light sensors such as photoresistors, photodiodes, and phototransistors, to an Arduino.

In this quickstart guide, you’ll learn how to connect a photoresistor to an Arduino board and read out the voltage. You’ll first use the Serial Monitor to learn about how the light sensor behaves, then you build a circuit that automatically turns on a light when it gets dark.

This is a great practice circuit when you’re learning Arduino. The code is straightforward and the light sensor connections are simple.

Parts Needed

* A photodiode or phototransistor will also work.

Arduino Button – Circuit and Code Example

This Arduino button circuit is a simple example that shows you how to connect buttons to an Arduino.

In this quickstart guide, you’ll learn how to connect a button to an Arduino board and read a HIGH or LOW depending if the button has been pushed or not. You’ll use the Light-Emitting Diode (LED) that is included on the board to turn on and off with the button so that you can verify that your button press code is working properly.

This is a great practice circuit to build as you’re learning Arduino. The code is straightforward and the connections are simple.

Parts Needed

  • Arduino Uno
  • Breadboard (and some breadboard wires)
  • Resistor 10 kΩ (R1)
  • Resistor 470 Ω (R2)
  • Pushbutton or Switch
  • Wires

Arduino Button Circuit

To connect a button to an Arduino, you’ll need a pull-down or a pull-up resistor. This is to make sure that when the button is not pushed, it has a defined value. In this example, we’re using a pull-down resistor of 10 kΩ.

The Potentiometer: Pinout, Wiring, and How It Works

A potentiometer is an adjustable resistor with three pins. The fact that it has three pins instead of two was confusing to me when I was starting to learn electronics. But as soon as I saw the inside of it, it all made sense.

In this guide, I’ll show you what the potentiometer looks like on the inside, the different potentiometer types, and examples of how to wire it up for different circuits.

What Is A Potentiometer?

Potentiometers are adjustable resistors used in circuits for many things, such as to control the volume of an amplifier, control the brightness of a light, and much more.

It is like the resistor. But while the resistance value of a resistor stays the same, you can adjust the resistance value of a potentiometer.

Arduino Potentiometer – Circuit and Code Example

This Arduino Potentiometer circuit is a simple example that shows you how analog inputs work, and how you can use the Serial Monitor to learn about what is going on inside the chip.

In this quickstart guide, you’ll learn how to connect a potentiometer to an Arduino board and read out the voltage. This is a great practice circuit when you’re learning Arduino. The code is straightforward and the potentiometer connections are simple.

Parts Needed

Arduino Potentiometer Circuit

To connect a potentiometer to an Arduino, connect the middle pin of the potentiometer to an analog input pin on the Arduino. Then connect the outer pins to 5V and GND.

What is Arduino and How Do I Get Started?

Arduino is a microcontroller board that makes it really easy to program electronics. It’s an easy way to get started with microcontrollers that I highly recommend since it lets you jump right into the code and do stuff from the start.

You can use it both for building simple things like a blinking LED – and advanced stuff like building an internet-connected robot. With Arduino, it’s simple to build really cool electronics projects without learning a bunch of theory. And it’s fun!

It has several inputs and outputs that are controlled by simple commands that you write into a program on your computer.

Arduino UNO board

Open Collector Output – What Is It and How Do I Use It?

An open collector output is not a normal high/low output. Instead, these outputs are connected via a transistor. And the collector of the transistor is available at the pin. For example, if you have a NAND gate with an open-collector output, it will look like this: So when the output from the NAND gate is ‘1’,

Arduino Blink LED – Circuit and Code Example

The Arduino blink LED circuit is a simple circuit that works great for starting to learn Arduino. Both the code and the connections are straightforward so that you can understand it with little to no background.

In this quickstart guide, you’ll learn how to connect an LED to an Arduino board and make it blink.

Parts Needed

Arduino Blink LED Circuit

To connect an LED to an Arduino, you need a resistor in series with the LED. This is to limit how much current the LED pulls out of the Arduino pin. The value isn’t crucial but should be between 220 Ω and 1000 Ω.

How Capacitors Work – A Tutorial For Hobbyists

A capacitor is a basic electronic component that works like a tiny rechargeable battery with very low capacity. Capacitors are used to create oscillators, time delays, add a power boost, and much more.

Like most components, the easiest way to understand how a capacitor works is to see with your own eyes what it does in a circuit.

Electrolytic capacitor

When I started learning electronics as a teenager, this was the first component I learned about. The way my father explained it to me made it easy to understand even though I had no understanding of the basics of electronics.

In this guide, I’ll show you how a capacitor works so that you’ll be able to understand what it does in circuits, and how you can use it in your own projects.

Covered in this guide:

The Insulated Gate Bipolar Transistor (IGBT): A Practical Guide

This is a practical guide to the Insulated Gate Bipolar Transistor, or IGBT. You’ll learn how to use it from a practical standpoint – without going into the physics of what it looks like on the inside. The IGBT is often presented as something complex and advanced. But when you strip away the physics explanation and get down to practice, putting it into a circuit is straightforward.

By the end of this guide, you will be able to use an IGBT and build your first simple circuit with it.

IGBT symbol and package

How to Build a DC Linear Power Supply

A DC linear power supply is an electric circuit that converts AC voltage to a stable regulated DC voltage – without any switching or digital circuitry. This makes the circuit both simple to understand and easy to build.

In this guide, you will learn how DC linear power supplies work and how to build your own.

DC linear power supply circuit

Arduino Laser Module: Connecting KY-008 to Arduino

In this tutorial, you’ll learn how to connect an Arduino laser module to Arduino. I’ve used the KY-008 as an example, but most low-power laser modules will work the same way.

Blinking laser module with Arduino

Table of Contents:

The KY-008 Arduino Laser Module

The KY-008 is a laser transmitter module that creates a dot-shaped laser beam that can be used as a laser pointer or to create mini laser shows. It is compatible with Arduino, Raspberry PI, ESP32, and other popular microcontrollers.

Laser Diode: The Ultimate Beginner’s Guide

A laser diode is a cool component that you can do a lot of fun stuff with, from engraving wood to creating a light show or giving your robot eyes! They range from super cheap (or even free if you can find one in an old CD player!) to more expensive.

Most types are really easy to use too, once you learn the basics. In this article, you’ll learn the basics of laser diodes and how to use them in your own projects. In the end, I’ll show you how to create your own invisible tripwire!

Laser diode illustration

Identify Electronic Components (Quick Reference)

Not sure what type of component you’re looking at? Use this list to identify electronic components and learn what they do. 9V Battery ClipTo connect a 9V battery to your board. BreadboardThe breadboard is a very handy tool for connecting circuits. You can use it to practice, test ideas, or build simple prototypes. Breadboard wiresTo

Schottky Diode: A Beginner’s Guide

In this guide, you will discover what a Schottky diode is and how it can be used in electronic circuits.

Did you know that Schottky diodes, unlike other diodes, are formed by the junction of a semiconductor material with a piece of metal? That’s gives it some special properties that can come in handy.

Schottky symbol and packaging
Single Schottky Diode (left) and a Schottky Pair (right)

What Is a Schottky Diode?

Diodes are components that normally only let current flow in one direction. Like a regular diode, the Schottky diode allows current to flow in the forward direction when enough forward voltage is applied.

Schottky diode symbol
Schottky Diode Symbol

However, while a regular PN junction diode is made by connecting p-type and n-type semiconductors, the Schottky uses metals like gold, tungsten, platinum, or aluminum instead of the p-type semiconductors. 

Phototransistor – A Newbie’s Guide

A phototransistor is an incredibly useful component for detecting light in electronics projects. You’ll often find them in remote-control receivers, pulse oximeters, and line-following robots.

In this guide, you will learn what phototransistors are, how to use one, and with a simple project you can build to create an automatic light on/off switch.

Phototransistor symbol and package