Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Resultando la recta:
Y = A*x + B Ecuación 1
SENSOR DE GAS LPG MQ-2
Donde:
Y1 − Y0 Ecuación 2
A=
X1 − X0
Despejando B de ecuación 1: 𝐵 = 𝑌0 − 𝐴 ∗ 𝑋0
Seleccionando de la gráfica:
X0 = 200 Y0= 1.7 ; X1= 10000 Y1=0.28 𝑙𝑜𝑔10 [0.28] − 𝑙𝑜𝑔10 [1.7]
A=
𝑙𝑜𝑔10 [10,000] − 𝑙𝑜𝑔10 [200]
SENSOR DE GAS LPG MQ-2
Calculando Pendiente y coordenada de Abscisa:
𝑩 = 𝟏. 𝟐𝟗𝟏𝟑𝟏𝟑
// Calcular pendiente y coordenada abscisas // Obtener concentracion 10^(coord + scope * log (rs/r0)
const float scope = (punto1[1] - punto0[1]) / (punto1[0] - punto0[0]); float getConcentration(float rs_ro_ratio)
const float coord = punto0[1] - punto0[0] * scope; {
return pow(10, coord + scope * log(rs_ro_ratio));
void setup()
}
{
Serial.begin(9600);
}
void loop()
{
float rs_med = readMQ(MQ_PIN); // Obtener la Rs promedio
float concentration = getConcentration(rs_med/R0); // Obtener la concentración
Nota: usar software Image2LCD para convertir imagen «Paint» a 128x64 e insertar código en Sketch Arduino
COMUNICACIÓN <<SPI>>
TFT 1.8” COLOR SPI CONEXIÓN ARDUINO
Nota: usar software Image2LCD para convertir imagen «Paint» a 128x160 e insertar código en Sketch Arduino
TFT 1.8” COLOR SPI CONEXIÓN ARDUINO
Nota: usar software Image2LCD para convertir imagen «Paint» a 128x160 e insertar código en Sketch Arduino
TFT 1.8” COLOR SPI CONEXIÓN ARDUINO
Nota: usar software Image2LCD para convertir imagen «Paint» a 128x160 e insertar código en Sketch Arduino
Librería TFT v1.0.5 métodos
Adafruit_ST7735(uint8_t CS, uint8_t RS, uint8_t RST);
fillScreen(uint16_t color);
setRotation(uint8_t r);
setTextColor(uint16_t c);
setTextSize(uint8_t s);
background(color c);
Librería TFT v1.0.5 métodos
fill(uint8_t red, uint8_t green, uint8_t blue);
fill(color c);
noFill();
stroke(color c);
noStroke();
textSize(uint8_t size);
uint8_t getRotation(void);
drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
triangle(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3)
fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color);
drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,int16_t x2, int16_t y2, uint16_t color);
drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size);
point(int16_t x, int16_t y)
quad(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3, int16_t x4, int16_t y4)
Librería TFT v1.0.5 métodos
Punto 2
Coord Y (filas)
radio
(Xcentral , Ycentral)
Punto 1
X1= Sen(2*angulo*0.17453)
Por tanto:
X1= Sen(angulo*0.034906)
Conexión:
Fase A: +A naranja, -A café.
Fase B: +B rojo, -B amarillo.
Diámetro motor: 39*39mm
Altura del motor : 30mm
Longitud del eje: 20mm
CONEXIÓN ARDUINO: MOTOR BIPOLAR
CONTROL: MOTOR BIPOLAR
Diagrama Esquemático A4988
Conexión Mínima Pololu A4988
A4988 Driver Resolution
CONEXIÓN ARDUINO + A4988
CONEXIÓN ARDUINO + A4988
Arduino + 3 A4988 Drivers
Arduino + 3 A4988 Drivers
MOTOR UNIPOLAR 28BYJ-48 5VDC: CONEXIÓN ARDUINO
SECUENCIA DE CONTROL: MOTOR UNIPOLAR
Existen 3 métodos o secuencias diferentes para controlar
Un motor a pasos UNIPOLAR.
Normal:
Es la secuencia mas utilizada y recomendada por los fabricantes. Con esta
Secuencia, el motor avanza un paso por vez y siempre hay 2 bobinas activas.
Con lo cual se obtiene un mayor torque y fuerza de retención.
SECUENCIA DE CONTROL: MOTOR UNIPOLAR
Medio Paso:
IEEE 802.20
80 Mbps 34Mbps y 1 Gbps
WMAN
Rango
WiMax
IEEE 802.16
Zigbee
WLAN WiFi
802.15.4
15.4c 802.11
Bluetooth 802.15.3
WPAN 802.15.1 802.15.3c
Ultra Wide Band
AT Prueba la comunicación
AT+CWSAP="MICROS","PASSWORD",CANAL,ENC
Canal = 1 al 11
enc= 0-Open, 1-WEP, 2-WPA_PSK, 3-WPA2_PSK, 4-WPA_WPA2_PSK
(SOLO AL CONFIGURAR COMO AP, AT+CWMODE=2)
AT+CWLIF (Proporciona lista de IP´s de dispositivos asociados al módulo cuando esta en modo AP)
CONFIGURAR COMO ESTACION: (AT+CWMODE=1, Modo STA)
AT+CWLAP (Lista de AP´s en la cercanía)
AT+CWJAP="micros","12345678“
AT+CIPSTART=<Id>,"tipo","dir. IP",puerto
AT+GMR
AT+CWJAP=“miRED",“passRED"
AT+CIPCLOSE=1 // AT+CIPCLOSE=<Id_Conexion>