Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Arduino Line Follower Robot Circuit Diagram

Arduino Line Follower Robot Circuit DiagramIntro: A line follower robot is one of the best first robotics projects: place it on a black line drawn on white paper, switch it on, and it steers itself along the line. It teaches sensors, motor control and simple decision-making in a single afternoon build.
How It Works: Two infrared sensors look down at the floor. A dark line reflects less infrared light than the white surface around it, so each sensor can tell whether it is over the line or not. The Arduino reads both sensors and decides what to do: both sensors on the line means drive straight, only the left sensor on the line means turn left, only the right sensor on the line means turn right, and neither on the line means stop or search slowly.
Components Required: Arduino Uno or Nano board; two IR obstacle or line sensor modules; L298N motor driver module; two DC gear motors with wheels; robot chassis or a small board; battery pack matched to the motor driver (7.4 V is a common example); jumper wires.
Circuit Connections: Left IR sensor output to Arduino digital pin 2, right IR sensor output to digital pin 3, both sensors powered from 5V and GND. L298N inputs to Arduino digital pins 6, 7, 8 and 9, enable pins to pins 10 and 11. Left motor to the driver's first output pair, right motor to the second output pair. Battery pack to the driver's power input, and the driver and Arduino grounds connected together. Follow the L298N module's own guide for its power jumper.
Build Steps: 1. Mount the two sensors at the front, close to the floor and a small distance apart. 2. Wire the sensors, driver and motors as listed. 3. Load a program that reads pins 2 and 3 and drives the motors straight, left, right, or stopped as described above. 4. Draw a thick black line on white paper and test at slow speed first. 5. Adjust the sensor height and the motor speed until the robot follows smooth curves without overshooting.
Troubleshooting: Robot spins in circles: check that the left and right motors are not swapped. Robot ignores the line: lower the sensors closer to the floor and check the sensor adjustment knobs. Motors too weak: check the battery charge and that the driver is receiving power. Jerky movement: lower the speed and add a short delay between sensor reads.
Safety Note: This project uses low-voltage DC only and involves no mains electricity. Keep fingers clear of spinning wheels, do not short the battery terminals, and ask an experienced maker to check the wiring if you are unsure.
Going Further: Try adding a third centre sensor for smoother steering, a buzzer that beeps at junctions, or a speed control that slows the robot on sharp bends. What track will you draw first — a circle, a curve, or a maze? Tell us in the comments.
Read More

Arduino Gas Leakage Detector Circuit with MQ-2

Arduino Gas Leakage Detector Circuit with MQ-2

Intro

A gas leak is dangerous because it is hard to notice early. This beginner Arduino project watches the air with an MQ-2 gas sensor and raises a loud alarm as soon as the gas level rises above a level you set. It is a useful learning build and a handy early-warning aid for a kitchen or workshop.


How It Works

The MQ-2 sensor changes its resistance when combustible gas or smoke is present. The Arduino reads that change on an analog pin, compares it with a threshold set after calibration in clean air, and shows the level on an LCD. Below the threshold the display stays calm; above it the buzzer sounds and the red LED lights until the air clears.


Components Required

Arduino Uno board; MQ-2 gas sensor module; active buzzer; red LED with a resistor; 16x2 LCD display with I2C adapter; 5V USB power supply; jumper wires and a breadboard.


Circuit Connections

MQ-2 VCC to 5V, GND to GND, analog output A0 to Arduino A0. Buzzer positive to digital pin 8, negative to GND. Red LED anode to digital pin 9 through a resistor, cathode to GND. LCD I2C SDA to A4, SCL to A5 on the Uno. Power the whole circuit from USB 5V for this small build.


Build Steps

1. Wire the sensor and LCD first and confirm the display shows a steady reading in clean air. 2. Let the sensor warm up for a few minutes, then note its clean-air reading as your baseline. 3. Set the alarm threshold a sensible margin above that baseline in the program. 4. Add the buzzer and LED, then test the alarm by bringing a safe test source near the sensor only as the module instructions allow — never by creating a real gas leak. 5. Mount the sensor low near the floor for LPG, since LPG is heavier than air, and keep it away from steam and cooking fumes.


