Interface category

CMOS-TTL QUADRATURE ENCODER USING LS7084

The quadrature LS7084 Module is a CMOS quadrature clock converter. Quadrature clocks derived from optical or magnetic encoders, when applied to the A and B inputs of the LS7084 are converted to strings of a Clock and an Up/down direction control. These outputs can be interfaced directly with standard Up/Down counters for direction and position sensing of the encoder.

Features

  • Supply 5V DC
  • +4.5V to +10V operation (VDD – VSS)
  • On Board Power LED
  • J1 Encoder pulse multiplication ( Jumper JL Close =1X, Jumper JH Close = X4)
  • Header Connector for Encoder Interface
  • X1 and X4 mode selection
  • Programmable output clock pulse width
  • On-chip filtering of inputs for optical or magnetic encoder applications.
  • TTL and CMOS compatible I/Os
  • Up to 16MHz output clock frequency

CMOS-TTL QUADRATURE ENCODER USING LS7084 – [Link]

Program ESP8266 with Arduino

Programming ESP8266 With Arduino IDE : The Easy Way

The ESP8266 WiFi Module is a self-contained SOC that can give any microcontroller access to your WiFi network. It’s an extremely cost-effective board with a huge and ever-growing community. Each ESP8266 module comes pre-programmed with an AT command set firmware. This module has a powerful on-board processing and storage capability that allows it to act as a standalone microcontroller.

Following 2 easy steps, you can upload Arduino sketches on your ESP8266 using Arduino IDE.

  • Configuring the IDE
  • Making the circuit

Parts List:

  1. ESP 8266 Module.
  2. Jumper wires.
  3. A breadboard.
  4. One USB to TTL converter, a.k.a UART converter.

Configuring The IDE:

In order to bring support for ESP8266 chips to the Arduino environment, you need to add ESP8266 Arduino Core in the IDE.

NOTE: You must have Arduino IDE version 1.6.4 or higher. The latest version is highly recommended. Download the latest version of IDE from Arduino.cc.

  1. Install Arduino 1.6.8.
  2. Start Arduino and open Preferences window.
  3. Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. (See the first image)
  4. Open Boards Manager from Tools > Board menu and install esp8266 platform. (See the second image)

Add URL to "Preferences" in Arduino IDE

Add URL to “Preferences” in Arduino IDE

Select ESP8266 board from Board Manager

Select ESP8266 board from Board Manager

Making The Circuit:

ESP8266-01 wiring for uploading program
ESP8266-01 wiring for uploading program
ESP8266-12E wiring for uploading program
ESP8266-12E wiring for uploading program

ESP-01:

  1. Connect GPIO0 to Ground (set it LOW or 0)
  2. Connect CH_PD toVcc (set it HIGH or 1)

ESP-12(E/F):

  1. Connect GPIO0 to Ground (set it LOW or 0)
  2. Connect GPIO15 to Ground (set it LOW OR 0)
  3. Connect GPIO2 to Vcc (set it HIGH or 1)
  4. Connect CH_PD toVcc (set it HIGH or 1)

Pin Vcc and GND should be connected to power supply’s +ve and -ve rail respectively. TX and RX of ESP8266 should be connected to RX and TX of USB to TTL converter respectively.

NOTE: You can replace the USB to TTL converter with an Arduino UNO board, but you have to upload a blank sketch or “bare-minimum” sketch to the Arduino so that the MCU of the Arduino board doesn’t interrupt. Connect TX and RX of the ESP8266 to RX and TX of the Arduino UNO respectively.

Conclusion:

You are done! Now just select your ESP8266 board from Tools > Board menu, write any program, and click on Upload button. The ESP8266 will run as standalone microcontroller now.

To have a clear idea, read the article FLASH AT FIRMWARE TO ESP8266 also.

Turn Your Raspberry Pi Into An OBD2

Thomas Beck started a new project to develop a Raspberry Pi based OBD2, On-Board Diagnostic tester, to read vehicle data, trouble codes, and read monitor data. He had developed earlier a firmware for the elektor OBD Analyser NG, a handheld analyser with graphical display, ARM Cortex M3 controller and open source user interface. Since this device is not available anymore, he is working on a new one.

