The FT232 USB-to-serial converter is one of the most commonly-used methods of adding USB functionality to small projects, but recently I found that these chips are capable of sending more than just serial signals. With some creative programming, individual output pins can be big-banged to emulate a clock, data, and chip select line to control SPI devices.
This post shares some of the techniques I use to bit-bang SPI with FTDI devices, and some of perks (and quirks) of using FTDI chips to bit-bang data from a USB port.
FTDI USB-to-serial converters to drive SPI devices – [Link]
This moment in Crowd Supply you can find SPIDriver an intuitive tool for using SPI devices. The campaign that has already collected over $1000 of its $2700 goal, was designed to launch into the market a device to make our lives easier. It can be used with any SPI device such as LCD panels, flash memory, sensor LEDs etc. but what does it does exactly? The SPI driver shows you the SPI bus in real time, which is useful for debugging, testing, and calibrating.
It works with Windows, Mac, and Linux, and it can be controlled via the command line, python 2 or 3, C and C++, or a GUI. It is easy to plug in and includes 3.3 and 5 v supply. The display shows you what it’s happening in real time and sustains SPI transfers at 500 kbps. Additionally, it measures only 61 mm x 49 mm x 6 mm. Also, it uses a FTDI USB serial chip to talk to the PC.
Some of the solutions used as an example in the Crowd Supply webpage are:
Driving, testing, and evaluating new displays. Using displays is often difficult and getting them to work can be hard, but this device makes it easy
Programming SPI flash. Reading and writing SPI flash in- circuit. For example, for Atmel´s flash, a short script is everything you need to read and write
Lightning up LED strips. SPIDriver makes using these devices fast and fun giving users the ability to rapidly test using its own power supply
Plus, the colors in the screen are the same colors as in the cables, so you can know exactly what you are seeing.
The PCB is being manufactured by JLCPCB in Shenzhen, and its assembled in Pescadero USA. The units are thoroughly tested and calibrated with 1% accuracy.
There are 28 days left on the campaign, and you can support it with $27, $57 or 69$ which will get you your own SPIDriver (and some other stuff depending on the amount you pledge). The company claims that they will start delivering rewards on August 24th.
This device was designed, so that you never have to ask yourself again “What’s it doing now?”, and its meant to be used by all kinds of people from total beginners to experts. The complete specifications can be found on this website which is also the place to back the project.
Mini Isolated Power Supply is designed for CAN, RS-485, RS-422, RS-232, SPI, I2C, Low-Power LAN applications. The power supply provides +/- 5.50 V DC symmetrical outputs with load current 500mA from 5V DC input. The project is built using SN6505A IC from Texas instruments. The SN6505A is a low-noise, low-EMI push-pull transformer driver, specifically designed for small form factor, isolated power supplies. It drives low profile, center-tapped transformers 5 V DC power supply. Ultra-low noise and EMI are achieved by slew rate control of the output switch voltage and through Spread Spectrum Clocking (SSC). The SN6505 consists of an oscillator followed by a gate drive circuit that provides the complementary output signals to drive ground referenced N-channel power switches. The device includes two 1-A Power-MOSFET switches to ensure start-up under heavy loads. The internal protection features include a 1.7A current limiting, under-voltage lockout, thermal shutdown, and break-before-make circuitry. SN6505 includes a soft-start feature that prevents high inrush current during power up with large load capacitors.
Isolated Power Supply for RS485, RS422, RS232, SPI, I2C and Power LAN – [Link]
FPGAs are field programmable gate arrays which basically means they are reconfigurable hardware chips. FPGAs have found applications in different industries and engineering fields from the defence, telecommunications to automotive and several others but little application in the maker’s world. Mostly, as a result of being largely difficult and high cost as compared to the likes of Arduino, but the introduction of the ezPixel and other similar FPGA boards is making this a possibility.
The ezPixel board, by Thomas Burke of MakerLogic, is a small size FPGA based circuit board that can be used to drive up to 32 strings of WS2812Bs, for up to 9,216 LEDs in total, a very first of its kind. These WS2812B programmable color LEDs have been a phenomenon in the maker’s world, being used in various Led Lights and creating of various Light Artworks. These popular LEDs comes in strings that can be cut to any length, and only require a single wire serial data connection to control all the lights in the string individually, and multiple strings can be stacked together to create large two-dimensional displays.
Most WS2812B controller boards can be used to control up to hundreds of these LEDs, but not thousands of them. The ezPixel board is a perfect fit for applications that use thousands of these LEDs. The ezPixel board is powered by the Intel MAX FPGA, a single chip small form factor programmable logic device with full-featured FPGA capabilities, and it’s designed to interface with other Micro-controllers or any SPI/UART host device. The ezPixel board serves as bridge between microcontrollers and long WS2812B strings. A user sets the length of each string using simple commands that are sent via the SPI or USB/UART communication link.
The following below are the features of the ezPixel:
WS2812B Smart Pixel Controller.
Up to 32 Strings can be controlled independently.
Up to 9216 LEDs can be controlled.
Read/Write Pixel Memory.
FPGA – Intel MAX10M08 FPGA.
1” x 3” (25mm x 76mm).
The ezPixel can run as a standalone display controller as a result of its serial flash memory chip, and this board is slated for a crowdfunding campaign in early 2018.
72 channels Serial (SPI) to parallel driver board has been designed for various applications. This project can be used as multi Solenoid driver, large size 7 segment display driver, bar graph driver, and LED driver. The project works with 5V logic levels. Output load supply 12V-48V DC and each output can drive 500mA load.
I have used 3 digits 2.3Inch 7 segment displays as an example, this board can handle up to 9 digits. The board can serve many applications like, Stop Watch, digital timer, counter, score board, token display and lot more.
Project built around 74HC595 and ULN2803 ICs, The 74HC595 devices contain an 8-bit serial-in, parallel-out shift register that feeds an 8-bit D-type storage register. The storage register has parallel 3-state outputs. Separate clocks are provided for both the shift and storage register.
72 Channels Serial To Parallel Driver Board Using 74HC595 & ULN2803 – [Link]
The isolated SPI module is designed for applications, where SPI signals need to be transferred over longer distances than usually. It is based on Linear’s LTC6820. The board is designed as two layer stack-up, with GND plane on the bottom layer and signal traces and components at the top layer. Signals and power are supplied over standard 100mil (2.54mm) pitch IDC header.
Dimension: 40.005 mm x 30.099 mm (1.575″ x 1.185″)
1 Mbps Isolated SPI Data Communication at 10m
500 kbps Isolated SPI Data Communication at 100m
Galvanic Isolation Barrier using standard transformer (1500V)
Requires no software changes in most SPI systems
3.5V to 15V power supply
SPI mode can be adjust via on-board jumpers
can act as Master or Slave (adjustable via jumper)
screw terminal for twisted pair cable (i.e. as in CAT5 Ethernet cable)
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.
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.
Micronucleus is a bootloader designed for AVR ATtiny microcontrollers with a minimal usb interface, cross platform libusb-based program upload tool, and a strong emphasis on bootloader compactness. It has a built in V-USB so that you can send compiled firmware over a virtual USB connection.
The process will use an Arduino as a programmer by loading an Arduino ISP to install the micronucleus bootloader on the ATtiny84. The next step is allowing USB programming on ATtiny84 by manually change fuses, then creating a board definition for ATtiny84 and installing any necessary USB drivers.
The hardware components should be connected as shown in the above circuit. At first you have to remove the capacitor and connect a FTDI breakout to the Arduino Pro Mini and upload the Arduino ISP firmware.
Before installing Micronucleus, a 10μF capacitor is added between the RESET and GND pins of the Arduino. It will prevent the Arduino from entering bootloader mode so that it will pass the compiled firmware to the connected ATtiny rather than trying to program itself.
AVRDUDE is used then to change the ATtiny fuses and set them as the following:
No clock divider
Brown-out detection at 2.7V (not necessary, but useful if running off battery)
Resistive random-access memory (RRAM or ReRAM) is a type of non-volatile (NV) random-access (RAM) computer memory that works by changing the resistance across a dielectric solid-state material often referred to as a memristor.
The MB85AS4MT is an SPI-interface ReRAM product that operates with a wide range of power supply voltage, from 1.65V to 3.6V. It features an extremely small average current in read operations of 0.2mA at a maximum operating frequency of 5MHz.
It is optimal for battery operated wearable devices and medical devices such as hearing aids, which require high density, low power consumption electronic components.
Memory Density (configuration): 4 Mbit (512K words x 8 bits)
Write cycle time (256 byte page): 16ms (with 100% data inversion)
Data retention: 10 years (up to 85°C)
Package: 209 mil 8-pin SOP
This figure shows the block diagram of the chip:
MB85AS4MT is suitable for lots of applications like medical devices, and IoT devices such as meters and sensors. In addition, the chip has the industry’s lowest power consumption for read operations in non-volatile memory.