The IO22D08 8 Channel Pro mini PLC Board

I have been looking for an "Arduino Plug and Play" 8 channel board for a long time. I just wanted a ready-made version that does not require a Dupont cable and is "Arduino compatible". And finally I found the IO22D08 - an 8 channel relay card for the Arduino Pro Mini with a LED seven-segment display.

IO22D08 8 Channel Pro mini PLC Board

Well, it's for an Arduino Pro Mini, but using an USB-TTL adapter it can be programmed like an Uno with the Arduino IDE. That's why I did a trial order and carried out the first tests.

The IO22D08 Board

The additional needed outputs on the IO22D08 board are obtained with the three 74HC595 shift registers.

The relays are not connected in ascending order to shift register U5 but in the order 81234567. The enable input of this shift register for the relays is connected to pin A1. This can be used to activate the outputs after the initialization has been carried out or to implement an emergency shut down.

Two additional shift registers (U3 and U4) are used for the 4-digit 7-segment display. The circuit diagram shows a 18:88 but in fact it is delivered with an 8.8.:8.8. version. Only the colon is connected to shift registers, you can't use the decimal points. The display is common cathode and is soldered directly to the board without a socket. In order to be able to control the mulitplexed LED display data must be sent permanently to the shift registers. I get stable results with a two milliseconds interval. An LED driver like an HT16K33 or MAX7219 would have been a better choice. Pin 13 was selected as the data pin for the shift register, so the LED on the Arduino Pro Mini LED will flicker / glow.

Furthermore, 8 inputs are provided with optocouplers (to be wired against GND) and the inputs are provided with screw terminals.

Additionally there are 4 push buttons on the circuit board.

The pins A4 / A5 are not connected and could be for I2C. The A6 / A7 pins are also available on the Pro Mini (as on the Nano). So in addition to TX / RX, you have a total of 4 other IOs at your disposal.

The Arduino Pro Mini is supplied in its socket with VCC = 5V, so a Pro Mini in the 5V variant must be used. For a Pro Mini 3.3 a slight modification is needed to route the 5V to RAW.
According to the circuit diagram, the VIN input of the PCB is protected against polarity reversal with a diode. A simple linear regulator is used to regulate the voltage to 5 V (according to the circuit diagram, there should be a resistor R0 with which the voltage regulator can be bridged, but I couldn't make it out on the circuit board). During operation with the display active, the controller only gets slightly warm.
The board has no cutouts, therefore do not operate on the 230V power supply!
The dimensions of the board are 120 * 62 * 19mm.

IO22D08 8 Channel Pro mini PLC Board

Arduino Pin usage of IO22D08

The pins of the Arduino Pro Mini are used as follows:

const uint8_t dataPin = 13;  // data of digital tube module
const uint8_t OE_595 = A1;   // Pin connected to 595_OE of Digital Tube Module
const uint8_t latchPin = A2; // ST Store
const uint8_t clockPin = A3; // SH clock Shift Clock Pin
// A4 - unused - not connected - I2C SDA - can be used for an additional LCD display
// A5 - unused - not connected - I2C SCL - can be used for an additional LCD display
// A6 - unused - not connected
// A7 - unused - not connected
const uint8_t optoInPin[] {2, 3, 4, 5, 6, A0, 12, 11}; // the input GPIO's with optocoupler - LOW active
const uint8_t keyInPin[] {7, 8, 9, 10};                // the input GPIO's with momentary buttons - LOW active

The Software for the IO22D08

The vendor provides a link to a quite well commented example sketch. The used timer library will be included in the zip file and ensures that the display is continuously updated.

The sketch implements eight retriggerable relays with delay: if you push one of the optocoupler inputs against GND, the assigned relay switches on for a certain period of time. With buttons 1 - 4 the time parameters or the remaining time of the first four relays can be shown

An Adopted Sketch for the IO22D08

I didn't like usage of a timer and the functions were a little too confusing for me. The three shift registers are addressed in a chain. As described above, the display is multiplexing and you have to shift the relays into the registers every time. Therefore I created a class IO22D08 that implements the hardware of the shift registers for relays and the display. The basic class provides the hardware access for the board and can be reused unchanged in all sketches.

The Timer class is a separate class for the time management of the relays. For this board we need a total of 8 timers (for each relay) hence I created an array of timers. This class is only needed to get the same functionality like the original sketch.

The optocouplers and push buttons are read in a simple function. All in all, I think the sketch is now more readable and easier to adapt for other purposes.

The new sketch (download at the end of this page) does exactly the same as the Chinese example but does not require a timer library,  uses around 200 bytes less program memory, but 25 bytes more SRAM.

The display output is currently limited to integers. In principle, you could also inherit the IO22D08 from print, but that only makes sense if you also complete the character set, because currently only numbers on some letters are defined (similar to the Chinese example sketch).

Pricing of the IO2D08 Relay Board

This 8 channel relay board is available for around 20 USD. Let's do a comparison with other components:

So in total around the same costs, but you don't need messy Dupont wires to connect all components.

Summary on the IO22D08

This 8 channel PLC board fulfills the purpose of a compact assembly. You have to take care of the optocoupler if you want to connect your own sensors. The control of the LED display with shift registers is by far not perfect, but there are several examples available how to update update the display. However, since the I2C ports are not used so fare, the purchase is worth the money for me.

Links

(*) Disclosure: Some of the links above are affiliate links, meaning, at no additional cost to you I will earn a (little) comission if you click through and make a purchase. I only recommend products I own myself and I'm convinced they are useful for other makers.

History

First upload: 2021-04-02| Version: 2023-12-06