16-bit shift register module using 74HC595 controlled through NodeMCU

16-bit shift register module will help you to create 16 digital outputs from only 3 digital outputs of NodeMCU. Circuit is done as shown in the diagram. Upload the following program to your NodeMCU.

/* Shift Register Example Turning on the outputs of a 74HC595 using an array Hardware: * 74HC595 shift register * LEDs attached to each of the outputs of the shift register */ //Pin connected to ST_CP (12) of 74HC595 int latchPin = 0;
Read More
Audio player using VS1003, SD card and Arduino Mega, Circuit and program

After completing the circuit, upload the following program to Arduino Mega. Program tested and worked good on Arduino 1.8.10. Change the value of “audioName” to the name of audio file to be played in the SD card. Audio files should be stored in the SD card as shown in the following image.

#include <SPI.h#include <SD.h// SCI Registers const uint8_t SCI_MODE = 0x0; const uint8_t SCI_STATUS = 0x1; const uint8_t SCI_BASS = 0x2;
Read More
VS1003 voice recording and storing in SD card for indefinite time using Arduino Mega, Circuit and program

Upload the following program to Arduino Mega. Open the serial monitor. Now, press the push button switch provided in the circuit. Recording will start and stop in alternate presses of push button switch. Once recording started, press the push button switch again to stop recording. Speak something through the MIC. Voice will be recorded in SD card as “wavFile6.WAV”. Take the SD card from the card reader and play the recorded file on computer.

#include <SPI.h#include <SD.h//#include "SdFat.h" //SdFat SD;
Read More
Display “HEX” data of audio “WAV” file from SD card using Arduino Mega

After completing the circuit, upload the following program to your Arduino Mega. A file named “wavFile6.WAV” should be there in your SD card.

//#include <VS1003ESP12.h//#include <ESP8266WiFi.h#include <SPI.h#include <SD.hconst int xcsPin = A3; const int sdCs = 10; File myFile; char fileName[] = "wavFile6.WAV"; byte data[4]; void disableVS1003(void) { digitalWrite(xcsPin, HIGH); } void setup () { pinMode(sdCs, OUTPUT); // digitalWrite(sdCs, HIGH); // initiate SPI SPI.begin(); // initiate a serial port at 57600 Serial.begin(115200);
Read More
VS1003 voice recording and storing in SD card for definite time using Arduino Mega, Circuit and program

VS1003 voice recording program tested on Arduino version 1.8.10.

#include <SPI.h#include <SD.h//#include "SdFat.h" //SdFat SD; SPIClass mySPI; // VS1003 SCI Write Command byte is 0x02 #define VS_WRITE_COMMAND 0x02 // VS1003 SCI Read COmmand byte is 0x03 #define VS_READ_COMMAND 0x03 // Size of the "wav" file set to 100*512 bytes including the header files const unsigned char RIFFHeader0fn[] = { 'R' , 'I' , 'F' , 'F' , // Chunk ID (RIFF) 0xF8,
Read More
Interfacing 16-bit serial-in parallel-out Shift register module to Arduino UNO

Here, we will see the circuit to interface a 16-bit serial-in parallel-out Shift register module using Arduino UNO. Shift register module is powered from Arduino UNO.

This module will help to create 16 digital outputs from only 3 digital pins of Arduino. This module can be used in applications where more digital outputs are required such as LED cube, LED matrix etc.

Upload the following program to Arduino UNO. Change the value in customDelay() function to change the speed of running LED.

Read More
Temperature monitoring and device control system over WiFi

Program. Tested on Arduino version 1.8.8.

Upload the following program to your NodeMCU. It is a direct communication between your mobile device and NodeMCU. So, after uploading the program, search for available WiFi devices on your Android device. In the available WiFi devices, you could see a device named Cooling-Fan-Controller. Connect to that device by using the password given at the beginning of program. Then open a web browser on your Mobile device and open 192.168.4.1.

Read More
Controlling UM3561 siren module from Arduino UNO

Upload the following program to your Arduino board. While uploading, Arduino board should be disconnected from the power source. While operating the siren, Arduino UNO and siren module should be powered from the same power source.

#define ENABLE 5 // Control pin to BC847 base #define SEL1_TRANS_BASE 2 // (CTRL1) Base of transistor to which PIN 6 (SEL1) of UM3561 connected #define SEL2_TRANS_BASE 3 // (CTRL2) Base of transistor to which PIN 1 (SEL2) of UM3561 connected #define SEL1_BYPASS_GND 4 // (CTRL3) Base of transistor to which SEL1 connected for bypassing to GND // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output.
Read More
7-digit seven segment display module using Arduino UNO through 32-bit serial-in parallel-out shift register module

Upload the following program to Arduino board

//Pin connected to ST_CP (12) of 74HC595 int latchPin = 12; //Pin connected to SH_CP (11) of 74HC595 int clockPin = 11; ////Pin connected to DS (14) of 74HC595 int dataPin = 10; int numDigitArray[7] = {0, 0, 0, 0, 0, 0, 0}; int dotPointArray[7] = {0, 0, 0, 0, 0, 0, 0}; void displayValueAndDigit(byte value,
Read More
7-digit seven segment display module using Arduino UNO
#define D0 9 // A terminal of seven segment display module #define D1 10 // B terminal of seven segment display module #define D2 11 // C terminal of seven segment display module #define D3 12 // D terminal of seven segment display module #define LE1 2 #define LE2 3 #define LE3 4 #define LE4 5 #define LE5 6 #define LE6 7 #define LE7 8 // the setup function runs once when you press reset or power the board void setup() { // initialize digital pins as output.
Read More
X