Quantcast
Channel: Embedded Lab
Viewing all 713 articles
Browse latest View live

Upcycling a vintage film camera with Raspberry Pi

$
0
0

Gone are the days of vintage film cameras. If you still have one such camera lying around, you might want to consider upcycling it to a digital camera as a weekend fun project following this instrcutable. The author shows how to convert a 35mm twin-reflex film camera to digital using a Raspberry Pi zero with a camera module connected, a 1.8″ TFT LCD, and a rechargeable USB power bank. The camera also implement a push button for snapping pictures.

A vintage film camera turned digital using Raspberry Pi zero

A vintage film camera turned digital using Raspberry Pi zero

The hardware setup for this project is simple. The TFT LCD data and control pins directly connect to the I/O pins of the Pi Zero. The LCD screen fits into the viewfinder spot of the twin-reflex camera so that you can visually see the field of view of the camera lens while snapping shots. The instructable also describes a detail software setup process along with python scripts for controlling camera and uploading the pictures to user’s dropbox account via WiFi. If you love watching videos, the author has also posted the same instructions in a two-part video tutorial. The link to the first part is posted below:

The post Upcycling a vintage film camera with Raspberry Pi appeared first on Embedded Lab.


Bluetooth enabled pedometer design

$
0
0

Microchip provides an application note describing a Bluetooth Low Energy (BLE) enabled pedometer example that uses an MSP430F5229 reference pedometer design  is a portable electronic device that uses PIC16LF1718, a cost effective 8-bit microcontroller with extreme low power (XLP), the Microchip RN4020 Bluetooth 4.1 Low Energy Module,
and the Bosch Sensortec BMA250E digital triaxial accelerometer. The pedometer can be worn on the wrist like a bracelet/watch and the on-board RN4020 BLE module allows the pedometer demo to communicate with a smartphone or tablet on which the user’s exercise progress can be tracked. The pedometer demo is powered by a single 3V coin lithium battery (CR2032).

BLE-enabled pedometer

BLE-enabled pedometer

The Microchip pedometer demo uses a Bosch 10-bit triaxial digital accelerometer (BMA250E) to detect the motion of the wearer. The Microchip pedometer demo firmware running in the PIC16LF1718 microcontroller contains a step detection algorithm library developed by Bosch Sensortec. A step detection function in this library is called
periodically by the user application. The microcontroller will read the acceleration data of X/Y/Z axes from the accelerometer via an I2C™ interface when the step detection function is called. The step detection function then analyzes the accumulated acceleration data and determines the number of steps taken by using pattern recognition. The accumulated number of steps can be shown on the three digit 7-Segment LED displays or a BLE application running in a smartphone/tablet that is paired with the RN4020 BLE module.

The post Bluetooth enabled pedometer design appeared first on Embedded Lab.

Controlling relay switches with an infrared remote

$
0
0

The infrared (IR) communication technology, which existed long before WiFi and Bluetooth, is still a key component in implementing major components of a typical home automation system. For example, IR technology is still used in cordless headphones, for intrusion detection in home security systems, and in handheld remotes for controlling home entertainment systems (TV, DVD, soundbox, etc), air-conditioning units, and other household appliances. Because IR technology requires a line-of-sight between the transmitter and receiver units, it can only be used for connecting devices in short range, like in a same room. In one of my previous articles, I wrote about a simple IR remote control circuit based on the CD4017 decade counter IC. That was capable to switch on and off any home appliance hooked to it by using any TV/DVD remote. Today, I am going to show how to make an Arduino-based IR receiver for decoding the IR signals coming from a TV/DVD remote. Based on the decoded values corresponding to specific buttons on the remote, we will program the Arduino to control multiple relay switches.

Controlling multiple relay switches using an IR remote

Controlling multiple relay switches using an IR remote

Circuit setup

The IR signal transmitted by a remote can be easily interfered by other nearby IR sources, such as heaters and incandescent lamps. Therefore, in order for the receiver to distinguish between the IR signals and all other sources of infrared noise, the transmitted IR signal is modulated. For modulation, a stable carrier frequency (typically 30–60 kHz) is required, with 38Khz being the most commonly used carrier frequency. Although there are several digital modulation techniques, most of the modern consumer electronics use Amplitude Shift Keying (ASK) for designing IR remote control units. In ASK, the amplitude of the carrier is varied in accordance with the digital input signal. Logic 1 is represented by a carrier signal of certain amplitude, while logic 0 is represented by changing the carrier amplitude to zero (or turning it off). You can find a lot more detail on IR modulation schemes in the following application notes:

