Browsing Category

Arduino

Programming ATtiny85 with Arduino Uno

The Attiny85 is a nice little 8 pin chip which is ideal for simple projects, they are low cost and if you have an Arduino you can actually burn the bootloader and upload your sketches to the microcontroller, this is perfect for beginners. I recommend buying one of the cheap Arduino Uno clones for this task and using it for this purpose. To program the ATtiny85 we need to first set Arduino Uno as an ISP. Connect your Arduino Uno to the PC. Open the Arduino IDE and open the ArduinoISP example file (File -> Examples ->…

KY-019 5V relay module

The KY-019 5V relay module Songle SRD-05VDC-SL-C Relay Relay UL/CUL Rating: 10A @ 125V AC, 28V DC Relay CCC/TUV Raiting: 10A @ 250V AC, 30V DC Control high-power devices up to 10A with a simple high/low signal Provides isolation between the microcontroller and the device being controlled Screw terminals for relay connections 3-pin servo-style header for power/signal interface LED indicator provides visual feedback Voltage requirements: 5V DC (Relay Power), 3.3V to 5V DC (Input Signal) Current requirements: ~85…

KY-018 Photo resistor module

The KY-018 Photo resistor module consists of an LDR A photoresistor (or light-dependent resistor, LDR, or photocell) is a light-controlled variable resistor. The resistance of a photoresistor decreases with increasing incident light intensity; in other words, it exhibits photoconductivity. A photoresistor can be applied in light-sensitive detector circuits, and light- and dark-activated switching circuits. A photoresistor is made of a high resistance semiconductor. In the dark, a photoresistor can have a resistance as…

KY-017 Mercury switch module

The KY-017 Mercury switch module is a switch when tilted the mercury in the switch will touch metal contacts and the output will go high Connection KY-017 Arduino S Pin 3 Middle 5v - GND Code //KY017 Mercury open optical module int Led = 13 ;// define LED Interface int buttonpin = 3; // define the mercury tilt switch sensor interface int val ;// define numeric variables val void setup () { pinMode (Led, OUTPUT) ;// define LED as output interface pinMode (buttonpin, INPUT) ;// define the mercury tilt switch…

KY-016 3-color LED module

The KY-016 3-color LED module. The KY-016 RGB LED module consists of a tri color LED, you can adjust the intensity of the three primary colors (red / blue / green) by altering the PWM voltage inputs of the R, G and B pins to achieve full color mixing. Connection KY-016 Arduino R Pin 11 B Pin 10 G Pin 9 - GND Code //KY016 3-color LED module int redpin = 11; // select the pin for the red LED int bluepin = 10; // select the pin for the blue LED int greenpin = 9 ;// select the pin for the green LED…

KY-015 Temperature and Humidity Sensor Module

The KY-015 Temperature and Humidity Sensor Module is based on the DHT11 DHT11 digital temperature and humidity sensor is a composite Sensor contains a calibrated digital signal output of the temperature and humidity. Application of a dedicated digital modules collection technology and the temperature and humidity sensing technology, to ensure that the product has high reliability and excellent long-term stability. The sensor includes a resistive sense of wet components and an NTC temperature measurement devices, and…

KY-013 Analog Temperature Sensor Module

The KY-013 Analog Temperature Sensor Module uses a thermistor to measure ambient temperature based on the resistance of the device. The temperature sensor is a NTC thermistor Multi-point temperature measurement Measures temperatures: -55°C / +125°C Accuracy: + / - 0.5°C Connection Connect board's power line (middle) and ground (-) to 5V and GND respectively. Connect signal (S) to pin A0 of the Arduino. KY-013 Arduino S  A0 middle  5V - GND Code #include <math.h> double Thermister(int RawADC) {…

KY-012 Active Buzzer Module

The KY-012 Active Buzzer Module. The module consists of an active piezoelectric buzzer, it generates a sound of aproximately 2.5kHz when signal is high. Connection Connect signal (S) to pin 8 on the Arduino and Ground (-) to GND. KY-012 Arduino S Pin 8 - GND Code //Example code KY012 active buzzer int speakerPin = 8; void setup () { pinMode (speakerPin, OUTPUT); } void loop () { analogWrite (speakerPin, 255); delay (50); analogWrite (speakerPin, 0); delay (10); } Links 37 in 1 box Sensor Kit For Arduino…

KY-011 Two color LED module

The KY-011 Two color LED module consists of a common cathode 3mm red/green LED. You can adjust the amount of each color using PWM, so we will use 2 PWM pins on our Arduino later on to demonstrate this Connection Its best to use a couple of current limiting resistors since the module does not have any on board KY-011 Resistor Arduino G 330Ω resistor Pin 10 R 330Ω resistor Pin 11 Y GND Code // Arduino test code for KY011 int redpin = 11; // select the pin for the red LED int greenpin = 10; // select the…

KY-010 Photo Interrupter module

The KY-010 Photo Interrupter module consists of an optical emitter/detector. If the sensor is broken the LED is turned on. Connection Connect the power line (middle) and ground (left) to +5V and GND. Connect the signal (S) to pin 3 on the Arduino. KY-010 Arduino - (left) GND middle +5V S (right) Pin 3 Code int Led = 13; // define LED pin int buttonpin = 3; // photo interrupter pin int val; void setup() { pinMode(Led, OUTPUT); // LED pin as output pinMode(buttonpin, INPUT); //photo interrupter pin as…