Troubleshooting

Reading stuck high: let the sensor warm up fully and check for fumes, steam or alcohol vapour nearby. Alarm never triggers: lower the threshold step by step and check the A0 wiring. LCD blank: check the I2C address and that SDA and SCL are not swapped. Buzzer weak: check its polarity and that it is an active buzzer, not a passive one.


Safety Note

This is a DIY learning project, not a certified safety device. Never rely on it alone for gas safety, never test it with a real gas leak, and if you ever smell gas in real life, ventilate the room, do not switch electrical devices on or off, leave the area, and call your local gas emergency service. Keep the sensor away from open flames.


Going Further

Try adding a second LED for a warning zone before the full alarm, logging readings over serial, or sending an alert with a Wi-Fi board. The same sensor idea can be adapted to smoke detection practice, with the same safety limits.

Read More

Arduino Water Level Controller Circuit Diagram

 

Arduino Water Level Controller Circuit Diagram

An automatic water level controller saves water and saves you from watching a tank fill. Two simple level sensors tell an Arduino when the tank is low and when it is full, and the Arduino switches the pump through a relay — no manual switch, no overflow.

How It Works

One sensor sits near the bottom of the tank and one near the top. When the water drops below the low sensor, the Arduino turns the pump on through the relay. When the water reaches the high sensor, the Arduino turns the pump off again. Between those two points the pump keeps its last state, so it does not flicker on and off.

Components Required

  • Arduino Uno or Nano board
  • Two water level sensor probes or float switches
  • Single-channel relay module
  • Small water pump (match its voltage to your supply)
  • Power supply suitable for the Arduino and the pump
  • Jumper wires, breadboard and a small enclosure

Circuit Connections

  • Low level sensor to Arduino digital pin 7, high level sensor to digital pin 8, with grounds connected.
  • Relay module signal input to Arduino digital pin 9, VCC to 5V, GND to GND.
  • Pump connected through the relay output contacts, following the relay module's own wiring guide.
  • Keep the low-voltage Arduino wiring separate from any mains wiring.

Safety Note

If your pump runs on mains voltage, treat that part of the build with extra care: keep mains connections inside a closed enclosure, never work on them while powered, and ask an experienced person to check the wiring before first use. If you are unsure, use a low-voltage pump instead.

Build Steps

  1. Mount the two sensors in the tank at the low and high levels you want.
  2. Wire the sensors and relay as listed and test the relay switching with the pump disconnected first.
  3. Load a program that turns the relay on at the low level and off at the high level.
  4. Reconnect the pump, fill and drain the tank slowly, and confirm it starts and stops at the right levels.

Troubleshooting

  • Pump never starts: check the low sensor wiring and confirm the relay clicks when the level drops.
  • Pump never stops: check the high sensor wiring and make sure the sensor is not stuck or shorted.
  • Relay chatter: keep the low and high levels well apart and add a short delay between sensor checks.

Going Further

Once the basic controller works, try adding an LED that shows when the pump is running, a buzzer for a low-water warning, or a display that shows the tank state.

Would you fit this controller to a home tank, a garden tank, or a rainwater store? Tell us in the comments.

Read More

Arduino PIR Motion Sensor Alarm Circuit Diagram

Arduino PIR Motion Sensor Alarm Circuit Diagram

 A PIR motion sensor alarm is one of the most useful first Arduino projects: walk past it, and it sounds a buzzer and lights an LED. It is cheap, it needs no mains power, and it teaches digital inputs, outputs and timing in a single build. Put it by a door, on a desk, or in a model room to learn how real security sensors work.

How It Works

A PIR sensor, such as the HC-SR501, detects changes in infrared heat when a person moves in front of it. Its output pin goes HIGH when movement is detected and LOW again after a short delay. The Arduino watches that pin, and when it sees HIGH, it switches on a buzzer and an LED for a few seconds, then waits for the next movement.

Components Required

- Arduino Uno or Nano board

- HC-SR501 PIR motion sensor module

- Active buzzer (5V)

- LED and a 220 ohm resistor (example value)

- USB cable, jumper wires, breadboard

Circuit Connections

