Showing posts with label arduinotutorials. Show all posts
Showing posts with label arduinotutorials. Show all posts

Friday 31 July 2020

NEOPIXEL RGB LED MATRIX

In this tutorial I am going to show you how to build a 5*5 RGB LEDMATRIX USING NEOPIXEL. With this matrix  we can display  mesmarizing animations,  emojis and letters supersimple very attractive. lets gets started!

 Features
  • Very small
  • Millions of colours
  •  Only one wire needed for programming
Materials needed
  • 25*neopixel leds (WS2812 5050smd)
  • Arduino (any arduino)
  • 3D printed jig (you can download .stl)
  • Wires
ABOUT 5050 WS2812B LEDS
Each ws2812 led has 4 pins
  1. Vcc (connects to 5v)
  2. Gnd
  3. Din (connects to arduino)
  4. DO (data out  connects to the next leds in data in)

I don't have indidual ws2812b Leds so i decided to took from ledstrip.for that i heated up the strip with soldering iron (watch video for details)
After gathering all  things  lets start the built
First place neopixel leds in 5*5 matrix jig.Remember place every leds in same Direction
After placing all leds on jig first connect every ground pins of each leds in a row. Then connect VCC of all leds of a row. Do the same for remaining rows. After  finishing thats connect data out of first led to the data in of next led. Data out of each rows connect to next rows first leds. Repeat this for all leds. After finishing everything connect all rows vcc together also ground. Finally connect  wires to common gnd, vcc, data in. Next i made a small enclosure  with foam sheet. And placed the matrix inside the foam case. 
Connections to arduino
Vcc to 5v
Gnd to gnd
Din to D7 (any digital pin)
Thats all about hardware connections

REST IS IN  PROGRAMMING

first install fast led library

After uploading code to arduino should use a 1.5 ampere power supply
Because at  maximum brightness  a neopixel led draws around 60 mA current .we have total 25 leds so 25*60=1.5A

Future plans
  •  Planing to make a easy software to generate code
  •  Bluetooth connectivity and controlling 

Saturday 11 July 2020

How to CONTROL NEOPIXEL with ARDUINO


In this tutorial i will you how to control individually addressable RGB LEDs or a WS2812B LED strip using Arduino
Hardware needed
1.Arduino

From AliExpress-https://s.click.aliexpress.com/e/_dW8QEj5
From Amazon
https://amzn.to/2Wb3kfD

2.WS2812 rgb leds 


From AliExpress-
https://s.click.aliexpress.com/e/_dSwtVaP
From Amazon-
https://amzn.to/2W9uGTi
3.5volt 3A power supply
From AliExpress-
https://s.click.aliexpress.com/e/_dYjWKsf
From Amazon-
https://amzn.to/2Zk2AH0

WS2812 NeoPixel LED Strip Working

WS2812 LED strips are addressable and programmable Flexible LED strips which are very useful in creating the custom lighting effects. These LED Strips are powered by a 5050 RGB LED with a WS2812 LED driver inbuilt within it. Each LED consumes 60mA current and can be powered from a 5V DC supply. It has a single input data pin which can be fed from the digital pins of Microcontrollers.


 Depending on the intensity of the three individual Red, Green, and Blue LEDs we can create any color we want.





  1. 16.8 million colors per pixel
  2. Single-wire digital control
  3. Operating Voltage: 5V DC
  4. Current Requirement: 60mA per LED
  5. Flexible LED structure
  6. 5050 RGB LED with WS2812 driver

Circuit diagram

Connections
5v to supply 5v
Common Ground to  arduino and led
Datain  to any adigital pin

Install the fastled library
After downloading fastled library from the below link  
Open Arduino IDE and do the following:
Click on "Sketch" and then click "Include library"
Click on "add .zip library"


Programming the LED

#include
 // header file
#define NUM_LEDS 60
 // number of led present in your strip
#define DATA_PIN 6 
// digital pin of your arduino

Depending on your led strip type select appropriate void setup function

void setup() 
{

FastLED.addLeds(leds, NUM_LEDS);

}
Watch the video to  know more




Saturday 20 June 2020

ultrasonic obstacle avoider car

In this tutorial, I am making  a custom obstacle avoiding robot 


you can directly print these PCBs from seeedstudio 

Seeed Studio Fusion PCB  service takes care of the entire fabrication process from PCB manufacturing,  parts sourcing, assembly and testing services, so you can be sure that they are getting a quality product. After gauging market interest and verifying a working prototype, Seeed Propagate Service can help you bring the product to market with professional guidance and a strong network of connections.


