Tag Archives: STEM

Arduino Tutorial 40: Controlling DC Motor Speed and Direction with Pushbuttons

In this lesson we explore how to control the speed and direction of a DC motor using two buttons. We are using the L293D motor controller and a small DC motor for demonstration purposes. We are using parts from our Elegoo Super Stater Kit, which you can get HERE. The basic circuit was explained in Lesson 37, and we are using that work as a starting point. The schematic below will get you started in connecting your circuit. Be sure and connect one of the Arduino ground pins to the ground rail in the second to the bottom row in the diagram below. It is good practice to connect all your grounds together.

DC Motor Controller
Connection Diagram for a DC Motor Controller using the L293 Control Chip

The code we developed in the video lesson is shown below for your convenience.

 

Arduino Tutorial 35: Understanding How to Use a Stepper Motor

In this lesson we give you several examples of how to connect and program a stepper motor. Stepper motors are useful because they can produce very large torque at low RPM and are capable of extremely precise positioning. They are somewhat tricky to use, and you must be careful to not try and power them from an Arduino. Arduino can control stepper motors, but they must be powered from an external power supply.

If you want to follow along at home, you can order the Arduino Kit we are using HERE.

This is the code that allows you to toggle the direction of the stepper motor by pressing a pushbutton. The video shows all the details and how to connect the motor up.

 

Arduino Tutorial 29: Using Push Buttons to Create Dimmable LED

In this lesson we show you how to create a Dimmable LED using two pushbuttons. Pressing one button will gradually increase the brightness, while pressing the other button will gradually decrease the brightness. The project also includes an active buzzer to provide the user feedback that either maximum or minimum brightness have been reached. I encourage you to try and build this yourself before watching the video. Then see if you can do it on your own, and then see if you are doing the way I do it, or if you find an alternative suitable solution.

If you want to follow along at home, you can order the Arduino Kit we are using HERE.

Below is the code we used to achieve the toggle operation. The video gives details on how to connect up the circuit.

 

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, you can order the Arduino Kit we are using HERE.

Arduino Tutorial 20: Understanding RGB LED’s

In this lesson you will learn how to work with RGB LED’s. RGB LED’s can be used to create not only the primary colors, but also all mixtures of the primary colors. This video shows you how to connect up a Common Cathode RGB LED. This project is a little more complex than the ones we have done in the past, so I include the code down below. While the code is here for your reference, you should not just copy and paste it. In order to really learn, you need to type it in for yourself, and then find and debug your mistakes. If you just copy and paste from me, you will never learn how to troubleshoot.

In these lessons, we are using the Elegoo Arduino kit, which you can purchase HERE.