The On-Board Diagnostics is a system that makes status of all vehicle subsystems reachable by the vehicle owner or the repair technician, the data are requested from the vehicle through a list of predefined codes, then the OBD device will process and display them.

The Old Elector OBD Analyser NG
The Old Elektor OBD Analyser NG

The Raspberry Pi must have similar interfaces to the OBD Analyser NG. On the user side there is a serial interface which is available at the Raspberry Pi GPIOs, but on the vehicle side a DIAMEX DXM OBD2 module is used. Thus, Thomas decided to develop a simple add-on board to make the module compatible for using with Pi.

Thomas used the DXM on his own OBD2-Analyser NG for prototyping the idea, and share his successful results with DIAMEX, the manufacturer of the DXM module, which accepted the idea and developed a Pi-OBD add-on board based on their modern AGV OBD2 module.

The Pi-OBD add-on board consists of an DIAMEX AGV OBD2 interface with an automotive-proven power supply/voltage regulator for the AGV, the Pi and a display. It has a PCB that suitable with the Raspberry Pi B+, 2 and 3. The complete system is powered via the OBD2 cable. The Pi-OBD uses a few GPIOs and covers some more. So, using a display connected via an HDMI ribbon cable is recommended.

DIAMEX Pi-OBD Add-On Board
DIAMEX Pi-OBD Add-On Board

As a result, there are two options to add OBD2 to Raspberry Pi:

  1. OBD2 for Raspberry Pi using the DIAMEX Pi-OBD add-on board, it needs:
    • Pi-OBD add-on board
    • OBD2 cable
    • 7″ touchscreen
    • Raspberry Pi/Raspbian with free serial device, e.g. /dev/ttyAMA0 or /dev/ttyS0
    • HHGui OBD2 software for the Pi
  2. OBD2 for Raspberry Pi using the DIAMEX DXM OBD2 module, it needs:
    • XM OBD2 module
    • A few additional parts like PCB (a breadboard will do), wires, connector for GPIOs, connector for OBD2 cable, optional but recommended: 2 resistors, 1 capacitor, 1 diode
    • OBD2 cable
    • Vehicle 12V socket to USB adapter + USB cable to power the Pi and the display
    • Raspberry Pi/Raspbian with free serial device, e.g. /dev/ttyAMA0 or /dev/ttyS0
    • Display for the Pi (minimum display size 320 x 165 pixels)
    • HHEmu OBD2 software for the Pi

pi-case-1-sm

This project is still in the development phase and it is open source. All technical details are available at its official page.

Web-Bluetooth Devices Integration

Chrome Browser version 53 came out with a new feature: Origin Trial for Bluetooth which allows websites to use this feature and enable Web Bluetooth for all their visitors. Web Bluetooth is a new technology that connects the Web with the Internet of Things, this technology will provide a level of integration in the IoT scene that never happened before making web designers eager to get their bits out into the real world.

There is no need to install a mobile app on your smartphone to control any of your Bluetooth Low Energy (BTLE) devices anymore. Thanks to this technology, it will be easier to build one solution that will work on all platforms, including both mobile and desktop, that result to lower development costs, more open source control interfaces for various physical products, and more innovation.

To understand how that works, here’s an example of a drone controlled from a web app:

In Bluetooth Low Energy networks, devices play two roles. A device can be either a “Central” or a “Peripheral”. Bluetooth device with services that correspond to one function of the device. Each service exposes variables called characteristics that represent one parameter of the service, which can be read, written or both. Each service and characteristic is identified by a unique 16-bit or 128-bit number and they are defined by the Bluetooth SIG (Special Interest Group).

Bluetooth Low Energy: Peripherals, Services and Characteristics
Bluetooth Low Energy: Peripherals, Services and Characteristics

