Home » 2017 » November

Monthly Archives: November 2017

8 Channel Logic Level Bi-directional Converter Module TXS0108E 3v3 5v

Using the 8 Channel Logic Level Bi-directional Converter TXS0108E

Because some controllers, displays and sensors work on 5V while others work on 3.3V, many makers find that they need to perform level shifting to protect the 3.3V device from 5V.

The simplest and most common method of logic level shifting is a voltage divider but it’s not good for high speed transfers and it only works in one direction. That’s where this chip comes in. It can perform bidirectional level shifting and will auto-detect the direction.

This 8-bit noninverting translator uses two separate configurable power-supply rails. The A port is designed to track VCCA. VCCA accepts any supply voltage from 1.2 V to 3.6 V. The B port is designed to track VCCB. VCCB accepts any supply voltage from 1.65 V to 5.5 V. This allows for universal low-voltage bidirectional translation between any of the 1.2-V 1.5-V, 1.8-V, 2.5-V, 3.3-V, and 5-V voltage nodes. VCCA should not exceed VCCB.  When the output-enable (OE) input is low, all outputs are placed in the high-impedance state. It’s s designed so that the OE input circuit   is supplied by VCCA. To ensure the high-impedance state during power-up or power-down, OE should be tied to GND through a pulldown resistor; the minimum value of the resistor is determined by the current-sourcing capability of the driver.

1.2 V to 3.6 V on A Port and 1.65 V to 5.5 V on B Port (VCCA ≤ VCCB)

Logic Level Converter Module TXS0108E

Buy 8 Channel Logic Level Converter TXS0108E

Converting from 5V to 3.3V

logic-level-converter-example

  • VA connects to Arduino 3.3V power supply
  • VB connects to Arduino 5V power supply
  • GND connected to the two power supply grounds
  • When Bx has TTL 5V input, Ax will get TTL 3.3V output
  • Connect OE to 5V

 

 

Using 1.8 Inch TFT Display with Arduino

Using 1.8″ TFT Display with Arduino

 

 

1.8-display-arduino-st7745-

 

 

Buy 1.8″ TFT Display 

 

 

 

 

 

 

This tutorial is for the 1.8″ ST7735 TFT display. This display is a true TFT, the ST7735R driver can display full 18-bit colour.

Wiring

As the display is driven with 3.3V you will need voltage divider or logic level shifter to control it with Arduino.

Using voltage divider

1.8-display-arduino-st7745-connection-voltage-divider

Using Logic Level Shifter

1.8-display-arduino-st7745-connection-level-shifting

 

 

Fingerprint sensor

Using Optical Fingerprint Sensor With Arduino

Use an optical fingerprint sensor to add biometrics to your projects .This module has a high powered DSP chip AS608 that does the image rendering, calculation, feature-finding and searching. Connect to any microcontroller or system with TTL serial, and send packets of data to take photos, detect prints, hash and search. You can also enroll new fingers directly – up to 300 finger prints can be stored in the onboard FLASH memory. This sensor can be used with the SFGDemo  software on Windows – it makes testing the module simple, you can also use the software to enroll fingerprints and see them on your computer screen.
It also works with the Adafruit-Fingerprint-Sensor-Library.

 

Fingerprint Scanner Arduino

 

Buy components used in this project:

Fingerprint Scanner

12V Electric Solenoid Lock

1.8″ TFT Display

 Enrolling and Searching

Enrolling New Users with Windows

 

The easiest way to enroll a new fingerprint is to use the SFGDemo  software on Windows.

First up, you’ll want to connect the sensor to the computer via a USB-serial converter. You can do this by connecting it directly to the USB/Serial converter in the Arduino. Upload a blank sketch to the Arduino.

This sketch will allow you to bypass the Atmega chip and connect the fingerprint sensor directly to the USB/Serial chip converter.

void setup() {}
void loop() {}

 

If you’re using a Leonardo, Micro, Yun, or other ATmega32U4-based controller, use this sketch instead of the blank sketch – it allows Leonardo to pass serial data between fingerprint reader and Windows.

void setup() {
Serial1.begin(57600);
Serial.begin(57600);
}

void loop()
{
while (Serial.available())
Serial1.write(Serial.read());
while (Serial1.available())
Serial.write(Serial1.read());
}

 

Hardware Connection

Connect to the Arduino TX, Rx, 5V and GND as shown in the picture below.

