Category Archives: Arduino

Arduino Tutorial 31: Using Servo in a Simple Project

In this lesson we demonstrate a simple project that reads the brightness in a room, and then displays the brightness on a device consisting of a servo with an arrow pointing at vaiouse visual indications of brightness. This project demonstrates how to use Algebra and the equation of a line to take the data read from the light sensor, and calculate the desired angle value to send to the servo.

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

Typically, the servos in electronics kits are not the best ones, but are suitable to learn with. If you want a more stable and better quality servo, this is the one I user in more of my projects: HiTEC

9-Axis IMU LESSON 8: Using Gyros for Measuring Rotational Velocity and Angle

In this lesson we explore approximating the roll and pitch of our sensor using only the gyros. The advantage of gyros is that they are not susceptible to vibration as much as the acceleromters. In the video we show you how you can simply approximate roll and pitch from the data coming from the gyroscopes. Note that while the gyros do not have the noise problem seen in the accelerometers, we now have a new problem that the gyros are susceptible to long term drift. As you play with these devices what you end up seeing is you will need to combine the data from the accelerometers and the gyros in a clever way to take advantage of the long term stability of the accelerometers and the noise immunity of they gyros. In effect, you will want to apply a high pass filter to the gyro data, and a low pass filter to the acceleromters.

To follow along at home, you will need an Arduino Nano, and an Adafruit BNO055 Inertial Measurement Sensor. We suggest using identical hardware if you want to follow along as different sensors have very different characteristics, and things will work much better for you if we are using the same sensor

This is the code which we developed in the video to demonstrate these concepts.

The code below is for demo purposes only, and should not be used in any real applications. It just demonstrates how to work with this sensor in benchtop presentations.

 

Arduino Tutorial 30: Understanding and Using Servos in Projects

In this lesson we explain step-by-step how to incorporate a servo into your Arduino project. This allows you to put motion into your prototypes. Servos act like little motors to create motion, but unlike motors, they do not spin all the way around. A typical servo can move between 0 and 180 degrees. They are relatively easy to program, and this video shows you the ins and outs of using a servo.

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

Typically, the servos in electronics kits are not the best ones, but are suitable to learn with. If you want a more stable and better quality servo, this is the one I user in more of my projects: HiTEC

9-Axis IMU LESSON 7: Understanding Low Pass Filters


In this project, we have shown how accelerometers can be used to approximate tilt. We showed in Lesson 6 how vibration can cause a problem with such a strategy, as the system will interpret vibration to be changes in tilt. A partial solution to this problem can be to program a low pass filter into the project. The video above introduces you to the concept of a low pass filter, and shows some simple examples of programming and using a low pass filter to reduce noise.

The code below is for demo purposes only, and should not be used in any real applications. It just demonstrates how to work with this sensor in benchtop presentations.

 

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.