- PIR VCC to Arduino 5V, GND to GND, OUT to Arduino digital pin 2.

- Buzzer positive to Arduino digital pin 8, negative to GND (check your buzzer type: an active buzzer needs only a HIGH signal).

- LED anode through the 220 ohm resistor to Arduino digital pin 13, LED cathode to GND.

- Power the Arduino from USB for this build.

Build Steps

1. Wire the circuit as listed and upload a simple program: read pin 2, and if it is HIGH, turn on pins 8 and 13 for a few seconds.

2. Let the PIR sensor settle for about a minute after power-up before testing, as it gives false triggers while warming up.

3. Walk slowly across its view and check the buzzer and LED respond, then step out of view and check they switch off.

4. Adjust the two small knobs on the PIR module: one sets sensitivity (detection distance), the other sets how long the output stays HIGH.

5. Mount the sensor where it faces the area you want to guard, away from heaters, windows in direct sun, and moving curtains.

Troubleshooting

- Buzzer always on: check the PIR output wiring and let the sensor finish its warm-up minute.

- No detection: raise the sensitivity knob slowly, check the sensor is not facing a heat source, and confirm pin 2 reads HIGH on movement.

- LED works but buzzer silent: check the buzzer polarity and whether your buzzer needs a tone signal rather than a steady HIGH.

- False alarms: lower the sensitivity, move the sensor away from draughts and pets, and shorten the delay setting.

Safety Note

This project uses low-voltage 5V DC only and does not involve mains electricity. It is a learning alarm, not a professional security system, so do not rely on it to protect valuables. If you are unsure about wiring, ask an experienced maker to check the circuit before first use.

Where will you place your alarm first — a doorway, a desk drawer, or a model room? Tell us in the comments.

Read More

Arduino Digital Thermometer Circuit with DS18B20 Sensor

 

Arduino Digital Thermometer Circuit with DS18B20 Sensor

Arduino Digital Thermometer Circuit with DS18B20 Sensor

The DS18B20 is the classic digital temperature sensor for Arduino projects: it sends an exact temperature reading over a single wire, needs no calibration by the builder, and even comes in a waterproof version for water tanks and soil. Paired with a 16x2 LCD, it makes a thermometer you can build in an afternoon.

How It Works

The DS18B20 measures temperature and sends it digitally to the Arduino using the OneWire protocol. The Arduino reads the value every couple of seconds and shows it on the LCD, and an optional buzzer can sound when the temperature crosses a threshold you choose.

Components Required

  • Arduino Uno or Nano board
  • DS18B20 temperature sensor (waterproof version optional)
  • 4.7k ohm resistor (pull-up, essential)
  • 16x2 LCD display
  • 10k potentiometer (LCD contrast)
  • Small buzzer, optional, for a high-temperature alert
  • 5V USB power supply, jumper wires, breadboard

Circuit Connections

  • DS18B20 red wire to 5V, black wire to GND, yellow data wire to Arduino digital pin 2
  • 4.7k resistor between the data wire and 5V (do not skip this, the sensor will not work without it)
  • LCD RS to pin 12, E to pin 11, D4 to pin 5, D5 to pin 4, D6 to pin 3, D7 to pin 8
  • LCD VSS to GND, VDD to 5V, VO to the middle pin of the 10k potentiometer, potentiometer outer pins to 5V and GND
  • Buzzer positive to pin 6 through a resistor, negative to GND, if you add the alert

Build Steps

  1. Wire the sensor, pull-up resistor and LCD exactly as listed.
  2. Install the OneWire and DallasTemperature libraries in the Arduino software.
  3. Upload a sketch that reads the sensor every two seconds and prints the temperature in Celsius on the LCD.
  4. Check the reading against a known thermometer and adjust a small offset in code if needed.
  5. Optional: add a buzzer alert that sounds when the temperature rises above your chosen limit.

Troubleshooting

  • Reading stuck at -127: check the data wire and the 4.7k pull-up resistor first, this is almost always the cause.
  • Reading stuck at 85: the sensor is not finishing its conversion, check power and wiring.
  • LCD blank: turn the 10k contrast potentiometer slowly until the text appears.
  • Garbled display: re-check the six LCD data pins against the list above.

