• What is Arduino?

    07/02/2020 at 09:48 0 comments

    Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board and a piece of software, or IDE that runs on your computer, used to write and upload computer code to the physical board.

    With the Arduino, you can design and build devices that can interact with its surroundings. The Arduino boards are basically a tool for controlling electronics. They are able to read inputs with their onboard microcontroller (eg. Light on a sensor, an object near a sensor) and turn it into an output (Drive a motor, ring an alarm, turning on an LED, display information on an LCD).

    The Arduino platform has become quite popular with people just starting out with electronics, and for good reason. Unlike most previous programmable circuit boards, the Arduino does not need a separate piece of hardware (called a programmer) in order to load new code onto the board  you can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program.

    A typical example of the Arduino board is Arduino Uno. It includes an ATmega328 microcontroller and it has 28-pins

    Why Arduino?

    Arduino has been used in thousands of different projects and applications. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux. Teachers and students use it to build low cost scientific instruments, to prove chemistry and physics principles, or to get started with programming and robotics.

    There are many other microcontrollers and microcontroller platforms available for physical computing.But  Arduino simplifies the process of working with microcontrollers, it provides some advantage for the users and interested amateurs over other systems.

    Advantage

    Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms.

    Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.

    Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with how the Arduino IDE works.

    Open source and extensible software - The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. Similarly, you can add AVR-C code directly into your Arduino programs if you want to.

    Open source and extensible hardware - The plans of the Arduino boards are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.

     Types of arduino

    Arduino makes several different boards, each with different capabilities. In addition, part of being open source hardware means that others can modify and produce derivatives of Arduino boards that provide even more form factors and functionality. If you’re not sure which one is right for your project, check this guide for some helpful hints. Here are a few options that are well-suited to someone new to the world of Arduino:

    Arduino Uno (R3)

    The Uno is a great choice for your first Arduino. It's got everything you need to get started. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a USB connection, a power jack, a reset button and more....

    Read more »

  • What is a Temperature Controller and how does it work?

    06/25/2020 at 03:56 0 comments

    A temperature controller is a device used to hold a desired temperature at a specified value. The simplest example of a temperature controller is a common thermostat found in homes. For instance, a hot water heater uses a thermostat to control the temperature of the water and maintain it at a certain commanded temperature. Temperature controllers are also used in ovens. When a temperature is set for an oven, a controller monitors the actual temperature inside of the oven. If it falls below the set temperature, it sends a signal to activate the heater to raise the temperature back to the setpoint. Thermostats are also used in refrigerators. So if the temperature gets too high, a controller initiates an action to bring the temperature down.

    Types of Controllers

    Temperature controllers come in many different styles with a vast array of features and capabilities. There are also plenty of ways to categorize controllers according to their functional capabilities. In general, temperature controllers are either single loop or multi-loop. Single loop controllers have one input and one or more outputs to control a thermal system. On the other hand, multi-loop controllers have multiple inputs and outputs, and are capable of controlling several loops in a process. More control loops permit controlling more process system functions.

    Common Controller Applications

    Temperature controllers in industry work much the same way they do in common household applications. A basic temperature controller provides control of industrial or laboratory heating and cooling processes. In a typical application, sensors measure the actual temperature. This sensed temperature is constantly compared to a user setpoint. When the actual temperature deviates from the setpoint, the controller generates an output signal to activate other temperature regulating devices such as heating elements or refrigeration components to bring the temperature back to the setpoint.

    Common Uses in Industry

    Temperature controllers are used in a wide variety of industries to manage manufacturing processes or operations. Some common uses for temperature controllers in industry include plastic extrusion and injection molding machines, thermo-forming machines, packaging machines, food processing, food storage, and blood banks.

    Digital Temperature Controller Circuit

    A Digital temperature controller circuit is a precise temperature controller in medical, industrial and home applications. This system is better than analogue/thermostat system, which has poor accuracy. For example, it can use for temperature control of an incubator where maintaining a precise temperature is very important.

    Features

    Controllers can also have a number of additional optional features. One of these is communication capability. A communication link lets the controller communicate with a PLC or a computer. This allows data exchange between the controller and the host. An example of typical data exchange would be the host computer or PLC reading the process value.

    A second option is a remote setpoint. This feature allows a remote device, such as a PLC or computer, to change the controller setpoint. However, unlike the communication capability mentioned above, the remote setpoint input uses a linear analog input signal that is proportional to the setpoint value. This gives an operator added flexibility by being able to change the setpoint from a remote location. A typical signal might be 4–20mA or 0–10VDC.

    Another common feature supplied with controllers is the ability to configure them using special software on a PC connected via a communications link. This allows quick and easy configuration of the controller and also the option to save configurations for future use.

    Another common feature is a digital input. The digital input can work together with a remote setpoint to select the local or remote setpoint for the controller. It can also be used to select...

    Read more »

  • How to interface HC SR501 PIR sensor with Raspberry pi

    06/23/2020 at 09:03 0 comments

    All living beings radiate energy to the surroundings in the form of infrared radiations which are invisible to human eyes. A PIR (Passive infrared) sensor can be used to detect these passive radiations. When an object (human or animal) emitting infrared radiations passes through the field of view of the sensor, it detects the change in temperature and therefore can be used to detect motion.

    HC-SR501 uses differential detection with two pyroelectric infrared sensors. By taking difference of the values, the average temperature from the field of view of sensor is removed and thereby reducing false positives.

    Interfacing HC-SR501 with Raspberry Pi is easy because the output of sensor is Pi friendly ie. 3.3V and it can be powered from the 5V rail of  Pi.

    You will require following components:

    1. A breadboard (we are using a 400 points breadboard)
    2. an HC-SR501 PIR motion sensor
    3. Dupont jumper wires
    4. A 40 pin GPIO cable (optional)

    The PIR sensor, HC-SR501 consist of 3 pins:



    Vcc – 4.5V to 20V, Input power

    OUTPUT – TTL output of sensor 0V, 3.3V

    GND – Ground

    HC-SR501 PIR bottom view:


    Jumper set:

     The jumper is used to control the trigger mode. When the jumper cap is at the “L” position, the mode is set up as “unrepeated trigger mode”, which means when the module is outputting an HIGH voltage because of human motion it will not be triggered again even if another human motion is detected. When the jumper cap is at the “H” position, the module is setup as “repeated trigger mode”, which means the delaying time will be recalculated when a second human motion is detected during its delaying time.

    Sensitivity adjust: to adjust the detection range

    Time Delay Adjust

    Working of PIR sensor HC-SR501


    The module has a rectangular window with two sub probes 1 and 2 located at two ends of the rectangle. When a body emitting infrared radiation moves from side to side, the time for each probe for detection varies. Larger the time difference, more sensitive the device. It also uses a Fresnel lens to improve sensing aperture and filter in infrared waves.

    Adjustment

    1. For adjusting the detection delay (0.3 seconds to 600 seconds): Turn the potentiometer clockwise to increase and anticlockwise to decrease
    2. For adjusting the sensing distance (3 meters to 7 meters): Turn the potentiometer clockwise to increase and anticlockwise to decrease

    Circuit diagram:


    VccOutputGround are connected to 2 (5V), 26 (GPIO) and 6 (GND) pins of Pi respectively.

    Python Program:

    Copy and paste the following code into your Raspberry Pi

    import RPi.GPIO as GPIO                       #Import GPIO library
    
    import time                                   #Import time library
    
    GPIO.setmode(GPIO.BOARD)                      #Set GPIO pin numbering
    
    pir = 26                                      #Associate pin 26 to pir
    
    GPIO.setup(pir, GPIO.IN)                      #Set pin as GPIO in 
    
    print "Waiting for sensor to settle"
    
    time.sleep(2)                   #Waiting 2 seconds for the sensor to initiate
    
    print "Detecting motion"
    
    while True:
    
    if GPIO.input(pir):             #Check whether pir is HIGH
    
    print "Motion Detected!"
    
    time.sleep(2)              #D1- Delay to avoid multiple detection
    
    time.sleep(0.1)  #While loop delay should be less than detection delay
    

    Output


    Go Here for HC SR501 PIR sensor

    Click Here to explore Raspberry Pi

    This guide has been written in reference to the blog published by electrosome.com