background preloader

Microcontroller Stuff

Facebook Twitter

Tutorial 5 for Arduino: Motors and Transistors. This tutorial was featured on the official Arduino blog on 3/9/2011 This week, we’ll finally be using the Arduino to control some motors! First up, we’ll control a standard DC motor running off a 9V battery with the help of an NPN transistor and a PWM (Pulse Width Modulated) signal from the Arduino. Next, it’s onto 180 degree servo motors, which we will power on an independent 5V rail using a voltage regulator.

We’ll control the servo using a PWM signal from the arduino, and I’ll show you how you can turn analog distance readings into precise angles for the servo to turn to! I mention in the video that you can control DC motor direction using an H-Bridge. If you want to learn more about analog input filtering in software, check out this example code. The Arduino Contest has been extended! You can download the files associated with this episode here: PCB Quadrotor (Brushless) Quadrotors are the new Segways: a mesmerizing, somewhat magical, self-stabilizing platform that every tech person wants to have. You can't ride a quadrotor (well, maybe you can), but they do fly, and you can build one yourself from scratch! I helped with a previous quadrotor build (Instructable here), and after flying it I decided I wanted to make my own. I had an idea to make a miniature one comprising a single printed circuit board that is both its structural frame and its electronics motherboard.

The end result was "4pcb", a 138-gram micro quadrotor. I designed it in EAGLE, soldered it, and tested it over the course of a few months. Here's some video of it flying, after a lot of control tuning (see Step 13) and practice: More flight video in the final Step! The idea of making a PCB-based quadrotor isn't unique (see links below for other examples), and 4pcb definitely isn't the smallest (see the Picopter Instructable for a really tiny one). Multirotor Frame Kits:HobbyKingArduCopter. Returning an Array in C. Transistor Circuits. 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. In this post I’ll talk about how to turn on household lights with the Arduino microcontroller. 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. Credits. Soil Moisture Sensor Probes. VH400 Soil Moisture Sensor Probes Soil Moisture Sensor Probe Applications Irrigation and sprinkler systems. Moisture monitoring of bulk foods. Rain and weather monitoring. Environmental monitoring. Soil Moisture Sensor Probe Features Extreme low cost with volume pricing. Other Vegetronix Products of Interest Soil Moisture Sensor Probe Pricing and Ordering Info Contact us for pricing information.

Soil Moisture Sensor Relay Boards The quickest way to evaluate if the VH400 series is right for you is to also order some of our sensor relay boards. Soil Moisture Sensor Probe Specifications Soil Moisture Sensor Probe Wiring Table VH400 Soil Moisture Sensor Probe Drawing VH400 Soil Moisture sensor Drawing Soil Moisture Sensor Probe Technical Literature See our Soil Moisture Sensor Probe Application Notes for reference designs and information on how to use the soil moisture probe in larger systems. How to Get Started with the Soil Moisture Sensor Probe How To Wire Up a Soil Moisture Sensor. Electric Imp promises a simpler cheaper path to the Internet of Things. Los Altos-based start-up Electric Imp is looking to make putting the "things" into the Internet of Things both cheaper and simpler with Imp - a Wi-Fi equipped card designed to connect appliances to the internet so that users can remotely monitor and control them.

A similar concept to the Twine system we saw back in 2011, Imp is geared towards simple installation and works with a range of appliances. The biggest novelty here is that the card combines the power of Wi-Fi with cloud computing provided by Electric Imp, so manufacturers don’t need to create specific management software. Users can link up with other users and services online as well as monitoring the device connected with the Imp through a web-browser or smartphone. Behind the high-tech appeal of the innovation is a rather domestic story, which is just as well since it’s in the home that it will most likely be put to work.