Going Further

Log readings to a computer over serial, add a second DS18B20 on the same wire for inside and outside temperatures, or switch the display to Celsius and Fahrenheit at the press of a button.

What will you measure first — room, water tank, or greenhouse? Tell us in the comments.

Read More

Arduino Ultrasonic Radar System with Servo Display

Arduino Ultrasonic Radar System with Servo Display

An ultrasonic radar is one of the most satisfying beginner Arduino projects: a sensor sweeps back and forth like a tiny radar dish, and nearby objects appear on a display in real time. It teaches distance sensing, servo control and display programming in a single afternoon build, and it looks great on a desk or a science-fair table.


How It Works

An HC-SR04 ultrasonic sensor sits on top of a small servo motor. The servo sweeps the sensor slowly from one side to the other while the sensor sends out sound pulses and listens for echoes. The Arduino converts each echo time into a distance, pairs it with the current servo angle, and draws a simple radar-style plot on an OLED display, with closer objects shown nearer the centre.


Components Required

- Arduino Uno or Nano board

- HC-SR04 ultrasonic distance sensor

- SG90 micro servo motor

- 0.96 inch OLED display (I2C)

- Small buzzer (optional, for a proximity beep)

- USB cable, jumper wires, breadboard

- Cardboard or a small mount to hold the sensor on the servo


Circuit Connections

- HC-SR04 Trig to Arduino digital pin 9, Echo to digital pin 10, VCC to 5V, GND to GND.

- Servo signal wire to digital pin 11, power to 5V, ground to GND.