IR remote control implementation … from TI

IR remote control techniques … from NXP

In this project, we will use IR signals coming from a TV remote for controlling multiple relay switches. In order to do that, we need an IR receiver circuit that would demodulate the IR signals transmitted by the TV remote. The demodulated digital output can be then directly interpreted by Arduino.

The receiving circuit for this project is built with the TSOP1740 IR receiver. The TSOP17XX series are miniaturized receivers with photo detector and preamplifier built in one package and are ready to use for infrared remote control systems. A bandpassfilter, an integrator stage and an automatic gain control are also used inside to suppress unwanted noises. The last two digits (XX) of its name represent the center frequency of the bandpass. Therefore, the TSOP1740 operates for a modulated IR signal of 40 KHz. For more details on TSOP17XX receiver, check the datasheet.

TSOP17XX series IR receiver

TSOP17XX series IR receiver pin diagram

Shown below is the complete circuit setup required for this project. The demodulated output from TSOP17340 goes to Arduino pin D11. A dual relay control board is used in this demonstration. The control pins (IN1 and IN2) for the two relays are driven by D6 and D7 I/O pins of Arduino. The entire circuit operates at 5V.

TSOP1740, dual relay module, and Arduino wiring

TSOP1740, dual relay module, and Arduino wiring

The relay board used in this project was purchased on Aliexpress for ~$3 and features optocouplers for electrical isolation between the input control pins and output relay driver circuit. The board looks like following.

Dual channel relay board

Dual channel relay board

I have found that the onboard driver circuit for the two relay unite operates with active low inputs. That means, the IN pin must be pulled low to activate the relay. The following circuit describes how the relay control logic works. The same circuit is applicable for the second relay unit too. The jumper JP1 allows you to choose a separate power supply (marked as JD-VCC on the board) for the output side (relay and its transistor driver). If you want to use the same 5V power supply for the entire circuit, you need to place a shunt jumper (provided) between VCC and JD-VCC pins. It should be easy to follow from the circuit diagram that a logic 0 at the input turns the optocoupler on, which then activates the relay.

Relay and optocoupler circuit

Relay driver and optocoupler circuit

Shown below is the complete hardware setup made on a breadboard. An Arduino Nano board is used in this project.

Complete circuit setup on a breadboard

Complete circuit setup on a breadboard

Software

After the hardware setup is complete, we will now program the Arduino Nano to receive the TSOP1738 demodulated output and interpret the codes for individual button presses on the remote. There are many different infrared protocol standards or data formats that are designed by different manufacturers for use in consumer electronics. The most commonly used protocols are RC-5 and RC-6 from Philips, SIRC from Sony, NEC, JVC, Sharp, and Nokia NRC17. Each of these protocols have their own formats of sending data, which consists of some address bits and some command bits. Describing each of these protocols is beyond the scope of this article. I would suggest the interested readers to look online if they want more details, or check out the following links.

Vishay Document (Data Formats for IR Remote Control)

AN1064 Microchip Application note

We have a really nice IRremote library, contributed by Ken Shirriff, that allows you to transmit and send infrared remote control codes in different data formats using Arduino. We are using this library to decode the IR codes transmitted by an IR remote. In this example, I am using a Sony brand Blueray Disc player remote, which uses SIRC protocol for sending IR data.

We will develop the Arduino firmware for this project in two steps. First, we will write a simple program to find out the numeric codes (or decimal values) for specific buttons on the remote. It will read the IR receiver output, decode the message, and print out the type of protocol used and the decimal value for the transmitted code on a serial monitor window. The program to do that is posted below (code is adapted from IRrelay example written by Ken Shirriff).

