background preloader

Labs / DC Motor Control Using an H-Bridge

Labs / DC Motor Control Using an H-Bridge
Overview In this tutorial, you'll learn how to control a DC motor's direction using an H-bridge. To reverse a DC motor, you need to be able to reverse the direction of the current in the motor. The easiest way to do this is using an H-bridge circuit. There are many different models and brands of H-Bridge. This tutorial uses one of the most basic, a Texas Instruments L293NE or a Texas Instruments SN754410. If you simply want to turn a motor on and off, and don't need to reverse it, for example if you're controlling a fan, try the tutorial on controlling high current loads with transistors. (:toc Table of Contents:) Parts For this lab you'll need: Solderless breadboard 22-AWG hookup wire Arduino Microcontroller module Light Emiting Diodes, LED 10Kohm resistors Switch L293NE or SN754410 H-bridge 12V DC power supply DC Motor Prepare the breadboard Connect power and ground on the breadboard to power and ground from the microcontroller. (Diagram made with Fritzing) Add a Digital Input (a switch) Find a motor Related:  Motor

Arduino Tutorial: An Introductory Guide Update! Don’t miss our famous article: Top 40 Arduino Projects of the Web. Previously we introduced you to the Arduino and it’s awe-inspiring incredibleness. Now we’ll take you on an in depth plunge with enough resources and projects to keep you occupied for the next decade. The best place to get started would definitely be their comprehensive website. I strongly encourage you to browse their resources. They have vast tutorial, learning, hacking and reference sections. Arduino Tutorials: As usual, Instructables has plenty of tutorials also.If you’ve ever thought, “Can the arduino do…?” The Arduino uses the ATmega168.

Arduino Perpetual Motion Machine (Pendulum)- aHT8pendu HOME - - - - - - - - Table of contents, my Arduino "How To" articlesOther material for programmers Bookmark this on Delicious Recommend to StumbleUpon Basic Idea I wanted to set up a pendulum with a small magnet on its end, place an electromagnet beneath where the pendulum would swing, and then energize the electromagnet briefly from time to time to "nudge" the pendulum so that it would swing "forever". That's about all there is to it! I had an interesting note from a reader suggesting an alternative approach. Extension... A really neat idea came to me.... The perpetual pendulum presented here is of the traditional "back and forth" type. Details.... Definition: Reed switch: Usually two tiny metal leaves in a sealed glass tube, arranged so that when a magnet is near, the leaves come together and electricity will flow through the device. If your skills are up to it, I suspect that using LEDs and phototransistors to detect the pendulum passing a certain point would give better results. So!

DIY Projects, Inspiration, How-tos, Hacks, Mods & More @ Makezine.com - Tweak Technology to Your Will The format of this book is very different from the regular O'Reilly books. It is written by a geek for geeks. So it doesn't start with a smooth introduction about the basics. It seems to have a rocky start since a lot of assumptions is made about the reader. The diagrams also seem to be hand-drawn on napkins. Chapter 4 really rocks. Overall the book is excellent for getting started with Arduino. Martijn Thé – iPhone & iPad Development & Interaction Design » Interfacing an optical mouse sensor to your Arduino In this tutorial I’ll describe how you can connect the optical sensor inside a cheap mouse to your Arduino and have it read out the x- and y-movements. This will enable your Arduino to handle mouse input, detect surface movements, measure surface speed, etc. Materials This is what you need: Arduino board (any *duino will do) and the Arduino IDE.Optical mouse containing the PAN3101, ADNS-2610, ADNS-2083 or ADNS-2051 optical sensor. These sensors come in many mice sold today. Step 1 – Open up your mouse! The optical sensor and LED were covered with the black protective cap. Step 2 –Take a look at the datasheets Check out the datasheet of the sensor you’re dealing with (Google).We only need to connect 4 pins of the sensor to the Arduino, of which two are used for data and two for the power supply. Step 3 – Cutting the controller wires (optional) To make sure the mouse’s own controller does not interfere with the Arduino, I had cut the SDIO and SCLK wires running to the chip in the mouse.

Arduino Platform - Differential Gap Control (Solar Tracker) Download schematic and source code - 19.66 KB Introduction This article gives a very simple introduction into writing a differential gap controller on the Arduino platform. I have used a Duemilanove for this example. This project consists of two inputs which track light levels on the East/West which are then used to move a servo, rotating East/West tracking the strongest light level. The crude prototype in all its glory......the surplus MSDN discs have found a use at last: How It Works The two light sensors are basic photoresistors, these are mounted at 90' to each other, imagine these are your eyes, if you look straight ahead at a wall, the left eye would point 45' to the left, and the right eye 45' to the right. When tracking the sunlight, e.g. for a solar panel, you would want the maximum sunlight intensity, to achieve this, both sensors would therefore need to see the same intensity of light. I have also added a very basic 2 point average to help smooth out spikes in the input sensors.

Arduino Tutorial - Learn electronics and microcontrollers using Arduino! So, I get two or three emails a day, all basically asking the same thing: "Where can I learn about electronics?" In general, most of these people have seen some of my projects and want to be able to build similar things. Unfortunately, I have never been able to point them to a good site that really takes the reader through a solid introduction to microcontrollers and basic electronics. I designed this tutorial course to accompany the Arduino starter pack sold at the Adafruit webshop. The pack contains all the components you need (minus any tools) for the lessons Follow these lessons for happiness and prosperity. Lesson 0 Pre-flight check...Is your Arduino and computer ready? Here are some recommended tools: If you need to get any soldering done, you may also want.... All of the content in the Arduino Tutorial is CC 2.5 Share-Alike Attrib. Love it? To some extent, the structure of the material borrows from: The impressively good "What's a microcontroller?"