- OLED SDA to A4, SCL to A5 on an Uno (check your board's I2C pins if you use a Nano).

- Buzzer positive to digital pin 6 through a resistor, negative to GND, if you add the optional beep.

- Power the servo from the Arduino 5V pin only for this small SG90; larger servos need their own supply.


Build Steps

1. Mount the ultrasonic sensor on the servo horn with a small cardboard bracket, so it points forward and sweeps freely.

2. Wire the circuit as listed and upload a sweep program that moves the servo in small steps and records a distance at each step.

3. Draw the radar view on the OLED: a sweeping line at the current angle, and a dot wherever an object is detected.

4. Add the optional buzzer so it beeps faster as an object gets closer.

5. Test with objects at different distances — a book, a bottle, your hand — and check the display matches what you see.


Troubleshooting

- Readings stuck at one value: check the Trig and Echo wiring, and make sure the sensor is not facing a soft surface like a curtain, which absorbs sound.

- Servo jittering: check the power supply and keep the servo wires short; a weak USB port can cause twitching.

- Display blank: confirm the OLED I2C address in your code, and check SDA and SCL are not swapped.

- Noisy distance jumps: add a short pause between readings and average two or three readings per angle.


Going Further

Once the basic radar works, try logging distances to a computer over serial, adding coloured LEDs for near, medium and far zones, or mounting the whole unit on a small robot chassis. The same sweeping-sensor idea is the starting point for obstacle-avoiding robots.


What will your radar guard first — a desk, a doorway, or a model car park? Tell us in the comments.

Read More

The Smallest Arduino Clone Possible

Everybody are making Arduino clones. So I thought I should make THE smallest. I took smallest package atmega88 – 28qfn (5mm x 5mm). Routed smallest possible resonator and as much pads as i could fit on in. The result – Smallest Arduino clone ever! Size is only 7.4mm x 7.4mm! Features include:

  • Auto reset
  • UART
  • SPI
  • 4 analog channels
  • 1 digital i/o
  • one LED
  • funny readme with BOM
It needs arduino bootloader for atmega88 like ottantotto bootloader, probably it needs some hacking too because the resonator is 8MHz not the Arduino regular 16MHz.
Read More

Watering Plant with Arduino

Plants liven up any space by adding a sense of airiness and life. That is – of course – when you don’t forget to water them, and they shrivel up and die. I am very bad at remembering to water plants. That is why I built this self-watering plant to do it for me. Using a soil sensor, and an Arduino-controlled water pump, I have created a system that will never forget to do it.

Making A Self-Watering Plant with Arduino
 
Instead of remembering to water my plants when the soil goes dry, I only have to remember to once and a while refill the water reservoir. In this way, I have decreased my obligation to these plants and put it off to a much later date. Perhaps further iterations of this device can be connected to a rain barrel so that I won’t even have to worry about refilling my reservoir, and the entire system can be fully automated. [Link]
Read More

The Smallest Arduino Clone Possible

Everybody are making Arduino clones. So I thought I should make THE smallest. I took smallest package atmega88 – 28qfn (5mm x 5mm). Routed smallest possible resonator and as much pads as i could fit on in. The result – Smallest Arduino clone ever! Size is only 7.4mm x 7.4mm! Features include:

  • Auto reset
  • UART
  • SPI
  • 4 analog channels
  • 1 digital i/o
  • one LED
  • funny readme with BOM
It needs arduino bootloader for atmega88 like ottantotto bootloader, probably it needs some hacking too because the resonator is 8MHz not the Arduino regular 16MHz. [Link]
Read More

Small FAT Arduino Library - SD Card Reader

The library supports FAT16 formatted SD cards up to 2GB in size. 4GB FAT16 formatted SD cards might work, but is untested. Long file names are not supported. Keep you file names compliant with the old 8.3 standard. The SD card should be connected to the SPI-pins on your Arduino. Pin connections are available in the documentation in the download. [Link]


tinyFAT Arduino Library - SD Card Reader
Read More

I/O Experimenter Board - PCB Version

If you are tired of connecting the same I/O devices every time you prototype a new project then this board could save you a lot of time. All the necessary pins of the devices on the board are accessible through headers that allows easy connection of the board to a breadboard circuit or other development boards (Arduino, etc) using jumper wires. [Link]

I/O Experimenter Board (PCB version)
Read More

Build Your Own RC Tankbot

Here’s a blog post that will show you the setup you’ll need to make your own do-it-yourself radio controlled (RC) tankbot from the ground up. This example uses a few kits from Solarbotics to build your own RC controller, communication link, and tankbot using minimal parts. We even managed to get 250 feet of range out of the deal!

How to Build Your Own RC Tankbot


For this exploit we invite you to move over to the dark side, as the heart of the project isn’t Xbees but instead 2.4GHz IEEE 802.15.4 Radio Frequency Network modules from Synapse Wireless which are actually super simple to use and configure. This post will merely get you started with building a general RC platform, feel free to modify/hack the system to suite your own diabolical requirements. [Link]
Read More

Making A Self-Watering Plant with Arduino

Plants liven up any space by adding a sense of airiness and life. That is – of course – when you don’t forget to water them, and they shrivel up and die. I am very bad at remembering to water plants. That is why I built this self-watering plant to do it for me. Using a soil sensor, and an Arduino-controlled water pump, I have created a system that will never forget to do it.

Making A Self-Watering Plant with Arduino
 
Instead of remembering to water my plants when the soil goes dry, I only have to remember to once and a while refill the water reservoir. In this way, I have decreased my obligation to these plants and put it off to a much later date. Perhaps further iterations of this device can be connected to a rain barrel so that I won’t even have to worry about refilling my reservoir, and the entire system can be fully automated. [Link]
Read More

Rascal Combines Linux and Arduino

Does this sound familiar to you? After spending many hours on optimizing for speed and memory your super-duper MCU application, you can only conclude that it will not run on an Arduino board. You have built the shield (the Arduino compatible extension board) with your special I/O and you wrote most of the software, but these last functions that should add that finishing touch just don’t fit in the board’s memory. Maybe Rascal can help?

Rascal Combines Linux and Arduino

Built around a 400 MHz AT91SAM9G20 ARM9 from Atmel, the Rascal is an open source Linux board compatible with Arduino extension cards or shields. Programming the board is easy thanks to a library written in Python from Pytronics that allows easy access to peripherals and shields. The Rascal’s firmware comes with a web server that can serve as a programming interface; you can write your applications directly in a web browser connected to the Rascal board.[Link]
Read More

Arduino Based Low-Power Wireless Solution

panStamp is an open source project created for the enthusiasts that love measuring and controlling things wirelessly. panStamps are small wireless boards specially designed to fit in low-power applications, simple to program and simple to work with. With panStamps, you can measure almost everything by simply connecting your panStamp to the sensors, placing a battery and sending wireless data from the first moment.


Arduino Based Low-Power Wireless Solution

panStamps are suitable for any kind of project needing remote control and low-power wireless transmissions, including home automation, energy metering, weather monitoring and robot control. If you are one of these three things: a hobbyist, a professional or an end-user, you will find that panStamps provide extreme flexibility and power when creating custom wireless networks. [Link]
Read More

Robot Shield for Arduino

The idea behind this post is to bring together some robot designs and transform them in a new device with new hardware and standard software (arduino of course) and so easier to use.  These robots have three things in common: a mechanical structure, the hardware and the software. While the mechanical part is necessarily different.

Robot Shield for Arduino
We wanted to understand if there was a hardware board that could be common, with a unique development system. The choice, quite obviously, has the Arduino board, which with its development environment is perfect to create similar projects. [Link]
Read More

Ethernet Shield with ENC28J60

One of the most interesting shield that you can mount on the Arduino platform is certainly the ethernet shield, because enable numerous networking applications such as remote control of systems and users, web access and publication of data, and more yet, the simplicity of finding and integrating open-source libraries on Arduino IDE does the rest.
The usefulness of LAN connectivity has meant that the market would respond by offering different ethernet shield, first of all the original Arduino Ethernet Shield, which was accompanied by the good shield by Seeed Studio, both of these circuits are based on the chipset WIZnet W5100, allow multiple socket connections and can work at 100 Mbps. [Link]
Read More

Arduino Leonardo vs Uno

The Arduino team is now shipping their latest creation – the Leonardo. It is the first Arduino to use Atmelʼs ATmegaXU4 series chip with built-in USB. This change is big and it has big benefits. In addition to the built-in USB, it offers more digital and analog pins. This comprehensive guide gives you the details you need to know to start using it – pinout differences, hardware capabilities, new software libraries and more. [Link]
Arduino Leonardo vs Uno – What’s New
Read More

125MHz Dev Board with an ARM Cortex M3

The Simplecortex is a microcontroller development board that is shield compatible with the Arduino. The Simplecortex has a fast microcontroller, the LPC1769 from NXP. This is a ARM Cortex M3 microcontroller with 512KB flash, 64KB RAM and it runs at 120Mhz. To make sure that the Simplecortex is easy to use we made tutorials for almost every peripheral on the chip and examples to get you started.


Simplecortex – 125MHz dev board with an ARM Cortex M3
There are tutorials for simple stuff like IO control up to more advanced tutorials for MicroSD cards. If you have ideas for a new tutorial or made a tutorial yourself, feel free to drop an email or post it in the forum. The Simplecortex also has an onboard debugger. It can also be used to program external devices like a self made PCB for your own project. No more microcontrollers with pre-programmed bootloader needed.
 
 
 
 [Link]
Read More

Hardware MoodLamp Based on LED

Long time ago I came across this page http://tobe.nimio.info/project/moodlamp, where Toon Beerten created a Moodlamp using a PIC16F628 µC. I remember that back then I didn’t have much knowledge on µC’s programming, so the first thing I did was to buy a Arduino board, and since that time I have been learning a lot and making many different projects with it…[Link]


 Open Hardware MoodLamp Based on LED 
 
Time has passed, I’ve built the breadboard prototype, then the first version, using only one layer (which is a good version if you want to etch your own PCB). Always wanted to make the project public as an Open Hardware, but due my lack of time, I never did, until I arrive in Genova. I then decided to make a second version of the board, two layers, the ability to program the µC without removing it from the socket (for programing you will need an Arduino, FTDI or USB-to-serial cable) and some available pins for those who want’s to add more features to the board, like a temperature sensor or another kind of sensor.

Here you will find the information on how to build your own MoodLamp with simple electronic components. I am also planing on selling the MoodLamp kits, if you are interested, please leave a comment below (you can always make a Paypal donation so I can buy some beers!)






 
Read More