#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void dump(decode_results *results) {
 int count = results->rawlen;
 if (results->decode_type == UNKNOWN) {
 Serial.println("Could not decode message");
 } 
 else {
 Serial.println("Signal received.");
 if (results->decode_type == NEC) {
 Serial.print("Decoded NEC, ");
 } 
 else if (results->decode_type == SONY) {
 Serial.print("Decoded SONY, ");
 } 
 else if (results->decode_type == RC5) {
 Serial.print("Decoded RC5, ");
 } 
 else if (results->decode_type == RC6) {
 Serial.print("Decoded RC6, ");
 }
 Serial.print("Value= ");
 Serial.print(results->value, DEC);
 Serial.print(" (");
 Serial.print(results->bits, DEC);
 Serial.println(" bits)");
 }
 
}

void setup()
{
 Serial.begin(9600);
 Serial.println("IR decoder");
 irrecv.enableIRIn(); // Start the receiver
}

int on = 0;
unsigned long last = millis();

void loop() {
 if (irrecv.decode(&results)) {
 // Wait for 0.5sec before decoding another code
 if (millis() - last > 500) {
 
 dump(&results);
 }
 last = millis(); 
 irrecv.resume(); // Receive the next value
 }
}

Download the above test code

The hardware setup for this test program is not different than what was described above. Now, you aim a remote towards the TSOP1740 module on the breadboard and press a button, and you will see the decoded decimal value for that button displayed on the serial monitor window. Make sure the serial monitor baud rate is selected to be 9600. If your remote uses a different data coding scheme that is not present in the list of supported protocols of the IRremote library, then it won’t be able to decode the code.  I tested it with two different remotes: one came with my Sony Blueray player and another with my HP All-in-one computer. It was able to decode both. I could see on the serial monitor window that the HP remote uses Philips RC-6 protocol, while Sony uses its own SIRC protocol. With my Sony remote, I noted down the decimal codes for VOL+, VOL-, CH+, CH-, PAUSE, and PLAY buttons on the remote, as displayed below.

testserialmonitor

Decoding the IR message

Now we know what code is sent out for specific button presses, we can modify the code to implement additional logic for switching the relay circuits. We will program the Arduino to perform the following logic.

When VOL+ is pressed, Relay1 is turned ON.

When VOL- is pressed, Relay1 is turned OFF.

When CH+ is pressed, Relay2 is turned ON.

When CH- is pressed, Relay2 is turned OFF.

When PAUSE button is pressed, both relays are turned OFF.

When PLAY button is pressed, both relays are turned ON.

The following code does this task.

/* Project: Arduino relay switch using an IR remote control
 * 
 * Raj Bhatt (Nov 25, 2016)
 * http://www.embedded-lab.com
*/


#include <IRremote.h>
#define SW1 6 // Relay control pins are 6 and 7
#define SW2 7

int RECV_PIN = 11; // IR receive pin is 11
IRrecv irrecv(RECV_PIN);
long int decodedCode; 

decode_results rcv;

void controlRelays(){
 if(decodedCode == 1168) digitalWrite(SW1, LOW); 
 if(decodedCode == 3216) digitalWrite(SW1, HIGH); 
 if(decodedCode == 144) digitalWrite(SW2, LOW); 
 if(decodedCode == 2192) digitalWrite(SW2, HIGH); 
 if(decodedCode == 625479){
 digitalWrite(SW1, HIGH); // All off 
 digitalWrite(SW2, HIGH); 
 }

 if(decodedCode == 363335){
 digitalWrite(SW1, LOW); // All on 
 digitalWrite(SW2, LOW);
 }
 delay(300);
}

void setup(){
 pinMode(SW1, OUTPUT);
 pinMode(SW2, OUTPUT);
 digitalWrite(SW1, HIGH); // Relay is active low, so HIGH will turn it off at startup
 digitalWrite(SW2, HIGH); 
 Serial.begin(9600);
 Serial.println("IR relay controller");
 irrecv.enableIRIn(); 
}

void loop(){
 if (irrecv.decode(&rcv)) {
 Serial.print("Signal received, Value= ");
 decodedCode = rcv.value;
 Serial.println(decodedCode, DEC);
 controlRelays();
 irrecv.resume(); 
 }
}

Dowload the relay control program

Output

After uploading the program to Arduino, enjoy the fun of turning the relays ON and OFF with the remote. You can easily add more relays to other free I/O pins of Arduino and add more if statements to control them in a similar fashion.

 

IR

Controlling relays with a Sony Blueray Disc Player remote

 

The post Controlling relay switches with an infrared remote appeared first on Embedded Lab.