Arduino Tutorial - Lesson 5 We've done a lot so far, blinking lights, printing messages...all of that stuff is output: signals coming from the Arduino. The next step is to start playing with input, with the Arduino responding to outside events. In this lesson we will begin with the most basic kind of input, a push-button switch! You're probably familiar with switches, there's tons of them in your house. On the left, the switch is open and no current flows. (thanks wikipedia!) In this photo, you can see the internals of a light switch. Light switches are great but we need something smaller. These little switches are a 1/4" on each side, cost about 25 cents, and can plug directly into a breadboard. Normally, the two wires are disconnected (normally open) but when you press the little button on top, they are mechanically connected. To get the buttons to sit better in the protoshield, you may want to straighten out the legs (just squish them with a pair of pliers) so that they look like the button on the left. Fig 5.2

A Multi-Protocol Infrared Remote Library for the Arduino Do you want to control your Arduino with an IR remote? Do you want to use your Arduino to control your stereo or other devices? This IR remote library lets you both send and receive IR remote codes in multiple protocols. To use the library, download from github and follow the installation instructions in the readme. How to send This infrared remote library consists of two parts: IRsend transmits IR remote packets, while IRrecv receives and decodes an IR message. #include <IRremote.h> IRsend irsend; void setup() { Serial.begin(9600); } void loop() { if (Serial.read() ! This sketch sends a Sony TV power on/off code whenever a character is sent to the serial port, allowing the Arduino to turn the TV on or off. How to receive IRrecv uses an infrared detector connected to any digital input pin. The examples/IRrecvDemo sketch provides a simple example of how to receive codes: The IRrecv class performs the decoding, and is initialized with enableIRIn(). Hardware setup Some background on IR codes

Cheap Arduino Wireless Communications I was looking for a way to handle wireless communications between two Arduino boards. Other options like Xbee or Bluetooth were going to cost $50 to over $100. Then I found a cheap RF transmitter and receiver at Sparkfun. The total cost is only $9! Here are a few limitations to RF solution: Communications is only one way. The advantages are that it is cheap and it is pretty easy to use. Below are some images showing how I hooked up the receiver and transmitter to two different Arduino boards. Here’s a picture of the my actual bread boarded circuit. Since the receiver is constantly picking up random noise I add a few extra bytes to every data packet. I broke the Arduino code into two files. I did all of my initial testing without any of these improvement and everything worked fine with these devices inside the same room. Add an antenna. I got a lot of help from the transmitter/receiver data sheets, and from this article. I’ll mention an even cheaper idea I had while doing this. Permalink

The World Famous Index of Arduino & Freeduino Knowledge Tutorials / Using a transistor to control high current loads with an Arduino In this tutorial, you'll learn how to control a high-current DC load such as a DC motor or an incandescent light from a microcontroller. (:toc Table of Contents:) Parts You will need the following parts for this tutorial. Solderless breadboard 22-AWG hookup wire Arduino Microcontroller module 10Kohm potentiometer power diodes (for DC Motor version only) DC power supply TIP120 transistor DC Motor - or - Incandescent lamp and socket (Diagram made with Fritzing) Add a potentiometer Connect a potentiometer to analog in pin 0 of the module: Connect a transistor to the microcontroller The transistor allows you to control a circuit that's carrying higher current and voltage from the microcontroller. Pinout of a TIP-120 transistor, from left to right: base, collector, emitter. Note: you can also use an IRF510 or IRF520 MOSFET transistor for this. The schematic symbol of an NPN transistor where B is the base, C is the collector, and E is the emitter. click the image to enlarge Connect a motor and power supply Notes

Spooky Projects – Introduction to Microcontrollers with Arduino Spooky Projects is a set of four 3-hour classes in October 2006 hosted by Machine Project and taught by Tod E. Kurt. It is an introduction to microcontroller programming and interfacing with the real world using the Arduino physical computing platform. In the class, participants are shown and experiment with the Arduino’s capabilities and learn the basics of common microcontroller interfacing, such as: digital output to control lights and LEDs, digital input to read switches and buttons, analog output to control motor position or LED brightness, and analog input to read sensor inputs. The class assumes no previous electronics knowledge, though it does assume a little programming knowledge. At the end of the class, Mark Allen of Machine Project bestowed upon each of the students an awesome programming merit badge. Blog Posts Class Notes Arduino Sketches Used in Class Processing Sketches Used In Class http_rgb_led — fetch a web page, parse it, send RGB color value to Arduino. Class Kit Parts

Using Relays with Arduino – Turning on the Lights Warning!!! This project deals with AC electricity which is dangerous if you don’t know how to treat it safely. You must treat electricity with caution. There are many books and websites about electrical safety procedures and if you’re not sure how to be safe you should read that information. The most basic advice I can give is always assume any exposed wires are live and touching them will hurt a lot at best and kill at worst. Microcontrollers are good at controlling small devices, but frequently we DIY-ers want to use them to control things that aren’t so micro. The first thing you need is a cheap extension core that you are willing to cut in half. I spliced the relay into the black wire on my power cord. The last step and the one that makes this project useful is getting the microcontroller to control this relay. In this circuit the transistor acts as a switch and it allows you to turn on the relay. Credits

Welcome

Related: