Category Archives: arduino

Raspberry Pi SPI and I2C Tutorial

Connecting To The Ports
Screen Shot 2020-02-27 at 9.29.03 PM.png
Screen Shot 2020-02-27 at 9.30.44 PM.png

This tutorial will walk you through getting the I2C and SPI interfaces of your Raspberry Pi working. These interfaces aren’t enabled by default, and need some extra configuration before you can use them.

Recommended Reading

Before we get started, you might want to review some related background material.

  • I2C is a useful bus that allows data exchange between microcontrollers and peripherals with a minimum of wiring.
  • SPI is a cousin of I2C with similar applications.
  • For the C/C++ examples, we’ll be using the wiringPi library to interface with these buses
  • For the Python examples, we’ll be using spidev for SPI and smbus for I2C.

How To Make Arduino Human Following Robot

Hey Guys, In this tutorial I am going to show you how to make a DIY Arduino Human Following Robot. So let’s get started 🙂

Code – https://bit.ly/2SY3hBt

Circuit – https://bit.ly/2Vgc2K5

Here’s the Parts List: (Banggood.com)

1) Arduino Uno – https://bit.ly/2Fz8M4q

2) Motor Driver Shield – https://bit.ly/2VWaYsn

3) Wheels (4x) – https://bit.ly/2suQJEY

4) TT Gear Motor (4x) – https://bit.ly/2Rtg2G9

5) Servo Motor – https://bit.ly/2Soq7E4

6) Ultrasonic Sensor – https://bit.ly/2RzebL7

7) Infrared Sensor (2x) – http://bit.ly/2k70nNi

8) 18650 Li-on Battery (2x) – https://bit.ly/2CZabQ7

9) 18650 Battery Holder – https://bit.ly/2sulLwu

10) Male and Female Jumper wire – https://bit.ly/2su6mfM

11) Acrylic Sheet – (Offline Store)

12) DC Power Switch – https://bit.ly/2FtyEzs

(Amazon.in)

1) Arduino Uno – https://amzn.to/35flEXS

2) Motor Driver Shield – https://amzn.to/30Z9ijj

3) TT Gear Motor and wheels set – https://amzn.to/31WSD0Z

4) Servo Motor – https://amzn.to/2IAigNH

5) Ultrasonic Sensor – https://amzn.to/33fwrQa

6) 18650 Li-on Battery (2x) – https://bit.ly/2CZabQ7

7) 18650 Battery Holder – https://amzn.to/33iY4b3

8) Male and Female Jumper wire – https://amzn.to/2MmRjOE

9) Acrylic Sheet – (Offline Store)

10) DC Power Switch – https://bit.ly/2FtyEzs

 

[Flyrobo.in]

Arduino Uno : https://bit.ly/2m8HZnL

Motor Driver Shield : https://bit.ly/2mvO7XL

Wheels : https://bit.ly/2kxPeFF

TT Gear Motor : https://bit.ly/2m4fMid

servo motor : https://bit.ly/2MIdoaB

Ultrasonic Sensor : https://bit.ly/2McGLm1

Male and Female Jumper wire : https://bit.ly/2mu0aVo

Arduino PID Motor Controller

PID Controller

LINKS TO LEARN :

http://forum.arduino.cc/index.php/topic,8652.0.html

http://forum.arduino.cc/index.php?topic=13269.0

SAGAR Update, New Motor Controller and Motors

S.A.G.A.R.’s Smart Motor Controller

Download the EAGLE Schematics, Board Layout and code from here: https://drive.google.com/open?id=0B8lxGSgwuFtYfjVLZHhINUt2cW1taFBDYndudkV6R0xLXzhKR1lRNWRQTVZYOVA1ek5NVk0&authuser=0

INTRODUCTION :

 

The development of high performance motor drives is very important in industrial as well as other purpose applications.  Generally all high performance motor drives use quadrature encoders and PID control because of its simplicity and precise control.  The quadrature encoder acts as a feedback from the motor, it is connected to the microcontroller for furthur processing.

 

 

  With the use of Arduino, l298N and Optical Quadrature Encoder we can drive the dc motor at desired speed having a feedback loop and in this project we have used proportional integral and derivative method in which errors are not only solved but also taken to its minimal value with very low amount of error oscillations.

 

PROPORTIONAL CONTROL: 

The proportional part of PID examines the magnitude of the error and it reacts proportionally. A large error receives a large response

INTEGRAL CONTROL: 

To address the first issue with the proportional control, integral control attempts to correct small error (offset).

DERIVATIVE CONTROL: 

The derivative part of the control output attempts to look at the rate of change in the error signal. Derivative will cause a greater system response to a rapid rate of change than to a small rate of change.

Visit the below link to gain knowledge about PID control.

http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPID

Quadrature Encoder :

The below link shows the working of a quadrature encoder, please visit the link.