Electric Imp has announced that it will start shipping a developer preview bundle in late June. BUILD CIRCUIT. How to Build a Robot Tutorial - Society of Robots. What are microcontrollers? They are what their name suggests. Today they can be found in almost any complex electronic device - from portable music devices to washing machines to your car. They are programmable, cheap, small, can handle abuse, require almost zero power, and there are so many variaties to suit every need. This is what makes them so useful for robotics - they are like tiny affordable computers that you can put right onto your robot. Augmented Microcontrollers and Development Boards In a pure sense, a microcontroller is just an IC (integrated circuit, or a black chip thing with pins coming out of it). However it is very common to add additional external components, such as a voltage regulator, capacitors, LEDs, motor driver, timing crystals, rs232, etc to the basic IC.

As a beginner it is probably best to buy an augmented microcontroller. In the long term however you should build your own augmented microcontroller so that you may understand them better. So what is analog? Arduino NetServer. To achieve Internet Controlled Electronics , in the other words , the main functions of Arduino NetServer are : Web Server handles the communication between your PC and Internet User. Serial Port will be the interface between your Arduino (electronics) Project and PC. This is how you control / monitor electronics from internet. With this simple homemade Web Server function , the user does not need to install any other heavy software for Web Server.

The tutorial of how to make your own Web Server can be found here. There's a simple job need to be done or monitored in a remote place which you can not or do not wanna go there once a while. So make them online , then monitor and control them from the Internet! This is another example. The General Idea demonstrates here is : [ Acknowledgement ] Special thanks to Cara did the the remote control test for me from the other side of internet. Copyright © 2010 bdragon All rights reserved.bdragong@gmail.com. IXACP - Internet Controlled Vehicle.

IXACP stands for "Internet XBee Arduino Controlled Project". This project contains Arduino NetServer - Web Server for Internet Control , XBee - Wireless Remote Control the Vehicle , Arduino - Handle communication , Inputs and Outputs. Please also visit XRobot17 if you are interested in C/C++ windows programming , PC Game programming , Physics Simulation , and Computer Controlled Electronics(RC Car). Internet Controlled Vehicle uses Arduino NetServer to achieve online monitor / control. Which means the people can use an Internet Browser , such as Firefox or IE , to monitor / control their Electronic Project. The vehicle with a robotic arm , can be controlled and monitored through an internet browser. XBee module for wireless control. An USB Gamepad. The program with functions : serial port communication , Web Server , USB Gamepad operation. A tiny Web Server , one of the key functions of the program. The user can turn on the webcam by click the button.

Project – Arduino + Servo + iPhone. Projects. Learning Arduino with the Fritzing Starter Kit. Welcome to YouTube! The location filter shows you popular videos from the selected country or region on lists like Most Viewed and in search results.To change your location filter, please use the links in the footer at the bottom of the page. Click "OK" to accept this setting, or click "Cancel" to set your location filter to "Worldwide". The location filter shows you popular videos from the selected country or region on lists like Most Viewed and in search results. To change your country filter, please use the links in the footer at the bottom of the page. Loading... 1 5:15 Learning Arduino Episode 001 - Electronic Basics by Fritzing Org 12,077 views 2 2:30 Learning Arduino Episode 002 -- Arduino introduction by Fritzing Org 4,678 views 3 11:32 Learning Arduino Episode 003 -- Digital Out with Blink by Fritzing Org 4,322 views 4 8:34 Learning Arduino Episode 004 -- Digital Out with SOS by Fritzing Org 2,696 views 12 5:48 Learning Arduino Episode 012 -- FIRMATA by Fritzing Org 2,281 views.

Arduino. How-To: Shrinkify Your Arduino Projects. Make: Arduino. Simple Bots. What is a bot? Is it an abbreviation for robot? Perhaps. You could say that. I, on the other hand, like to think of a bot as an abbreviated robot. It is more like a proto-robot. Something that starts to take on the autonomous nature of a robot, but hasn't quite yet evolved complex digital logic. With this in mind, I set out to make a series of Simple Bots based on the following guidelines: It needs to be able to be quickly and easily manufactured with readily available items. Arduino, electronics, robotics, hacking) - #42. Www.parallax.com/Portals/0/Downloads/appnt/stamps/bs1Appnotes.pdf.