DIY GSM cellphone using Arduino

$
0
0

A very simple DIY GSM phone designed by bobricius using Atmega328 and SIM800L Quad-band GSM/GPRS Breakout Module. The phone uses Avago HCMS 8 digit display and 16 keys for dialing numbers. The current firmware can perform basic tasks like answering to incoming calls, dialing a number, display battery, signal and network status.

DIY GSM cell phone

DIY GSM cell phone

The post DIY GSM cellphone using Arduino appeared first on Embedded Lab.

Personal location tracker

$
0
0

Tiobel‘s Track Me project describes a personal GPS tracker using an Arduino Mega along with a GPS module and a GPRS Shield. The GPS module finds its location using data from more than 3 satellites. In order to retrieve the location remotely, you need to call the number of the SIM card placed into the GPRS shield, and the system will send you back an SMS with the actual position and it’s link to the google maps.

GPS tracker using Arduino

GPS tracker using Arduino

The post Personal location tracker appeared first on Embedded Lab.

OpenRC Tractor

$
0
0

OpenRC is an open source 3D printed RC tractor designed all from scratch. It is a 1/10 scale replica of an original Ebro 160D tractor, with RC electronics.

OpenRC Tractor

OpenRC Tractor

I also prepared some basic instructions and BOM, so you can easily print and assemble your own tractor.
It is designed to be easy to print and no supports are needed for any part.

Points to bear in mind:

  • As part of optional parts, you’ll find different optional plates. There is one for Spain and one for Sweden because there are already OpenRC tractors in both countries. If you print your tractor and you would like to have a plate with your country letters, write a comment and I will try to add it.

  • Recommended motors have poor torque. They work on smooth surfaces but not off-road. I’m preparing a mod to upgrade the tractor with a more powerful motor (coming soon…)

  • I used same bearings as OpenRC formula1 to make it easier for those who already have the F1.

The post OpenRC Tractor appeared first on Embedded Lab.

DIY IoT breathalyzer

$
0
0

Dominic Peters shares his project about making an IoT breathalyzer using ESP8266 on Hackster.io. It uses the MQ3 sensor for detecting alcohol concentration on your breath. The ESP8266 reads the sensor data and post it to Cayenne IoT platform so that the data can be recorded and viewed over time from anywhere via internet.

IoT Breathalyzer

IoT Breathalyzer

The device needs to be portable and durable if it should be used while under the influence. The 11.1 Wh/hr lipo battery provides about 8 hours of continuous use. All the components are stuck to the battery pack with thick double sided tape. I hope this provides some shock absorption in case of drops. The enclosure is made of two 3mm aluminum plates bolted together. Aluminum is a great material to work with because it cuts and drills easily, but that also means that it is easily scratched as seen by the pictures. Regardless, it will protect the battery and electronics in most situations and I think it gives the device a rugged feel.

 

The post DIY IoT breathalyzer appeared first on Embedded Lab.

Virtual fireplace using Raspberry Pi

$
0
0

Jaret Burkett, a tinkerer from Texas, enjoys fireplace. But the warm weather of Texas won’t let him run the fireplace most time of the year. One day, he figured out he could simulate a burning fireplace with crackling fire sounds using a Raspberry Pi computer and his old TV that perfectly fit the fireplace. Check out his step-by-step instructions to setup one for your fireplace.

Virtual fireplace using Raspberry Pi and TV

Virtual fireplace using Raspberry Pi and TV

The post Virtual fireplace using Raspberry Pi appeared first on Embedded Lab.


Data logger for Skiers

$
0
0

Matthew Magaldi and Aidan Angus are both winter sport enthusiasts who love skiing. They designed a PIC32-based data logger system that captures their skiing experience on a SD card and also wrote a Python script for post-processing and visualization of their skiing behavior. The data logger receives data from multiple sensors, including an accelerometer, a gyroscope, and a temperature/pressure sensors.

Ski data logger

Ski data logger