How to use Web Bluetooth

  • In order to use Web Bluetooth, your site must be served over a secure connection (HTTPS). A secure website is becoming a requirement for a growing number of new web APIs. One way is using GitHub hosting. The implementation of the Web Bluetooth API is partially complete and currently available on Chrome OS, Chrome for Android M, Linux, and Mac.
  • Go to chrome://flags/#enable-web-bluetooth, enable the highlighted flag, restart Chrome and you should be able to scan for and connect to nearby Bluetooth devices, read/write Bluetooth characteristics, receive GATT (Generic Attribute Profile) Notifications and know when a Bluetooth device gets disconnected.
  • Building a Web Bluetooth App

This is the process that will be common for all Web Bluetooth apps:

  1. Scan for a relevant Device
  2. Connect to it
  3. Get the Service you are interested in
  4. Get the Characteristic you are interested in
  5. Read, Write or Subscribe to the Characteristic

The code should be written in JavaScript. It has to scan for a device with an identified Service number, then ask for this service, ask for a specific characteristic number, and finally write the desired command. An example for hacking a light bulb and connecting it to the web via bluetooth is available here.

Although the browser is the most ubiquitous cross-platform operating system that the world has ever seen working on all platforms and systems, it could be a threat because of many malicious websites that mischief with your security. Sites ask the browser to show a list of nearby Bluetooth devices matching certain criteria, and the user either picks which to grant access to or cancels the dialog. Thus, users’ permission is the only responsible about their own privacy.

Two conflicting views are raising right now, one is for IoT enthusiasts and the other’s for security geeks. Essentially, this integration will push forward the development of new IoT applications. but it may risk users’ privacy. On the contrary, Developers are promising to minimize risks and are assuring that connection through this API will be secure and privacy-preserving. The Chrome team will end the trial in next January (2017), and after that, they expect to be able to stabilize the feature and move it closer to a general release.

Further details can be found at the official documentation website, the blog of one the developers, and this step-by-step tutorial. More about the security model can be reached here.

8 Channel Optically Isolated IO Board

8-channel-optically-isolated-io-board-c047_w

Opto-Isolated I/O Board offers a compact & convenient way to interface industrial type inputs/outputs to your microcontroller boards, Signal transmission between circuits of different potentials and impedances etc.

Specifications

  • 4 opto-isolated inputs & 4 opto-isolated outputs
  • Std TTL input signals for opto-couplers
  • Interfacing is via 10-pin Box Header and Screw terminal type connector
  • Power source LED indicator
  • Four mounting holes 3.2 mm each
  • PCB dimensions 54 mm x 64 mm

8 Channel Optically Isolated IO Board – [Link]

RELATED POSTS

4Duino – A 2.4″ TFT LCD IoT Display Module

If your application needs a controller with display interface and a network connectivity, then you need to think about using 4Duino from 4D Systems, a 2.4″ TFT LCD IoT display module.

4Duino-slide-1

4Duino key features

4Duino

4Duino has ATmega32U4, a 8-bit MCU from Atmel, which is the same microcontroller inside Arduino Leonardo. 4Duino also preserves Arduino UNO pinouts.

ESP8266 WiFi module ESP-06 model is embedded in 4Duino making it suitable for IoT (Internet of Things) applications.

4Duino features a 2.4” 320 x 240 pixels with 65K colors TFT LCD display, with resistive touch. LCD is powered by the feature-rich 4D Systems Picaso Graphics Processor.

A SD Card socket is connected also with Picaso for multimedia storage and data logging purpose, memory card storage size can be up to 32GB.

4duino_BD

  • ATmega32U4 with
    • 32KB Programmable Flash
    • 2.5KB Internal SRAM
    • 1KB Internal EEPROM
    • UP to 16 MIPS Throughput
  • Powerful 2.4” Intelligent LCD-TFT display module powered by PICASO with
    • 14KB Programmable Flash
    • 14KB Internal SRAM
    • 240 x 320 Resolution, RGB 65K true to life colours, TFT LCD Display with integrated 4-wire Resistive Touch Panel.
  • ESP8266 Wi-Fi Module with
    • 802.11 b/g/n
    • Wi-Fi Direct (P2P), soft-AP
    • TCP/IP protocol stack
    • 1MB Flash
  • General Purpose I/O pins for user interfacing, which include
    • 20 Digital IO pins
    • of which 7 are capable of PWM
    • and 12 are capable of Analog input
  • On-board USB for powering the 4Duino and programming the ATmega32U4.
  • 2×5 way header for programming Picaso and ESP8266 via a 4D Systems Programming Cable or Adaptor
  • On-board latch type micro-SD memory card connector for multimedia storage and data logging purposes.
  • DOS compatible file access (FAT16 format) as well as low level access to card memory.
  • Module dimensions: 72.8 x 53.3 x 14.6mm.