Connecting fingerprint sensor

 

Download the SFGDemoV2.0 software

Start up the SFGDemo software and click Open Device from the bottom left corner. Select the COM port used by the Arduino and press OK when done.

Connect fingerprint sensor to windows

You should see the following screen, with a “Open Device Success!” message and some device hardware information. You can change the baud rate in the bottom left hand corner, as well as the security level. They should default to 57600 baud and security level 3 so set them if they’re wrong .

Connect fingerprint sensor to Windows.

To enroll a new fingerprint click the Preview checkbox and press the Enroll button next to it (Con Enroll means continuous enroll, use it if you want to add many fingerprints). When the box comes up, enter in the Address ID  you want to use. You can use up to 300 ID numbers. Let’s start with Address 1 first.

Enrol fingerprint to Sensor.

The software will ask you to press the finger to the sensor.

 

Enroll finger

You can then see a preview of the fingerprint if you clicked the preview checkbox.

Enroll fingerprint success

You will then have to repeat the process, to get a second clean print.
On success you will get a “Success to enroll!”.

Enroll fingerprint success message

Searching with the Software

Click on the Search button on the right hand side.

Search fingerprint

When prompted, press a finger to the sensor. If it is the same finger, you should get a match with the ID number. If it is not a finger in the database, you will get a failure notice.

Search fingerprint success

 

Searching with Arduino

Connect the fingerprint scanner as shown in the image below.

Arduino fingerprint sensor

Download the Fingerprint Sensor library

Select the File-Examples-Adafruit_Fingerprint-fingerprint example sketch. Upload the code to your Arduino as usual. Open up the serial monitor at 9600 baud and when asked place your finger that was already enrolled against the sensor.
You should see the following:

Test fingerprint sensor with arduino

Enrolling with Arduino

For enrolling a new finger via Arduino run the File-Examples-Adafruit_Fingerprint-enroll sketch and upload it to the Arduino, use the same wiring as above. Open up the serial monitor, it will ask you to type in the ID to enroll – use the box up top to type in a number and click Send.

Enroll fingerprint with Arduino

Then go through the enrollment process. When it has successfully enrolled a finger, it will print Stored!

enroll fingerprint with Arduino success

 

You can edit the sketch to use it in many applications for example with solenoid lock or with a display instead of using the serial monitor.

Simple sketch using 1.8″ display 

 

 

 

Arduino Flappy Bird

Build and play the addictive Flappy Bird game using Arduino and Display.

arduino flappy bird

 

Buy everything you need to build

Arduino Flappy Bird

 

 

 

arduino flappy bird

Required components:

1x Arduino Nano V3.0 ATmega328P CH340 5V 16MHz Soldered Heads
1x 1.8″ inch ST7735R SPI 128×160 TFT LCD Display
1x Push button
1x Universal Solderless Breadboard 400 Contacts
5x 1K Resistor
1x 10K Resistor
1x USB cable
1x Set of wires

arduino flappy bird kit

Connections

1 RST – 1K Resistor – D8
2 CS – 1K Resistor – D10
3 DC – 1K Resistor – D9
4 DIN – 1K Resistor – D11
5 CLK – 1K Resistor – D13
6 VCC – +5V
7 BL – +5V
8 GND – GND

Arduino flappy bird wiring

1.8" TFT Display

 

Download the software from GitHub.

 

Play Snake with Arduino

Build the classic Snake game using Arduino, Keypad and 1.8″ Display.

   arduino snake game

 

Buy Arduino Snake Game Kit.

 

 

 

Required components

1x Arduino Nano V3.0 ATmega328P CH340 5V 16MHz Soldered Heads
1x 1.8″ inch ST7735R SPI 128×160 TFT LCD Display
1x 5 Switch AD Keypad
1x Universal Solderless Breadboard 400 Contacts
5x 1K Resistor
1x USB cable
1x Set of wires

arduino snake game

Connections

1 RST – 1K Resistor – D8
2 CS – 1K Resistor – D10
3 DC – 1K Resistor – D9
4 DIN – 1K Resistor – D11
5 CLK – 1K Resistor – D13
6 VCC – +5V
7 BL – +5V
8 GND – GND

Ad Key
Out – A3
GND – GND
VCC – 5V

arduino snake game

1.8" TFT Display

Download code from GitHub.