An Arduino can be used to test the life of any battery with less than 5 volts, Boxall says. So, for a quick way to see how much juice your AAA, AA, C, or D batteries have left, build this Arduino-based battery tester, which can display battery life via a string of LEDs.
Roll the Dice
The next time you're playing Monopoly, take a technological steup up from rolling plastic cubes by making Boxall's Arduino electronic die, which chooses a random number between 1 and 6 and displays it via a corresponding LED. At least when you go directly to jail you'll have a cool creation to pass the time.
CcTalk tutorial, ccTalk on Arduino nano part 1. Upload the sketch, open the port on Realterm ( opening the port will send a short reset signal to the nano board) and voila! Our “Simple Pool” message 2 0 1 254 255 followed by the coin acceptor reply 1 0 2 0 253, ACK message. Jan 10, 2011 - This module helps you to represent a device and its protocol. The Arduino module for the Robin OS. Simple DMX control over VCP. Published 1.0.0. a year ago. Cylon Adaptor for Odroid single-board computers. CCTalk Node.js Implamentation Classes.
Control Traffic
Build a working model traffic signal. It not only displays red, yellow, and green for each direction of oncoming traffic, but also includes a sensor to see a car approaching the one-lane road, which switches the light to green if there's no traffic coming from the opposite direction.
Stop the Clock
Two pushbuttons, a breadboard, a couple of resistors, and some wires are about all it takes to turn an Arduino unit into a stopwatch.
Create a Keypad Lock
Put Arduino to work protecting your secrets. This project is a keypad-controlled lock that will allow the user to select a six-digit secret code and lock out anyone without it.
Your Own Tank Robot
Now we're having fun. Last year PopMech published plans to build your first robot, a rolling little character based on an Arduino unit. Boxall's project will help you build a more rugged pint-size vehicle. The tank robot uses a small motor for each tread to climb over obstacles.
GPS Receiver
Where the heck are we, anyway? With an Arduino, a GPS shield kit by SparkFun, and a few other key ingredients, you can create a small receiver to tell you your longitude and latitude at any given time.
Keep Time
You know from the stopwatch project that Arduino can keep time. You know from the GPS-receiver project that it can be hooked up to an LCD display. Put those two features together to build this Arduino digital clock.
Mechanical Twitter
Everyone's on Twitter now—even Hillary Clinton. So why shouldn't your Arduino tweet? Here's how to make it happen.
Arduino Texter
Perhaps you don't want your mechanical creations to share their thoughts with the world at large. Instead of programming an Arduino to tweet, follow these directions to let it send texts to a phone.
A direct current, or DC, motor is the most common type of motor. DC motors normally have just two leads, one positive and one negative. If you connect these two leads directly to a battery, the motor will rotate. If you switch the leads, the motor will rotate in the opposite direction.
To control the direction of the spin of DC motor, without changing the way that the leads are connected, you can use a circuit called an H-Bridge. An H bridge is an electronic circuit that can drive the motor in both directions. H-bridges are used in many different applications, one of the most common being to control motors in robots. It is called an H-bridge because it uses four transistors connected in such a way that the schematic diagram looks like an 'H.'
You can use discrete transistors to make this circuit, but for this tutorial, we will be using the L298 H-Bridge IC. The L298 can control the speed and direction of DC motors and stepper motors and can control two motors simultaneously. Its current rating is 2A for each motor. At these currents, however, you will need to use heat sinks.
The pinouts for the L298 are shown below. You can find a datasheet the L298 at http://www.tech.dmu.ac.uk/~mgongora/Resources/L298N.pdf.
L298 Pinout (top view)
Hardware Required
- 1 x L298 bridge IC
- 1 x DC motor
- 1 x Arduino Mega2560
- 1 x breadboard
- 10 x jumper wires
The schematic above shows how to connect the L298 IC to control two motors. There are three input pins for each motor, including Input1 (IN1), Input2 (IN2), and Enable1 (EN1) for Motor1 and Input3, Input4, and Enable2 for Motor2.
Since we will be controlling only one motor in this tutorial, we will connect the Arduino to IN1 (pin 5), IN2 (pin 7), and Enable1 (pin 6) of the L298 IC. Pins 5 and 7 are digital, i.e. ON or OFF inputs, while pin 6 needs a pulse-width modulated (PWM) signal to control the motor speed.
The following table shows which direction the motor will turn based on the digital values of IN1 and IN2.
IN1 pin of the L298 IC is connected to pin 8 of the Arduino while IN2 is connected to pin 9. These two digital pins of Arduino control the direction of the motor. The EN A pin of IC is connected to the PWM pin 2 of Arduino. This will control the speed of the motor.
To set the values of Arduino pins 8 and 9, we will use the digitalWrite() function, and to set the value of pin 2, we will use the using analogWrite() function.
Below is a photo of the set up.
Code
![Simple Simple](https://cctalktutorial.files.wordpress.com/2016/07/20160728_154104.jpg?w=394&h=527)
Arduino Motor Control Setup
- Connect 5V and ground of the IC to 5V and ground of Arduino.
- Connect the motor to pins 2 and 3 of the IC.
- Connect IN1 of the IC to pin 8 of Arduino.
- Connect IN2 of the IC to pin 9 of Arduino.
- Connect EN1 of IC to pin 2 of Arduino.
- Connect SENS A pin of IC to the ground.
- Connect the Arduino using Arduino USB cable and upload the program to the Arduino using Arduino IDE software or Arduino Web Editor.
- Provide power to the Arduino board using power supply, battery or USB cable.
Video
Give this project a try for yourself! Get the BOM.