Programming 4Duino

There are two IDEs available to program the 4Duino. Using the Arduino IDE, or using the Workshop4 IDE  which provides additional customized graphical tools allowing the user to take the advantage of the features of the Atmel processor and the Picaso processor, by utilising the Picaso Serial Library and the hundreds of graphics commands.

If you want to program the Atmega32U4, there is no need to any additional hardware tools, but if you want to update ESP8266 or Picaso processor firmware, or if you want to use some tools from Workshop4 IDE like Genie environment, which provides Drag/Drop graphics building, then you need to have uUSB-PA5, a serial-TTL UART bridge converter, or any other Serial-TTL bridge.

Price and Documentation

4Duino price is 80$, also a starter kit is available for 110$, it includes some accessories like power adapter, SD card memory and uUSB-PA5-II (Programming Adaptor).

Product Page

4Duino Datasheet

4Duino Schematic

Workshop4 IDE
Via: HackerBoards

Bi-Directional Voltage Level Translator

20160706_VoltageLevelTranslator_002-768x512

Lukas Fassler from Soldernerd shares his experience designing a bi-directional voltage level translator and manufacturing the board with DirtyPCBs.

While most of my microcontroller designs run on 3.3 volts there is still the occasional 5 volt design. Or I do something with an Arduino. So the need may arise to interface between logic working at different voltage levels. There are several ways of doing this, depending on your needs. Things are relatively simple as long as you know in advance which side is transmitting and which side is receiving. It gets more difficult if the communication is bi-directional or with buses such as I2C that are bi-directional by nature.

Bi-Directional Voltage Level Translator – [Link]

An isolated analog input for Arduino

VF1 isolated converter

Giovanni Carrera designed a circuit that accepts input voltage from about 20mV to 5V or a current of 4 to 20 mA and converts it to a isolated frequency signal.

A voltage to frequency converter can realize an opto-isolated analog input for Arduino or other microcontroller systems. This circuit is particularly suitable for industrial control plants with 4-20mA sensors.

An isolated analog input for Arduino – [Link]

How to use a fully differential amplifier as a level shifter

7446.Figure 1.PNG-1230x0

Loren Siebert @ ti.com discuss about how to interface signals that have a reference voltage that isn’t 0V while preserving the DC information.

Many signal paths are direct current (DC)-coupled, and this can lead to challenges when different portions of the signal path require different operating conditions. Many portions of a signal path are ground-referenced, where a signal varies at about an average or mid value of 0V. If all signals had the same reference voltage, DC coupling would be very easy. Unfortunately, that is not the case. Devices operating from a single supply like mixers or analog-to-digital converters (ADCs) will typically have a reference voltage (common mode) that is not 0V. Interfacing these devices while preserving DC information can be challenging.

How to use a fully differential amplifier as a level shifter – [Link]

Fluke 15B+ Digital Multimeter Upgraded with ESP8266

IMG_0122

SpritesMods has a 5-part write-up that shows how to add wireless connectivity to a Fluke 15B+ digital multimeter

All in all, I feel like I have succesfully diversified my multimeter assortment. I have a Fluke 17B I can use for daily work so I can enjoy quick continuity testing and non-irritating power-off features, and I have the 15B+ as a very capable second multimeter, with WiFi connectivity to show trends and to allow for any device with a browser to act as a remote display. It’s a shame I couldn’t figure out more of the way the main multimeter chip works to get direct access to the display, but the PWM-trick I did to show the IP-address is an alternative that is workable. Here’s a demonstration. As you can see, the multimeter has the IP of 192.168.5.117, and that’s what I enter into the browser.

Fluke 15B+ Digital Multimeter Upgraded with ESP8266 – [Link]