http://www.dynapar.com/Technology/Encoder_Basics/Quadrature_Encoders/

The below link shows all about rotary encoders, please go through the link to gain knowledge.

http://en.wikipedia.org/wiki/Rotary_encoder

Materials Used :

  • 1 300 RPM Geared Motor.
  • 1 L298N Motor Driver.
  • 1 Slotted Encoder Disk (32 slots).
  • 2 MOC7811 Optical Slotted Interrupters.
  • 2 10 K Resistors.
  • 1 220 Ohm Resistors.
  • General Purpose PCB.
  • 1 Arduno UNO.
  • Connecting Wires.

The Image below shows the circuit diagram of MOC7811 Optical Encoder, We need to make 2 circuits as we are making a quadrature encoder. SignalOut pin of bothe MOC7811 should be connected to pin 2 and 3 of arduino as these are interrupt pins of the arduino.

Solder the encoders on a general purpose PCB as shown below.

You can add Schmitt Trigger IC CD40106 so as to convert the output of encoders into pure square wave. Connect MOC7811 output to Vi in the below circuit and connect bthe Vo to arduino. There was not much significant difference even after I added the schmitt trigger.

 

Arduino Lessons

Technology Tutorials

http://www.toptechboy.com/

We have provided a methodical set of videos and instructional material to teach you how to use the Arduino Microcontroller. We start simple, and take you through things step by step.

Arduino Lesson 1: In this lesson we take our first look at the Arduino Microcontroller, and you will write your first simple program. Don’t be afraid, we will take you through it step by step with a video and instructional diagrams.

Arduino Lesson 2: In this lesson we build our first external circuit and control it from the Arduino. We use digitalWrite commands to turn the arduino on and off.

Arduino Lesson 3: In this lesson we create a two LED circuit, and we learn about for loops.

Arduino Lesson 4: Learn how to print to your computer screen from the Arduino using your serial port. Good Stuff!

Arduino Lesson 5: Learn how to work with strings in arduino. This is a simple but important lesson

Arduino Lesson 6: This lesson will show you how to get user input from the Serial Monitor. This will take your programming to the next level!

Arduino Lesson 7: This lesson will show you how to implement while loops.

Arduino Lesson 8: This lesson will show you how to write arbitrary voltages between 0 and 5 volts to the arduino pins.

Arduino Lesson 9: Introduction to Ohm’s Law, and using a potentiometer.

Arduino Lesson 10: Reading Analog Voltages with the Arduino

Arduino Lesson 11: Creating a dimmable LED with Arduino

Arduino Lesson 12: Simple and Easy way to read Strings, Floats, and Ints over the Arduino serial port.

Arduino Lesson 13: Control an RGB LED with an Arduino

Arduino Lesson 14: If Statements and Conditionals in the Arduino. In this lesson we learn how to have the user input his color preference, and then turn the RGB led to any color requested by the user.

Arduino Lesson 15: This is a Super Cool project that turns the RGB LED to whatever color that is put in front of a color sensor. It works for an amazing array of color cards.

Arduino Lesson 16: Control the position of a servo from a potentiometer using the Arduino.

Arduino Lesson 17: Measure the Speed of Sound with an Arduino and ultrasonic sensor.

Arduino Lesson 18: Ultrasonic Sensor is used with Arduino to create a distance measuring tool. The measured distance is conveyed to the user by a servo pointing an arrow at a scale.

Arduino Lesson 19: Step-by-step tutorial on connecting and using an LCD display with the arduino.

Arduino Lesson 20: Tutorial on creating a Distance Measurement device based on the Arduino, an LCD, and an ultrasonic sensor.

Arduino Lesson 21: Logging Pressure and Sensor Data onto SD card. This shows you how to easily save your arduino data to an SD card.

Arduino Lesson 22: This lesson presents step-by-step instructions on creating a GPS tracker. This is first part of project, and will be completed in Lesson 23.

Arduino Lesson 23: This lesson presents step-by-step instructions on creating a GPS tracker with data logging capability.

Arduino Lesson 24: Understanding NMEA Sentences, and formatting GPS coordinates properly for display in Google earth.

Arduino Lesson 25: Displaying your GPS data files in Google Earth.

Arduino Lesson 26: Creating a Rugged Prototype Using Wire Wrapping.

Arduino Lesson 27: Use Wire Wrapping to Create a Portable GPS Data Logger that can be Displayed on Google Earth.

Arduino Lesson 28: In this lesson we show how to take your Arduino projects to the next level by learning to program software interrupts.

Arduino Lesson 29: In this lesson we look at the Dos and Don’ts of Software Interrupts on Arduino.

Arduino Lesson 30: Advanced Arduino Interrupt Techniques.

Arduino Lesson 31: Understanding Arduino Arrays.

Arduino Lesson 32: Understanding Arduino Functions

Arduino Lesson 33: Understanding Arduino Local and Global Variables.