Category Archives: Tutorial

Arduino Tutorial 26: More Fun with Photo Resistors

In this lesson we create an audible signal where the tone of the signal is proportional to the brightness of the light in the room. We use a photoresistor to measure the light in the room, and then use a passive buzzer to create the audible signal. The video shows you how to hook everything up, and the code we use is below. Your code might be a little different, as the math will depend on the light values where you are.

If you want to follow along at home, an official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT. The nice digital voltmeter used in the lesson is available HERE.

Arduino Tutorial 25: Understanding Photoresistors and Photo Detectors


In this lesson we learn how to use photoresistors. A photoresistor is a semiconductor material. In the darkness, it has almost no free electrons, so its resistance is very high. When light shines on the device, electron hole pairs are created, and these electron hole pairs are free to conduct electricity. This lowers the resistance of the material. The brighter the light, the more electron hole pairs that are generated, and hence the lower the resistance. Hence, the resistance of these devices is inversely proportional to the brightness of the light. By hooking a photoresistor in series with a fixed resistor, the current will change as the resistance of the sensor changes. This leads to a measurable change in the voltage across the series resistor. Hence, by measuring this voltage, you get a signal that is proportional to the light. This can be read via an analog pin on the Arduino, and then the arduino can be programmed to do different things based on the brightness of the light. In this simple project we have a red LED and a green LED. If the light is on, the green LED is turned on. If the light is off, the red LED is on.

If you want to follow along at home, an official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT

The nice digital voltmeter used in the lesson is available HERE.

Below is the code we developed in this video lesson above.

 

Arduino Tutorial 24: Understanding Passive Buzzers

In this lesson we show you how to incorporate sound into your project using a passive buzzer. Passive Buzzers have the advantage that they are less expensive than active buzzers, and you can more precisely control the tone. This lesson will show you how to hook up the buzzer, and then how to code the arduino to produce different tones.

If you want to follow along at home, an official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT

Arduino Tutorial 23: Changing Tone of an Active Buzzer

In this lesson we show how you do have some ability to adjust the tone on the Active Buzzer to make a sound or alarm that is a little more interesting. If you want to make notes or play simple songs you should use the passive buzzer, but the active buzzer can be adjusted somewhat.

If you want to follow along at home, an official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT

The video above takes you through the hookup and the steps. Also, the code used in the example above is:

 

Arduino Tutorial 22: Understanding and Using Active Buzzers to Add Sound to Your Project

In this lesson we show you how to add sound to your Arduino project using a buzzer, The kit contains two buzzers, an active buzzer and a passive buzzer. The active buzzer is the easiest to use, as you just need to apply 5 volts to it to get it to go off. In this lesson we show you how simple it is to use the active buzzer with Arduino. In future lessons we will show you how to use the passive buzzer.

The advantage of the active buzzer is that it is easier to use. Just apply 5 volts, and it goes off. The advantage of the passive buzzer is that it is cheaper, and allows you more control of the tone, or pitch of the sound produced.  If you want to follow along at home, an official Arduino Uno R3 is available HERE. In this new series of lessons, I will be using the sensor and other components found in this KIT