There were several tradeoffs for the hardware and software used in the project. First, in software, because we were limited to using a single core processor in the PIC32, we were limited in the synchronization of our data. The protothreads that we used to implement our data logging and collection are not actually multi-threaded so data collection for the accelerometer occurred at a different time than data collection from the gyroscope. This made it very difficult to accurately compensate for gravity and led us to estimate by linear interpolation the time synchronization of these data sets. Additionally, we wanted data collection to occur as fast as possible for certain functions like the accelerometer and gyroscope because we knew that this data would be changing at a much faster rate than data from the pressure and temperature sensor. Thus, we updated the temperature, pressure, and altitude data about every second whereas the gyro and accelerometer were calculated about ten times per second.

For hardware, we tried to minimize the complexity of our peripherals. We decided to use SPI or Serial Peripheral Interface in order to communicate with the gyro, pressure sensor, and SD Card. This enabled us to use the same clock (SCK2) and data lines (SDI/SDO) for calculating the pressure and gyroscope values. Additionally, we would have liked to put all of our sensors and PIC32 on a solderboard in order to make a compact device and then have some sort of case over the circuitry and sensors to protect them from getting wet or snowed on while skiing. However, due to time constraints, this package was left out. In the end, we believe that this would be necessary if this were to become a fully- functioning device that had applications in cold, harsh environments.

The post Data logger for Skiers appeared first on Embedded Lab.

End of Year Sale at Microchip Store

$
0
0

It’s time for the end-of-year sale at Microchip store. This year’s discount coupon code is EOY2016DT, which could save you some money on your favorite development board. Using this code can get you $65 off on Digilent Analog Discovery Multi-Function Instrument, $8 off on Curiosity HPC Development Board, and more.

Curiosity HPC Development Board

Curiosity HPC Development Board

Check out the main sale page.

The post End of Year Sale at Microchip Store appeared first on Embedded Lab.

Minimalist ATtiny85 wrist watch

$
0
0

David Johnson-Davies’ minimalist ATtiny85 wrist watch displays time using 12 LEDs that are arranged in a circle like a watch dial. A push button, installed on the top side of the PCB, needs to be pressed to see time. The watch shows the hour by lighting up an LED and minute by flashing another LED. The minute resolution is 5 min.

To show the time you press the button on the watch face, and the time is then displayed for four seconds. It lights one LED to show the hour, and flashes another LED to show the minutes to the nearest five minutes, like the hour and minute hands on a clock. If only one LED lights up you know that both hands are pointing to the same hour mark.

The Tiny Time watch uses the ATtiny85’s built-in oscillator, fine-tuned to get it as accurate as possible, and my watch keeps time to within a couple of minutes over 24 hours. You can adjust the time by holding down the button for more than four seconds.

Minimalist ATtiny85 watch

Minimalist ATtiny85 watch

The post Minimalist ATtiny85 wrist watch appeared first on Embedded Lab.

Serial seven segment LED display shield

$
0
0

Seven segment LED displays are brighter, more attractive, and provide a far viewing distance as well as a wider viewing angle compared to LCD displays. This project describes a serial seven segment LED display shield for Arduino Uno or compatible boards. The shield consists of eight 0.56″ seven segment displays that are driven by one MAX7219 chip. The shield also features a light dependent resistor (LDR) to implement adaptive brightness control to the LED displays. The LDR output can be fed to A0 or A1 analog input channel of Arduino to read the surrounding illumination level. Arduino can then use that information to adjust the brightness of the LED displays. A demo code and Eagle CAD files are also provided in the latter part of the article.

Serial seven segment LED display shield

Serial seven segment LED display shield

MAXIM’s MAX7219 display driver chip provides a 3-wire serial (SPI) interface to drive up to eight seven-segment LED displays (common-cathode type). Included on the chip are a BCD decoder, multiplex scan circuitry, segment and digit drivers, and an 8×8 static RAM to store the digit values. The maximum segment current for all LEDs is set through an external resistor. However, the device is also capable of providing a 16-level brightness control of the LED segments via software. For more details on the internal block diagram and operation of MAX7219, read my earlier project Serial 4-digit LED display as well as Maxim’s datasheet.

Display Shield Features

  • Consists of eight seven segment LED displays (0.56″height) arranged in two rows of four digits.
  • Header pins (1) with shunt jumpers for connecting the DIN, CLK, and LOAD pins of MAX7219 to Arduino pins. With jumpers, you can connect DIN to pin 8 or 2, CLK to pin 9 or 3, and LOAD to pin 10 or 4.
  • An LDR circuit for detecting ambient light level. The LDR output can be connected to A0 or A1 pins via jumper J2.

These features are highlighted in the pictures below.

SPI

Serial 7-segment LED display shield features

Jumpers1

Jumpers to select Arduino I/O pins for DIN, CLK, and LOAD pins of MAX7219

Adaptive brightness control

An automatic brightness adjustment is basically a closed loop system that has the capability to assess ambient light and adjust the brightness of the display accordingly. In this shield, a general purpose LDR and a fixed value resistor (10K) are connected in series between the power supply and ground pins to create a voltage dividing network. The resistance of a typical LDR is less than 1 KΩ under bright lighting condition. Its resistance could go up to several hundred KΩ under extremely dark condition. Therefore, the voltage across the 10K resistor increases proportionally with the surrounding illumination. For the given setup, the voltage across the 10K resistor can vary from 0.1V (under dark condition) to over 4.0V (under very bright illumination). Arduino can be programmed to read this analog voltage through its analog input channel (A0 or A1) and then sends out appropriate signals to the MAX7219 driver to adjust the brightness of the seven segment LED displays. I have explained this topic in more detail in one of my previous articles.

Test code

This code detects the ambient light condition by reading the LDR output through A0 channel and adjust the brightness of the LED display. The displays just shows numbers from 0-7. You will need to install the LedControl library.

/* Testing SPI 7-Segment LED display shield
 * Uses LedControl library
 * Demonstrates the use of LDR for auto brightness adjustment.
 */


#include "LedControl.h"

// Arduino Pin 8 to DIN, 9 to Clk, 10 to LOAD, no.of devices is 1
LedControl lc=LedControl(8,9,10,1);
int adc_value, brightness;
void setup()
{
 // Initialize the MAX7219 device
 lc.shutdown(0,false); // Enable display
 lc.setIntensity(0,8); // Set brightness level (0 is min, 15 is max)
 lc.clearDisplay(0); // Clear display register
}
void loop()
{
 
 adc_value = analogRead(A0);
 brightness = adc_value/65; // Divide by 65 to get Maximum Brightness 15.
 lc.setIntensity(0,brightness);
 // Display 1 through 8
 for(int i=0; i<8; i++){
 lc.setDigit(0,i,i,false);
 }// End i
 delay(500);
 
}

 

Making a temperature/humidity meter display with auto brightness adjustment

You can simply insert a DHT22 sensor on the Arduino shield headers (pins GND, 13, 12, 11) to make a temperature/humidiy meter as shown below. The DHT22 pins GND, Data, and VCC connect to the GND, D12, and D11 pins of Arduino. You can then power the DHT22 sensor by simply writing ‘logic 1’ to D11 pin.

Shield2op

Making a simple DHT22 based temperature/humidity meter with adaptive brightness control

op1

For testing, you can insert the DHT22 directly on to the Arduino headers and power the sensor with I/O pins.

 

Eagle CAD files

You can download the Eagle CAD files for this shield from the following link.

Download Eagle CAD files

The post Serial seven segment LED display shield appeared first on Embedded Lab.

Product review: Elecrow’s 7″ HDMI LCD Display for Raspberry Pi

$
0
0

A colorful LCD display is always a great add-on to any Raspberry Pi project. This article provides a quick review of a high resolution (1024×600 pixels) 7″ HDMI LCD product from Elecrow and illustrates a simple way to set it up for Raspberry Pi.

7"

Elecrow’s 7″ HDMI LCD for Raspberry Pi

With HDMI support, built-in capacitive touchscreen control, and 4 mountable corners, this LCD is a perfect Plug-n-Play display for use with single board computers like Raspberry Pi and Banana Pi. It comes with an HDMI cable for the display, an USB cable for touchscreen control, four mounting screws, and a DVD containing the driver softwares.

Elecrow's 7" LCD display kit

Elecrow’s 7″ HDMI LCD display kit

Hardware connections and software setup

The setup of this HDMI LCD display for Raspberry Pi is pretty easy and straighforward and can be done without installing any drivers from the included DVD. Following figure shows the backside of the LCD. Use the HDMI cable included in the package to connect the HDMI port of the display to that of the Raspberry Pi board. The touchscreen control for this LCD is USB-based, and you need to connect the micro USB port on the backside (labeled as Touch) to an USB port of Raspberry Pi using the USB cable included in the package. On my LCD, I have two micro USB port on the back. They are both labeled as Touch, and connecting to either one works just fine. There is a slide switch for ON/OFF control of the LCD backlight. You need to slide it to ON position, as shown below. This completes the hardware setup. Note that the LCD display receives the power supply from the Raspberry Pi board via the USB cable.

Back side of the LCD display

Back side of the LCD display

Next, you need to open the config.txt file (usually accessible as /boot/config.txt) on the SD card containing the Raspberry Pi OS, and add the following lines at the end of the file.

max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0

The easiest way to do this would be to insert the SD card on a linux or MAC computer and edit the config.txt file with a text editor. The details of config.txt can be found in this page. The hdmi_group=2 selects the HDMI output to DMT (Display Monitor Timings, the standard typically used by monitors). If you look on this page, it provides a table with a list of 86 hdmi_modes defined for hdmi_group=2, but none of them matches with the resolution specification of our display (1024×600 pixels, 60 Hz framerate). So we need to define a custom mode (87) for our display, which is done by the last two lines. The hdmi_cvt line sets the custom resolution (1024×600), framerate (60 Hz), and aspect ratio (6 for 15:9).

After modifying the config.txt file, save the file, eject the SD card from your computer, and install it back on to your Raspberry Pi. When you will power your Raspberry Pi next time, you will see the booting up on your HDMI LCD screen. Make sure the 5V power supply you use for your Pi board is rated at least 2A.

p_20161018_172724

Testing the 7″ HDMI display with Raspberry Pi 1 B model

I have tested it with Raspberry Pi 1 B as well as with the latest Raspberry Pi 3 B models, and it worked like a charm with both. You can get this LCD display directly from Elecrow website or on Amazon using the following link.

Elecrow HDMI Display Monitor 7 Inch 1024X600 HD TFT LCD with Touch Screen for Raspberry Pi B+/2B Raspberry Pi 3

The post Product review: Elecrow’s 7″ HDMI LCD Display for Raspberry Pi appeared first on Embedded Lab.

8-channel AC current data logger

$
0
0

This Arduino-powered 8-channel data logger built by smooth_jamie can measure AC currents drawn by home appliances or other equipments, and record the data on an SD card with timestamp for future use. The project uses the HMCT103C 5A/5MA current transformer for sensing the current flowing through a conducting wire. The current transformer output signal is very low, and therefore, an OpAmp-based circuit is built for instrumentation. The analog output voltages corresponding to the eight-channel current logger are digitized using an external lADS1115 16-bit A/D converter IC.

8-channel current data logger

8-channel current data logger

Hi Everyone, welcome to my first instructable! By day I am a test engineer for a company that supplies industrial heating equipment, by night I am an avid technology hobbyist and DIY’er. Part of my work involves testing the performance of heaters, on this occasion I wanted to be able to monitor the RMS current draw of 8 devices over 1000hrs and log the data to graph the results later. I have access to a data logger but it was already committed to another project and I needed something low cost, so I decided to cobble together this basic datalogger.

The project uses an Arduino Uno to read analogue sensors via analogue to digital converter (ADC) and records the data with a time stamp on an SD card. There is alot of theory and calculation involved in designing the circuits, so instead of explaining absolutely everything, I will just show you how to make it. If your interested in seeing the FULL hit then let me know in the comments and I will explain further.

The post 8-channel AC current data logger appeared first on Embedded Lab.

Etch-a-sketch on a VGA monitor using Arduino

$
0
0

Kids love Etch-a-sketch drawing boards. Rob Cai shares on this Instructables post how he has built a Etch-a-sketch like drawing tool using Arduino Uno and a VGA monitor. Besides an Arduino board, this project only requires two potentiometers, two tact switches, and four resistors. The VGA signal is generated in software using the VGAX Arduino library contributed by smaffer.

Etch a sketch like drawing tool using Arduino and a VGA monitor

Etch a sketch like drawing tool using Arduino and a VGA monitor

I used Arduino IDE 1.6.4. and the VGAx library done by Smaffer and publish on GitHub here. This library allows to use four color with a resolution of 120 x 60 pixels. One button is to clear the screen, the second to choose the color. One wheel moves the cursor horizontally and the other vertically. Sound is available too.

The post Etch-a-sketch on a VGA monitor using Arduino appeared first on Embedded Lab.


Another minimalist wrist watch, but with binary display

$
0
0

Earlier this week, we saw David Johnson-Davies’ minimalist ATtiny85 wrist watch that displays time using 12 LEDs arranged in a circle like a watch dial. I found another interesting LED-based wrist watch design shared by MACROFAB. It is a low cost watch based on Microchip PIC16F527 and it displays time in binary format. The PIC microcontroller runs in low-power crystal mode using a 32.768 KHz external crystal, that helps to achieve an accurate 1Hz signal required for timekeeping.

Wrist watch with binary display

Wrist watch with binary display

The Macro_Watch has 11 LEDs. Four LEDs for the Hour (H1 – H4), Six LEDs for the Minute (M1 – M6), and a single Seconds LED for timing purposes. This guide will not go into how to read binary but a good guide can be found here. Pressing the switch on the front will lit up the LEDs for 10 seconds to allow reading of the time. Holding the switch for 3 seconds will allow setting the current time. The time advances with acceleration so the longer the button is pressed the faster the time will increase. There is no AM/PM indicator on the watch. The SEC LED can be repurposed for AM/PM use or the user can look outside and see if the sun is out.

The post Another minimalist wrist watch, but with binary display appeared first on Embedded Lab.

Arduino synthesizer with a 1-octave capacitive touch keyboard

$
0
0

DIY audio synthesizers are not new. We have seen before some really cool synthesizer builds using Raspberry Pi and NXP LPC1114FN28 ARM. Here comes TinyTS, an Arduino-based credit card sized (100x65mm) synthesizer. It is a fully open-sourced design with a 1-octave capacitive touch keyboard.

TinyTS: A credit-card sized synthesizer with 1-octave touchpad keyboard

TinyTS: A credit-card sized synthesizer with 1-octave touchpad keyboard

The synthesizer parameter knobs includes:
DCO: Coarse pitch and Double. The CV out follows the keyboard and coarse pitch.
DCF: Filter peak and ENVmod.
ENV: Attack and Release affecting amplitude.

More details can be found here.

Here’s a demo video showing the TinyTS in action.

The post Arduino synthesizer with a 1-octave capacitive touch keyboard appeared first on Embedded Lab.

Smart WiFi thermostats using ESP8266

Fingerprint controlled door lock

$
0
0

This fingerprint lock is described in an Instructable posted by JetLab and is about building an Arduino-based electronic door lock that can be installed on almost any access point in your house. The project uses a keypad and fingerprint scanner to grant access to the users by controlling an electric door strike with a relay.

Fingerprint door lock

Fingerprint door lock

I started this project because I was wanted to work with a keypad and fingerprint sensor as well as become more familiar working with LCD’s, I also needed a way to lock my door from the outside so I thought an electronic door-lock would be a great opportunity to over-engineer something and learn some cool stuff.

On power up the device displays a message on the LCD and a red status led lights up, indicating that the door is locked. The user then has the option of pressing a button for entering the password or for changing the password. To change the password the user would need to know the current/default password. If the password is input incorrectly then the display will show that the code was invalid and then revert to the default screen. When the code is entered correctly,the fingerprint scanner activates. If the scanner recognizes a fingerprint that has been enrolled then it will activate the relay and the a green status led for a few seconds, enough to open the door, enter and close it.

The post Fingerprint controlled door lock appeared first on Embedded Lab.

Alexabot: An Amazon Alexa controlled robot using Raspberry Pi

$
0
0

Alexabot is a fusion of Amazon’s Alexa Voice Service (AVS) with Raspberry Pi to build a robotic vehicle that follows your voice commands. You can ask the Alexabot to move around, do some stuff, and find answers to your questions. The body of the robot is built using the GoPiGo kit, while a Raspberry Pi 3 is used as the brain of the robot.

Alexabot: A Raspberry Pi and Amazon Alexa controlled robot

Alexabot: A Raspberry Pi and Amazon Alexa controlled robot

Following video is a demo of Alexabot.

The post Alexabot: An Amazon Alexa controlled robot using Raspberry Pi appeared first on Embedded Lab.

Viewing all 713 articles
Browse latest View live