8-channel dual light ignition system, infrared and pushbuttons

In this tutorial we will put together a dual light ignition system, since we can control the ignition and paid by means of an infrared remote control, and also by means of 8 pushbuttons. We will use an 8-channel relay module, an arduino nano, an infrared receiver module, a pcb made of pcbway, and other electronic components. We will assemble the circuit, step by step analyze the source code and finally test all the operation of the system.


You may be interested in projects in Arduino, pic, robotics, telecommunications, subscribe http://www.youtube.com/user/carlosvolt?sub_confirmation=1 videos with full source code and diagrams

Visita DFRobot.com

materials

An Arduino nano

The Arduino Nano is a small board, complete and compatible with the test board based on the ATmega328 (Arduino Nano 3.x). It has about the same functionality as the Arduino Duemilanove, but in a different package. It only lacks a DC power connector and works with a Mini-B USB cable instead of a standard one.

microcontroller ATmega328
architecture AVR
Operating voltage 5 V
Flash memory 32 KB of which 2 KB uses the bootloader
Sram 2 KB
Clock speed 16 MHz
Analog pins IN 8
Eeprom 1 KB
DC current by I/O pins 40 mA (I/O pins)
Input voltage 7-12 V
Digital I/O Pins 22 (6 of which are PWM)
PWM output 6
Energy consumption 19 mA
PCB size 18 x 45 mm
weight 7g

Pin diagram


Female pins


A socket for the Arduino nano


8-channel relay module

characteristics

Controls the on/off of high-powered equipment (appliances). Works perfectly with Arduino, Pic or any other digital system.

Within the wide variety of projects that we can carry out with Arduino, we may want to control high voltage or high amperage components, such as bulbs or water pumps, which cannot be handled directly with Arduino. In these cases it is necessary to use Relays or Reles, these devices allow to control high voltage loads with a small signal.

The module has 8 high quality relays, capable of handling loads up to 250V/10A. Each channel has electrical insulation by means of an optocoupler and a status indicator LED. Its design makes it easy to work with Arduino, as with many other systems such as Raspberry Pi, ESP8266 (NodeMCU and Wemos), Teensy and Pic. This Relay module activates the normally open output (NO: Normally Open) when receiving a logical «0» (0 Volts) and deactivates the output with a logical «1» (5 volts). For Arduino and Relays programming it is recommended to use timers with the «millis()» function and therefore not use the «delay» function that prevents the system from continuing to work while a relay is on/off.

Among the loads that can be handled we have: light bulbs, luminaires, AC motors (220V), DC motors, solenoids, solenoid valves, water heaters and a wide variety of other actuators. It is recommended to perform and verify connections before powering the circuit, it is also a good practice to protect the circuit within a case.

Technical data

8 independent channels

8 1-pole relays 2 shots

Relay coil voltage is 5 VDC

Led indicator for each channel (lights when relay coil is active)

Current-activated: the control circuit must provide a current of 15 to 20 mA

Can be directly controlled by logical circuits

Screw connection terminals (clemas)

Logical signal input terminals with 0.1″ male headers.

Can be directly controlled by logical circuits

 

Food and consumption

The easiest way to power this module is from Vcc and GND of the Arduino board, keeping the Jumper in place, so JD-Vcc Vcc. This connection has two important limitations:

The electrical switching provided by optocouplers is lost, increasing the chance of damage to the Arduino if there is a problem with relay loads.

The current consumed by the relay coils must be provided by the Arduino board. Each coil consumes about 90 mA and the four joints add up to 360 mA. If we add to this the consumptions that other outputs can have, we are very close to the 500 mA that a USB port can supply. In this case the Arduino should be fed with an external source, which increases the current limit to 1 A (in the case of the Arduino UNO).

The safest way is to remove the jumper and power the relay board with two sources: that of the Arduino board connected to Vcc and a second source, with the positive to JD-Vcc and the negative to GND, without being attached to the Arduino board. This connection has as advantages:

There is complete ingessation between the load and the Arduino.

All relay consumption is taken from the second source and not from the Arduino or USB port.

Tickets

The inputs to the board can be connected directly to the digital outputs of the Arduino board. The only precaution to keep in mind is that when Arduino starts when it is fed, the pins are configured as inputs automatically and it can happen that, due to a very short period of time between the start and the correct configuration of these pins as outputs, the control inputs to the relay module are in an undetermined state. This can be avoided by connecting a pull-up with a resistance of 10K to Vcc at each input, ensuring a HIGH state during boot.


Male pins


Ky-022 infrared receiver module

Size: 6.4 * 7.4 * 5.1MM, acceptance angle 90o, working voltage 2.7-5.5V.
Frequency 37.9KHZ, receiving the distance 18 m.

Daylight rejection up to 500LUX, electromagnetic interference capability, built-in dedicated infrared IC.
Widely used: stereo, TV, VCR, CD, set-top boxes, digital photo frame, car audio, remote control toys, satellite receivers, hard drive, air conditioning, heating, fans, lighting and other appliances.

Pinout:

1 …. GND (-)

2 …. + 5V

3 …. Output (S)


Eight pushbuttons


A pcb

Download –> 8-channel infrared light control


source code



RECOMMENDED PROJECT

Deja una respuesta