Material density detection system used to create wet wipes with Arduino 2/2

Imagen
Construction of the final prototype Components used The components used have been, per module: Density Bar 1 - Arduino Pro Mini 5v 4 - LDRs 4 - Resistors 1k 2 - PCB Terminal Blocks Communication bar 1 - Arduino Pro Mini 5v 1 - LM2596s DC-DC step down power supply module 2 - PCB Terminal Blocks 1 - Voltage regulator TIP220 1 - Heat Sink for TIP220 1 - Rectangular LED 6W 630lm 6500K COB 170 x 15 mm. Industruino 1 - Industruino PROTO kit 1 - Relay module Keyes_SR1 Arduino with screen 1 - Arduino UNO R3 1 - 16x2 Character LCD module with I2C 3 - Resistors 10k 2 - Resistors 220 1 - LED Red 1 - LED Green 3 - Buttons 1 - Relay module Keyes_SR1 Assembly of the circuit The Fritzing scheme is as follows: Density bar Circuit that manages the density bar This circuit is responsible for obtaining the measurements and send notifications to the communications bar for redirection. Communication bar Circuit that manages the c

Step detection system by a way with Arduino

Description

The purpose of the project is to detect the passing of cars and people at the entrance to an orchard and a warning beep inside this house.
For this project it consists of 2 modules:
  • Module detection step, either of people or cars.
  • Module warning step.
The requirements are:
  • The step detection module, being in the garden, must have a separate power supply, in this case we have put a solar panel and a battery.
  • The module must sound warning when the detection module warn you.
  • The detection module is at the entrance of the garden.
  • The warning module is inside the house.
Detection module with solar panel

Instructions

Components used

The components used have been:

Assembly of the circuit

The Fritzing scheme is as follows:
  • Detection module
Detection module

In this scheme has not been added to the connection part of the Lipo Rider Pro, battery and solar panel, I not to have the designs for Fritzing.
  • Warning module
Warning module

Images of the system mounted inside the laboratory:
  • Detection module
Solar panel with Lipo Rider Pro and battery
Detection module mounted on a breadboard with initial ultrasound detector
Detection module mounted on a breadboard with final ultrasound detector
Top of the PCB detection module without connected components
Top of the PCB detection module with connected components
Detection module inside his waterproof case

  • Warning module
    Warning module mounted on a breadboard
Top of the PCB warning module without connected components

Top of the PCB warning module with connected components

Warning module inside his waterproof case

Software

The libraries used have been:
The code of the Arduino is the following:
  • Detection module
/*
  Título: Modulo_RF_APC220 --> Puerto serie
*/

#include <Ultrasonic.h>

//Pins ultrasonido
const int TRIG_PIN = 12;
const int ECHO_PIN = 13;

Ultrasonic ultrasonic(TRIG_PIN, ECHO_PIN);

void setup()
{
  Serial.begin(9600); // Establecemos la velocidad del puerto serie (Igual que APC220)
}

void loop()
{

  float cmMsec;
  long microsec = ultrasonic.timing();
  cmMsec = ultrasonic.convert(microsec, Ultrasonic::CM);

  Serial.print(int(cmMsec));
  Serial.println("=");

  delay(1000);

}
  • Warning module

// create notes for our song
int C = 131;
int D = 147;
int E = 165;
int F = 175;
int G = 196;

// create an array to hold note values
int songNotes[] = {E, E, E, E, E, E, E, G, C, D, E, F, F, F, F, F, E, E, E, G, G, F, D, C};
// create another array to hold note lengths
int noteDurations[] = {4, 4, 2, 4, 4, 2, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1};

byte byteRead;  //Datos leídos por el puerto serie
long longitud;  //Longitud recibida por el puerto serie

long longitudMaxima = 100;

String inString = "";                          //This string is used to store the incoming data
unsigned int pitch;                            //This is the variable we will use to store the buzzers p

void setup()
{
  Serial.begin(9600);

  longitud = 0;
}

void loop()
{

  while (Serial.available() > 0)
  {
    byteRead = Serial.read();

    //listen for numbers between 0-9
    if (byteRead > 47 && byteRead < 58) {
      //number found
      longitud = (longitud * 10) + (byteRead - 48);
    }

    if (byteRead == 61)
    {
      Serial.println(longitud);

      if (longitud <= longitudMaxima)
      {
        melodia();
      }

      longitud = 0;
    }

  }

}

void melodia()
{
  // iterate through arrays to play each note for its duration
  // plays our jingle once
  for (int i = 0; i < 24; i ++)
  {
    // calculate note duration
    // 1 second divided by note length
    // adjusting value of 1000 can change tempo
    int noteDuration = 1000 / noteDurations[i];
    // sends tone to pin 8
    tone(8, songNotes[i], noteDuration);

    // pause between notes a little to hear them better
    // this can also be used to adjust tempo
    int pauseBetweenNotes = noteDuration * 1.3;
    delay(pauseBetweenNotes);
    // once note is done, stop playing it
    noTone(8);
  }
}

Comentarios

Entradas populares de este blog

Material density detection system used to create wet wipes with Arduino 2/2

Sistema de detección de la densidad del material usado para crear las toallitas húmedas con Arduino 2/2

Sistema de detección de la densidad del material usado para crear las toallitas húmedas con Arduino 1/2