VP Process Inc has recently released a new series of Raspberry Pi DIN rail mountable “Hardened” interfaces. The first release is the PI-SPI-DIN-RTC-RS485, which is available in three mounting versions: DIN Rail Clips, DIN Rail Enclosure, and PCB Spacers.
The basic specifications for the PI-SPI-DIN-RTC-RS485 are:
- Power Input: 9 to 24 VDC
- 5VDC @ 2.5A (Max 3Amp) Power Supply
- RS485 Output via RJ45 connector and Terminal Block
- 2 GPIO connectors – 1 internal for Raspberry Pi, 1 external for peripherals
- 1 PI-SPI-DIN connector (16 Pin) for PI-SPI-DIN series (power, SPI, I2C and 5 Chip Enables)
- Real Time Clock (I2C) Microchip MCP7940 with Battery Backup
Last week, VP Process added three modules to the series: PI-SPI-DIN-8AI, PI-SPI-DIN-8DI, and PI-SPI-DIN-4KO. Each module of these has 2 x 16 Pin Ribbon Cable sockets and cables and each connector and cable will carry power, I2C bus, SPI bus and 5 GPIO lines for Chip Select. Additionally, each module is available in the three mounting versions mentioned above. Each module takes power from the ribbon cable as a local input power to 5 VDC switching power supply and 3.3 VDC LDO regulator power supply. At the same time, the main module will maintain the 5VDC to keep the Raspberry Pi safe from interfaces loading.
The three modules full specifications
PI-SPI-DIN-8AI : An 8 channel 4-20 mA Input interface based on the 12 Bit Microchip MCP3208 A/D converter. Each input can be re-configured (changing resistors and capacitors) as a VDC input or Thermistor input for temperature applications.
PI-SPI-DIN-8DI : An 8 channel Isolated Digital Inptu interface based on the Microchip MCP23S08 I/O Expander. Since this design has 4 addresses, it allows 4 interfaces to connect together for a total of 32 Inputs, all of 1 chip select. The inputs accept up to 24 VDC or 24 VAC, or switch inputs.
PI-SPI-DIN-4KO ; A 4 channel relay output module. Each relay is rated at 2 AAC and is SPDT. The design is based on the Microchip MCP23S08 I/O Expander. Since this design has 4 addresses, it allows 4 interfaces to connect together for a total of 16 relay outputs.
Fortunately, VP Process had perfectly designed PI-SPI-DIN series to suit many industrial applications by making the designs industrial grade, with adding terminal blocks and enclosures. Furthermore, a new module of the same series is coming soon, PI-SPI-DIN-4AO; a 4 channel analog 4-20mA output module.
Finally, the main module is available for $48, where the remaining modules cost $33 each. More details are available at this page.
Source: WidgetLords Electronics
With the host of protocols available in electronics interfaces, choosing a protocol is a hard job. Some protocols are designed for long distance and reliable communication applications such as RS-485. Others are used for low cost and short range communication such as I2C, and so on.
The backbone car’s network is the Controller Area Network (CAN). CAN is reliable and adopted widely in automotive industry but it’s expensive to embed CAN interface in all aspects of the car’s sub-system. As a cheap alternative, today’s protocol LIN, is designed for low cost and multi-nodes automotive networks. LIN can be used to communicate with non-critical sub-systems such as: door-lock driver and window motors. Moreover, LIN is implemented to be a one wire interface.
LIN stands for Local Interconnect Network. According to the official LIN manual, the main properties of the LIN bus are:
- single master with multiple slaves concept.
- low cost silicon implementation based on common UART/SCI interface hardware, an equivalent in software, or as pure state machine.
- self synchronization without a quartz or ceramics resonator in the slave nodes.
- deterministic signal transmission with signal propagation time computable in advance low cost single-wire implementation.
- speed up to 20 kbit/s.
- signal based application interaction.
The LIN topology consists of one master and several slaves. The master provides the header which consists of a break and sync pattern (0x55) followed by an identifier.
The 0x55 Synch byte helps the slaves to be synchronized with the master clock. All messages are initiated by the master with unique ID; A slave will reply according to a given message identifier.
The identifier specifies the frame type which can be one of the following:
- Unconditional frame
- Event triggered frame
- Sporadic frame
- Diagnostic frames
- User-defined frames
The nodes are typically microcontrollers, but as LIN is designed for automotive applications in the first place, some specialized transceivers can be added to the nodes such as Melexis MLX80030 which is basically a level shifter with some add-ons like low drop voltage regulator with some protection features since the available supply voltage in cars are mostly a spiky 12v.
Note: From the schematic above you may see that the MLX80031 has split the one wire (LIN BUS) to RX and TX for the microcontroller.
When it comes to software development, there is a standard API for LIN bus (slave and master) implemented in C language.
Avishek Hardin at Arduino Project Hub designed a lightweight mobile using a GSM module, an Arduino UNO, and a Nextion touch screen display. The lightweight mobile has the following features:
- Make calls
- Receive calls
- Send SMS
- Receive SMS
- Delete SMS
In this project, he uses a GSM SIM900A module to establish the cellular communication. The GSM SIM900A is an all-in-one cellular module that lets you add voice, SMS, and data to embedded projects. It works on frequencies 900/1800MHz and uses the RS232 standard to communicate with MCUs. Baud rate of this module is adjustable from 9600 to 115200 through specific AT Commands.
This GSM mobile features a Nextion touch display to take input from the user and visualize the GUI. Its easy-to-use configuration software (Nextion Editor) allows you to design your own interfaces using GUI commands. All GUI data is stored in Nextion display instead of the master MCU. Thus, lots of program space in MCUs can be saved efficiently and it makes the development procedure effortless. The Nextion displays communicate with microcontrollers over UART which is supported by a wide range of MCUs.
- Arduino Uno.
- SIM900A GSM module.
- Nextion TFT Intelligent LCD Touch display.
- SIM card.
- Connecting wires.
- External mic & speaker.
Connect the Nextion display and the GSM module with your Arduino using following instructions:
- Nextion +5V to Arduino VDD_5v.
- Nextion RX to Arduino pin 11
- Nextion Tx to Arduino pin 10
- Nextion GND to Arduino GND_0v.
- GSM Rx to Arduino pin 1
- GSM TX to Arduino pin 0
- GSM GND to Arduino GND_0v.
Program The Nextion Display
First of all, you need to design an HMI file using Nextion Editor. This editor allows you to design the interfaces using plug-and-play components like text, button, progress bar, pictures, gauge, checkbox, radio box, and much more. You can set codes and properties for each of these components later.
In this project, 8 different pages are used to design the GUI. All the icons used are easily available on the internet. Icons are resized and modified using an open source tool paint.net. Touch events like press and release are also covered when components are touched. More information on Nextion display commands can be found on this wiki page.
Steps To Upload
- Load the .HMI file into the editor. Link to the Github repository is here.
- Compile the .HMI file (just under the menu bar).
- Go to File > Open build folder > Copy the .tft file > Paste into SD card. Note: make sure the SD card is formatted to FAT32.
- Once copied, insert the SD card into the Nextion display and then turn the power on.
- Wait for the .tft to upload.
- Power off the Nextion, securely remove the SD card and then again power on the display.
- Now you should see your new interfaces on the Nextion Display.
Program The Arduino
The Arduino is the brain of this project. It takes input from the Nextion display, sends commands to GSM module to create the cellular connection, and shows information on the display. This project does not use any Nextion library due to lack of documentations and difficulties to understand. Moving on without using libraries seems tough but it is really not.
The code can be found on the Github repository. Simply download it and upload to the Arduino board using the Arduino IDE. If you are using some other board than Arduino UNO, then don’t forget to select that specific board in Arduino IDE before uploading.
Open the Serial Monitor, you should see the AT command log for each event triggered from the Nextion Display.
By default, the GSM module has an SMS buffer size of 20. Unfortunately, this Arduino-based mobile cannot display all the 20 messages at once on the Nextion display as it gives a buffer overflow while compiling the Nextion code. Hence, the Nextion display is programmed to show maximum 10 messages at once. If 10 or more SMS are present on the GSM buffer, the Low memory warning icon will be displayed on the Nextion display.
Watch the demonstration video to understand how this Arduino-based lightweight GSMmobile works.
Sometimes while building a Raspberry Pi based project, it may be difficult to connect a screen, mouse and keyboard each time you want to edit something. If the Raspberry Pi is connected to a network, then running a remote desktop on it could be a good solution.
Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft, which provides a user with a graphical interface to connect to another computer over a network connection. In this article, you will find three different methods to run remote desktop on your Raspberry Pi.
Method 1: Using TeamViewer
TeamViewer is a proprietary computer software package for remote control, desktop sharing, online meetings, web conferencing and file transfer between computers. It is available for Microsoft Windows, Mac OS X, Linux, Chrome OS, iOS, Android, Windows RT, Windows Phone 8 and BlackBerry operating systems. It is also possible to access a machine running TeamViewer with a web browser.
ARM-based devices such as Raspberry Pi don’t have a TeamViewer version, but there is still a way to run it using ExaGear Desktop. It allows you to run Intel x86 application on ARM-based Mini PC.
Follow these steps to install and use TeamViewer on your Raspberry Pi:
- Get you copy of ExaGear Desktop and install it. You can order it through the official website for $27 for Raspberry Pi 2 and $33 for Raspberry Pi 3.
- Enter the guest x86 system using the following command:
- Download and install TeamViewer
- Run TeamViewer from Raspberry Pi start menu, and setup static password for remote connection. Go to connection menu, select setup unattended access and enter a name for your Raspberry and a password. Once you are finished your Raspberry Pi ID will appear.
- Now download and install TeamViewer on your desktop and run it from start menu. Enter the Raspberry Pi ID in the “Partner ID” field and press connect button. A pop-up window will ask you for the password. Enter it and the remote session will open in a new window.
Method 2: Using VNC
Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network.
You can install VNC directly on your Raspberry without any additional software, follow these steps to install and prepare VNC:
- Install VNC server on Raspberry using this command:
- Start VNC server by typing “$ vncserver” on the terminal. At the first start it will ask you to enter a password which will be used to access Raspberry Pi remotely.
- Get and save your Raspberry Pi IP address using this command
and search for string like this (inet addr: 192.168.1.110)
- Now download and install a VNC client program on your desktop, such as TightVNC.
- Run TightVNC Client from the start menu. In Remote Host field enter: IP address of Raspberry, colon, 1. It should be like this ‘192.168.1.110:1’ and press Connect. You are now connected to your Raspberry Pi.
Method 3: Using ssh + X11 forwarding
Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. The best known example application is for remote login to computer systems by users.
X11 is the X Window System which allows you to run software on a UNIX/Linux server in a Windows-like way such that you can use your mouse to click around in it. The secure way to do this is to forward your X11 packets through your ssh connection which automatically sets your DISPLAY environment variable for you. On the configuration menu, select X11 under SSH and check “Enable X11 forwarding”.
- Login to Raspberry Pi and run GUI of a program.
In serial interface world, there are differential and non-differential protocols. The most famous one of differential interfaces is USB besides HDMI and others, while I2C is a non-differential one.
Joshua Vasquez from Hackaday decided to use DI2C (differential version of I2C) to communicate with a string of BNO055 sensor boards (a smart 9-DOF sensor with I2C interface).
If you’re not familiar with differential communication, the method behind it is straightforward; the line has two channels (positive and negative), where each line has the same signal but with an opposite voltage. The receiver then will calculate the difference between them. Mathematically:
Vb = -Va, So:
Vout = Va – Vb = Va – (-Va)
Now, what if there was a noise?. The noise will affect almost identically on both signals with the same voltage level. As a result the receiver can omit the noise in the output.
Back to I2C; Joshua used PCA9615 chip from NXP which is a bridge between the normal 2-wire I2C-bus and the 4-wire DI2C-bus.
As an use case; Joshua used DI2C to build an IMU Noodle for modeling a piece of foam twisting and turning in a 3D space simulator using data comes from a string of cards contain the BNO055 sensor and PCA9615 bridge.
PCA9615 was used in each Joshua’s card to bridge the normal I2C signals to DI2C ones. By bridging I2C to DI2C, PCA9615 makes the capability of using longer cables and I2C more rugged in noisy environments.
The PCB design files (KiCAD) and firmware can be downloaded from Joshua’s repository on Github. Moreover, Joshua mentioned important tips to setup DI2C in your next design. You can see these tips in his blog post on Hackaday.
Horst Gether @ edn.com writes about how the simple and well established 3.5mm jack can be used for data-rich communication between headset and mobile device.
The 3.5mm phone jack is a well-established standard in the audio industry and continues to get strong support from users in the market. Originally invented in the 19th century for telephone switch boards, it made its way into mobile phones, tablets, and personal computers to connect audio and communication headsets for phone calls or simply for listening to music. While the phone jack has a rather long evolutionary history, the functionality that the 3.5mm four-pole accessory device provides to its end customers is rather limited.
Data-rich 3.5mm jack vies with USB-C for headsets – [Link]
Debugging is an important part of the design process that is necessary to identify and fix errors. Over the decades, debug tools had evolved providing easier and simpler solutions. Today, ARM introduces CoreSight SoC-600 as the next-generation debug and trace tool that speeds up finding the root of the problem, with less iterations and lower risks.
Addressing the requirements of the increasingly connected world characterized by faster product-development cycles, this new technology offers debug and trace over functional interfaces such as USB, PCIe or wireless, reducing the need for hardware debug probes while increasing data throughput.
Key benefits include:
- Debug access available and accessible throughout the product lifecycle, from production and manufacture, to remote access in the field
- Remote debug access (e.g. via Ethernet or wirelessly)
- Increased data bandwidth for improved system visibility
- Multiple debug agents can simultaneously access debug memory space (e.g. for concurrent external and self-hosted access)
- Interface peripherals (such as USB and PCIe) share a common access to APs, together with any existing JTAG DP or resident software
- Self-hosted, cross CPU debug access
CoreSight SoC-600 comes with a new Debug Access Port (DAP) architecture. It introduces standard APB connectivity between Debug Port (DP) and Access Port (AP), making it possible to have multiple DPs connected to multiple APs.
CoreSight SoC-600 also includes an enhanced Embedded Trace Router (ETR) functionality. In additional to removing the need for a separate Trace Memory Controller (TMC) license, enhancements to the Embedded Trace Router (ETR) configuration make it possible to supply a trace interface with four times the amount of bandwidth previously possible.
There are two approaches to host the link protocol when building a CoreSight SoC-600-based system:
- Protocol on dedicated CPU: this approach comes at a cost of additional dedicated resources, however, it is the least intrusive approach and provides bare metal debug capabilities.
- Protocol on main CPU: this approach does not require additional hardware, yet it is invasive and relies on CPU not being halted.
The DAQduino board features a PIC18F2550 microcontroller with 14 digital I/O pins, two of them are PWM, and 6 input analog pins. With these IO ports, user can easily plug in different type of 3rd party boards with direct connection to USB port.
DAQduino has the same concept of the ICP12 usbStick with different shape and more I/O pins. Its PIC MCU is preloaded with Microchip’s USB HID bootloader that allows users to upload an application firmware directly through a PC’s USB port without any external programmer.
Features of iCP12A:
- Arduino form connection, easy interfacing, high performance and user friendly device
- Onboard with PIC18F2550 [Default] or PIC18F2553 28-Pin Flash USB PIC MCU
- Excellent flexibility that allows user to expand the board features with plug and play modules
- Peripheral Features:
- 19x IO Port (6x 10/12bit ADC pins, 2x 10 bit PWM/Freq/DAC pins)
- Serial port emulation (UART Baud Rates: 300 bps to 115.2 kbps)
- Supported operating systems (32bit/64bit): Windows XP ,Windows Vista, Windows 7, Windows 8, Windows 10, Linux, Mac OS X and Raspberry Pi
- On board Female Mini USB and Micro USB Type B connector
- Maximum Input Voltage: 15Vdc
- With 500mA current output at VDD pin with over-current protection
- 20MHz oscillator
- Green LED – power on indicator
- 2x LEDs (Green, Red) – status indicator
- ICSP Connector – on-board PIC programming
- Switch Mode Selection – Boot or Normal mode
DAQduino board is shipped with a preloaded data acquisition firmware that emulates as a virtual COM port to PC. Thereafter, the communication between the PC and DAQduino is serial and through a miniUSB cable. The firmware also supports basic I/O control and data logging feature. They provide a PC application named SmartDAQ that communicates with the DAQduino and controls its I/O pins, PWM outputs, and record ADC inputs.
SmartDAQ has a very friendly GUI with real-time waveform displays for 6 analog input channels. The time and voltage axes scales are adjustable. SmartDAQ can log the ADC data in both text and graphic form concurrently. One can utilize this feature to construct a low-cost data acquisition system for monitoring multiple analog sensor outputs such as temperature, accelerometer, gyroscope, magnetic field sensor, etc.
SmartDAQ v1.4 Features:
- Sampling channel: 6x Analogs (10/12 bit ADC) + 7x Digitals (Input/Output)
- PIC18F2550 [10bit ADC: 5mV Resolution]
- PIC18F2553 [12bit ADC: 1mV Resolution]
- Maximum Sampling rate: 1KHz or 1mSec/Samples
- Sampling voltage: 0V – 5V (auto & scalable graph) at 1mV Res. Dispaly
- Sampling period:
- mSec: 1, 2, 5, 10, 20, 50, 100, 200, 500
- Sec: 1, 2, 5, 10, 20, 30
- Min: 1, 2, 5, 10, 20, 30, 60
- Trigger Mode: Larger [>], Smaller [<], Positive edge [↑], Negative edge [↓]
- Sampling Mode: Continuous, Single
- VDD or External Vref Input Mode
- Logging Function:
- Save Format: Text, Graphic, Both
- Start Time: Normal, Once Trigger, 24-Hour Clock (Auto Run)
- End Time: Unlimited, Data Size, 24-Hour Clock (Auto Stop)
The DAQduino is available with the PIC18F2550 for $30, and with the PIC18F2553 for $39.9. You can order it through the official page where you can also get more details about iCP12A and its source files.
You can also see this product preview to know more about its functionality.
Nextion display by ITead allows users to design their own interfaces all by themselves, even if they don’t have any coding background knowledge and can go with different platforms. This tool is the best solution to replace traditional TFT LCD and LED Nixie tube. Customers can use the software – Nextion Editor to design interfaces.
With the new capacitive 7-inch Nextion, you can build your own HMI with minimal design effort since all of the data and control signals are provided by the device to interface directly to the display. This offers enormous advantage to the designer in development time and cost saving and takes away all of the burden of low level design.
Nextion will help you quickly design visually in hours not weeks, turn long coding work into simple drag and drop operation, at a reasonable cost. What you only need, is interface a serial port to Nextion disply hardware. Check this demo to see how quickly and easily an application can be designed by dragging and dropping objections to the virtual screen on a WYSIWYG design IDE – Nextion Editor.
This is the second version of Nextion, where you can find a capacitive multi-touch display and a good looking bezel along with additional features in the software IDE. Below are the specifications of new Nextion: