Author Archives: R-B

Etch-a-sketch on a VGA monitor using Arduino

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.

8-channel AC current data logger

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.

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

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

Serial seven segment LED display shield

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

Minimalist ATtiny85 wrist watch

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

« Older Entries Recent Entries »