jumper    https://s.click.aliexpress.com/e/_dSRayV5
n20 motors              http://s.click.aliexpress.com/e/_dUKwfYM
https://amzn.to/3dkLvk7
ultrasonic module  http://s.click.aliexpress.com/e/_d66uQiU
https://amzn.to/2Yl9eMR
n20 motor socket  http://s.click.aliexpress.com/e/_dUJpEXq
https://amzn.to/2V2aqCO
n20 wheels http://s.click.aliexpress.com/e/_dXfpot2
https://amzn.to/2Br2rrG
l293d motor driver http://s.click.aliexpress.com/e/_dVSiYYY
https://amzn.to/2Nekggj
castor wheelhttp://s.click.aliexpress.com/e/_dShodxE
https://amzn.to/3eo9znq
Arduino uno                https://s.click.aliexpress.com/e/_dUb9laZ
https://amzn.to/2V2wFZ2



Thursday 18 June 2020

ultrasonic levitation full tutorial with theory

It is very interesting to see something floating in the air or free space like alien spaceships. that is exactly what an anti-gravity project is about. The object (basically a small piece of paper or thermocol) is placed between two ultrasonic transducers which generate acoustic sound waves. The object floats in the air because of these waves which seem to be of anti-gravity.

in this tutorial, let's discuss the ultrasonic levitation and let's build a levitation machine using Arduino


How Is This Possible

To understand how acoustic levitation works, you first need to know a little about gravity, air and sound. First, gravity is a force that causes objects to attract one another. An enormous object, like the Earth, easily attracts objects that are close to it, like apples hanging from trees. Scientists haven't decided exactly what causes this attraction, but they believe it exists everywhere in the universe.

Second, the air is a fluid that behaves essentially the same way liquids do. Like liquids, air is made of microscopic particles that move in relation to one another. Air also moves like water does -- in fact, some aerodynamic tests take place underwater instead of in the air. The particles in gasses, like the ones that make up air, are simply farther apart and move faster than the particles in liquids.

Third, the sound is a vibration that travels through a medium, like a gas, a liquid or a solid object. if you strike a bell, the bell vibrates in the air. As one side of the bell moves out, it pushes the air molecules next to it, increasing the pressure in that region of the air. This area of higher pressure is a compression. As the side of the bell moves back in, it pulls the molecules apart, creating a lower-pressure region called a rarefaction. Without this movement of molecules, the sound could not travel, which is why there is no sound in a vacuum.

acoustic levitator

A basic acoustic levitator has two main parts -- a transducer, which is a vibrating surface that makes the sound, and a reflector. Often, the transducer and reflector have concave surfaces to help focus the sound. A sound wave travels away from the transducer and bounces off the reflector. Three basic properties of this travelling, reflecting wave help it to suspend objects in midair.

when a sound wave reflects off of a surface, the interaction between its compressions and rarefactions causes interference. Compressions that meet other compressions amplify one another, and compressions that meet rarefactions balance one another out. Sometimes, reflection and interference can combine to create a standing wave. Standing waves appear to shift back and forth or vibrate in segments rather than travel from place to place. This illusion of stillness is what gives standing waves their name.
Standing sound waves have defined nodes, or areas of minimum pressure, and antinodes, or areas of maximum pressure. A standing wave's nodes are at the reason of acoustic levitation.

By placing a reflector the right distance away from a transducer, the acoustic levitator creates a standing wave. When the orientation of the wave is parallel to the pull of gravity, portions of the standing wave have a constant downward pressure and others have constant upward pressure. The nodes have very little pressure.

so we can place small objects there and levitate

Circuit diagram

the working principle of the circuit is very simple. The main component of this project is an Arduino, L298 motor driving IC, and ultrasonic transducer collected from the ultrasonic sensor module HCSR04. Generally, the ultrasonic sensor transmits an acoustic wave of a frequency signal between 25khz to 50 kHz, and in this project, we are using HCSR04 ultrasonic transducer. This ultrasonic waves makes the standing waves with nodes and antinodes.

this ultrasonic transducer’s working frequency is 40 kHz. So, the purpose of using Arduino and this small piece of code is to generate a 40KHz high-frequency oscillation signal for my ultrasonic sensor or transducer and this pulse is applied to the input of duel motor driver IC L293D (from Arduino A0 & A1 pins) to drive the ultrasonic transducer. Finally, we apply this high-frequency 40KHz oscillation signal along with driving voltage through driving IC (typically 7.4v) on the ultrasonic transducer. As a result of which ultrasonic transducer produces acoustic sound waves. We placed two transducers face to face in the opposite direction in such a manner that some space is left between them. Acoustic sound waves travel between two transducers and allow the object to float.
please watch video for. More information everything explained in that video


Monday 8 June 2020

How to control cd stepper motor with Arduino




Components needed
  • A4988 stepper motor driver
  • Arduino
  • Variable resistor
  • Battery
  • Breadboard
  • Jumper wires
https://gist.github.com/EDISON-SCIENCE-CORNER/6797403d10c70c9bb0e9b993f174bc6c

Saturday 30 May 2020

Coffin dance playing by arduino

In this tutorial I am how you can use an Arduino to make music using just with a speaker (no MP3 module required).
First watch this video tutorial


Hardware needed
1.an Arduino
2.A speaker or a buzzer
Circuit diagram

Just connect one wire of the speaker to D8 of the arduino and other end to grond of arduino

How does it work?

The Arduino in this circuit creates tones of different frequencies and plays it through the speaker connected to it. The variation of the frequency of the tone(pitch) with correct timings(rhythm) creates music. The Arduino generates a signal and outputs it through the Digital pin 8. This drives the speaker connected to the pin to create sound.In this tutorial, I have programmed the Arduino to play a song ‘astronomia coffin dance’.

Software side

pitches.h library contains all notes  of all frequencies
With the help of pitches.h i created  this project 
How I made melody[ ] and noteDurations[ ] of this song:

If you take a look at the program, you can find two int arrays: melody[ ] and noteDurations[ ]. The first array contains the notes and the second array contains its corresponding durations. I wrote down the musical notes of this song first and then wrote the melody[ ] array with that.
Then I wrote noteDurations[ ] according to the length of each music note. Here 8 = quarter note, 4 = 8th note, etc. Higher value gives longer duration notes. The note and its corresponding duration is what is there in melody[ ] and noteDurations[ ] respectively. You can modify those and create any song according to your ideas






download code from here

Sunday 9 February 2020

HOW TO MAKE CUSTOM ARDUINO

we cant use Arduino board in every project because  Arduino is costly and also big size so...In this blog, I am showing how to make your own customized Arduino boardlet's start with a simple circuit

then using easyeda online PCB designer software i added rest switch power supply and attached led to pin 13 
https://easyeda.com/
after  designing the circuit i converted this circuit to pcb
then I upload gerber files to jlcpcb 

Components

  • ATmega328p Microcontroller IC
  • 28 Pin IC Holder
  • 16 MHz Quartz Crystal
  • Capacitors – 2 x 22pF, 100nF, 
  • Resistors –  330Ω, ,10KΩ
  • LEDs x 2 (Red and Green)
  • Push Button (for Reset)
  • 5V Regulator (7805)

you can download gerber and circuit from here

Sunday 21 April 2019

HOW TO CONTROLL MAX7219 LED MATRIX

HELLO FRIENDS,
in today’s video,i am  showing  how to interface 8×8 LED Matrix with  Arduino .i am also showing how to display  simple text and logos on the LED Matrix. it is  very easy and  a fun project for Arduino or LED matrix beginners.





For this tutorial, we will be using a single 8×8 LED matrix which is based on the MAX7219 LED driver module. The driver module creates an interface which makes it easy to communicate with the LED matrix.You can watch the video tutorial by following the link below.



WHATS WE NEED



1.max7219 based led matrix
2.arduino
3.jumper wires




connect vcc to 5v

connect gnd to gnd

CLK TO D10

CS TO D11

DIN TO D12

MULTIPLEXING
Multiplexing is a technique used to connect devices – typically LEDs (for displays) or buttons (for keyboards) – in a matrix of addressable rows and columns. The advantage is simplification of hardware due to the reduced number of pins required. Multiplexed displays using seven-segment LEDs remain popular due to low cost and high brightness.
The 64 LEDs are driven by 16 output pins of the IC. The question now is how is that possible.  Well the maximum number of LEDs light up at the same time is actually eight. The LEDs are arranged as 8×8 set of rows and columns. So the MAX7219 activates each column for a very short period of time and at the same time it also drives each row. So by rapidly switching through the columns and rows the human eye will only notice a continuous light.