Relay Control with Arduino

Controlling Relay using Arduino

This is the steps to control 5V 10A 2-Channel relay using Arduino.
  1.  Setting up relay and connect to Arduino
    The relay module has 3 pin header and 4 pin header. Make sure 3 pin header is connected as the picture below (JD-VCC and VCC should be connected.).
    Each relay has 3 outputs and the switch symbol on the left side is the default configuration of the relay. The center pin is connected to the bottom pin.
    Next, connect Arduino and relay. I used jumper cable and connected only IN1 pin that controls ch1 relay port. IN2 (ch2 relay port is not used.)
    I used GPIO7 pin to control relay switch, and 5V pin and GND pin are connected.
    Then, you can connect USB to PC.
    Hardware setup is done and next is to run the program.


  2.  Launch Arduino IDE and open the "Blink" example project.
    Go to "File > Examples > 01.Basics > Blink", and it generates new window with the "Blink" project.
    This project is basically toggling GPIO13 pin every 1ms. You can simply reuse this code to toggle relay on and off from the GPIO7 pin in my case, then save the project as you want.
    You will see IN1 LED on relay module toggles and hear the clicking noise from relay that basically tells you the output is switched. When GPIO is "HIGH", 2 and 3 pins are connected, and when GPIO is "LOW", 1 and 2 pins are connected.

Hardware:
Arduino UNO
Relay


Reference:     

CC3200 with Energia

CC3200 with Energia (Arduino IDE like environment)

Energia is very similar framework to Arduino IDE that support TI MSP430 LaunchPad and also other TI LaunchPad including CC3200. I have been using CCS6 to build my CC3200 projects, but as one of the Arduino user, I tried to establish this Energia IDE to see how it works. Here is the steps.
  1.  Install Windows driver
    Download "cc3200_drivers_win.zip" from the following link and execute DPinst.exe for Windows 32bit or DPinst64.exe for Windows 64 bit after unzip the package.http://energia.nu/files/cc3200_drivers_win.zip
    Make sure CC3200 board is not connected when install the driver.
    You can connect the board after the installation, and the board will be recognized automatically. 


  2.  Install Energia
    Download the latest package from the following link.http://energia.nu/download/
    Unzip the energia-0101EXXXX-windows.zip file to a desired location.
  3.  Hardware setup
    To make it work with Energia, you need to modify the board setting. However, this is not so complicated and basically just change the jumper setting of CC3200 LaunchPad and use single wire to connect 2 pins which is top pin of JP8 and bottom pin of SOP2 with the USB connector facing up.
    You can see the details here.
  4.  Launch Energia and run a project
    Double clike Energia.exe. You will see the following which is very similar to Arduion IDE except the color. 
















    |

    Select "Tool > Boards > LaunchPad w/ CC3200"
    .

















    Select "Tool > Serial Port > COMxx". In my case, it is COM33.














    Select "File > Examples > 1.Basics > Blink".



    It will launch new window as below, and click "Verify" to compile.
    After it is successfully compiled, click upload button and you would see the red LED (P64) blinking around every 2 seconds.





Hardware:
CC3200 Launchpad

Reference:     
How to set up Energia on Windows
Upgrading the CC3200 Firmware
CC3200 Jumper Settings

[AKM Chip Booster] Audio ADC AK5704 PCB Design

Designing a PCB prototype with AK5704 is not so difficult and I show an example with my design. People who are not familiar with AK5704,...