Www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf. ArduinoToBreadboard. This tutorial explains how to migrate from an Arduino board to a standalone microcontroller on a breadboard. It's similar to this tutorial, but uses an Arduino board to program the ATmega on the breadboard. Unless you choose to use the minimal configuration described at the end of this tutorial, you'll need four components (besides the Arduino, ATmega328, and breadboard): a 16 MHz crystal, a 10k resistor, and two 18 to 22 picofarad (ceramic) capacitors. Uploading Using an Arduino Board Once your ATmega328p has the Arduino bootloader on it, you can upload programs to it using the USB-to-serial convertor (FTDI chip) on an Arduino board. Uploading sketches to an ATmega on a breadboard. Minimal Circuit (Eliminating the External Clock) If you don't have the extra 16 MHz crystal and 18-22 picofarad capacitors used in the above examples, you can configure the ATmega328 to use its internal 8 MHz RC oscillator as a clock source instead.

Attention This procedure works on Arduino 1.0.x software. Circuit Symbols of Electronic Components. Introduction to C. This tutorial is designed to be a stand-alone introduction to C, even if you've never programmed before. However, because C++ is a more modern language, if you're not sure if you should learn C or C++, I recommend the C++ tutorial instead, which is also designed for people who have never programmed before. Nevertheless, if you do not desire some of C++'s advanced features or simply wish to learn C instead of C++, then this tutorial is for you! Getting set up - finding a C compiler The very first thing you need to do, before starting out in C, is to make sure that you have a compiler.

What is a compiler, you ask? Intro to C Every full C program begins inside a function called "main". #include <stdio.h> int main() { printf( "I am alive! Let's look at the elements of the program. The next important line is int main(). The printf function is the standard C way of displaying output on the screen. The next command is getchar(). The final brace closes off the function. Explaining your Code Wrong. Www.smileymicros.com/QuickStartGuide.pdf. Stepper motor. Animation of a simplified stepper motor (unipolar)Frame 1: The top electromagnet (1) is turned on, attracting the nearest teeth of the gear-shaped iron rotor. With the teeth aligned to electromagnet 1, they will be slightly offset from right electromagnet (2).Frame 2: The top electromagnet (1) is turned off, and the right electromagnet (2) is energized, pulling the teeth into alignment with it.

This results in a rotation of 3.6° in this example.Frame 3: The bottom electromagnet (3) is energized; another 3.6° rotation occurs.Frame 4: The left electromagnet (4) is energized, rotating again by 3.6°. When the top electromagnet (1) is again enabled, the rotor will have rotated by one tooth position; since there are 25 teeth, it will take 100 steps to make a full rotation in this example. A stepper motor (or step motor) is a brushless DC electric motor that divides a full rotation into a number of equal steps. Fundamentals of operation[edit] A stepper motor A bipolar hybrid stepper motor. C Tutorial. C Language Tutorial Table of Contents: This section contains a brief introduction to the C language. It is intended as a tutorial on the language, and aims at getting a reader new to C started as quickly as possible. It is certainly not intended as a substitute for any of the numerous textbooks on C. The best way to learn a new ``human'' language is to speak it right from the outset, listening and repeating, leaving the intricacies of the grammar for later.

An excellent textbook on C by two well-known and widely respected authors is: The C Programming Language -- ANSI C Brian W. Dennis Ritchie designed and implemented the first C compiler on a PDP-11 (a prehistoric machine by today's standards, yet one which had enormous influence on modern scientific computation). 1. Let's be polite and start by saluting the world! #include < stdio.h> void main() { printf("\nHello World\n"); } Save the code in the file hello.c, then compile it by typing: gcc hello.c 2. Gcc sine.c -lm 3. And the for loop: 4. GCC, the GNU Compiler Collection. Finder Results.