Category Archives: RS-X Modules

Raspberry PI Hat’s

It’s been many Hat’s lately as I am focusing more and more on this as my main core for everything. I still have a load of Hat’s that I want to start on, but I won’t exactly have much spare time the coming year. This is just a summary of projects that I am working on and intend to complete.

XPortHub. Basically a communication Hub With CAN, RS485, RS232, SPI, I2C, USB + Micro SD Card, RTC, Flash etc. This Board is actually assembled and so far working well.

Wifi Hat based on ESP32 to enable a low-cost Wifi/Bluetooth With CAN, RS485 and a few IO ports. I have PCB for this Board, but have yet not assembled or tested it.
32 x IO / Servo Controller.

Not ordered.

8 x DC Motors + 16 x Sensors.
7 x 5-Wire Stepper Driver.
3KW Universal motor driver, Capable of 60V @50A on 3-Phase, DC, Stepper or Solenoids.
NB-IoT/4G Hat.
Light-weight 60V PSU. This is only a test board with the Hat format.
LoRa + GPS Hat. Shown With 12km 1W configuration.
LoRa + GPS Hat. Shown With 6.5km 0.1W configuration.
2A Motor Controller. Can run 6 x 3 Phase, 4 x Steppers, 9 x DC motors or 18 Solenoids/PWM signals. This is still work in progress.
3KW 3Phase Motor Controller. This uses DRV8301 and is designed for 60V@50A. This actually need a revision before it is ordered.
Mini stand-alone 3-Phase Controller for 2A. This is assembled and is working, but the 60V DC/DC needs a revision.
CAN – USB Adapter. Assembled in rev 1.1 and working.
ESP32 Utility Driver – 4 sensors, 8 Servo/IO, 2 H-Bridge, 7 PWM signals. This is assembled and working rev 1.1.
Model Train Cockpit Controller. This is a failure and need a revision + a support adapter. A rev 1.2 is on my list.
STM32FxxxRx Breakout Board. Assembled and tested for F105 and F405.
Breakout for STM32F031F4 or STM32F042F6. Assembled and working.
My SWD Adapter. This will need an upgrade, but it has been one of my most usefully designs. It enables me to use a small 1.27 pich footprint on my designs and deal With ST-Link 2.54 Pitch. Next Version will have Reset and Boot Connectors.
Micro sensors and actuators. I had 4 of these designs and the Temperature, Light, Proximity sensor will be upgraded. More external sensors will be added later.

And more – many of my older designs have either been ditched or evolved into more mature designs listed above. I will be focusing more and more on the new Raspberry Hat format for everything. The exception will mainly be a series of intelligent sensors evolving out of my STM32F031F4 micro designs.

 

 

Raspberry PI – 3 x RS485 & 2 x CAN Hat

This is a 5 port communication Hat mounted on a Raspberry PI 3. It contains 3 x RS485 and 2 x CAN ports. The design is not new for readers of this blog, but it is actually the first time I assemble rev 1.1 – just before I am about to order rev 1.2.

The colorfully display is because I am using 1206 led’s and saving old parts – all components on this was re-used from rev 1.0 boards. What amused me a bit is that as I mounted the MCU and switched Power on the old test program still worked. I have yet not broken a STM32 by soldering it on/off boards – quite impressive actually.

Functionally this Hat is ok, but mechanically I ordered a few Hat’s before I checked the drilling holes exactly, so rev 1.2 will correct this. I will also replace 0804 and 1206 with 0603 components + 2 leds per port is a bit overkill. I think if I reduce to 1 per port and mount them on the side that is better. Also cleaning up the line driver and replacing the 3P connector with a 4P for RS-X 12V + differential signal. I might have to make this a 2+2 port for that purpose.

 I also want to do an experiment. Both CAN and RS485 are differential signaling, so I wonder if I can get RS485 to work with a CAN Tranceiver and what quality it would have? The issue is that if I can do this I can more or less make the 2 CAN ports switchable between CAN & RS485. It is worth a try!

PLC – Connectivity Module

I drafted a GSM/Ethernet module as well as a 3xGalvanic RS485 earlier, but I am toying with the idea of attempting a PLC Module with STM32F405 using ESP32 for Ethernet/Wifi and 4-6 RS-X ports. 4 if used as PLC-module, 6 if used stand-alone. I have also 2 CAN ports if I can find space/pins for them and I actually have CAN/UART’s on ESP32 as well.

I could connect ESP32 to the backbone as illustrated below, but I have little data on it’s UART speed yet. It’s just an idea for now.

I have not made a move on my PLC concept yet for the simple reason that I have far to many designs/PCB’s that I need to work on and too little time as is. But, still fun to toy with ideas. ESP32 basically cost the same as a W5500 and can do both Ethernet, Bluetooth and Wifi. It will however need an external Phy for Ethernet.

PLC/Home Automation HMI

I have been thinking a bit about creating a stand-alone HMI component. Basically a terminal with a touch display and optional keyboard, mouse and customized input equipment. The key principle would be that we use a Ethernet/RSX as bacbone for data traffic, while the HMI takes care of graphics, input etc.

This is just some random GIF I found on the net, but an HMI app could consist of a set of standard components where layout is controlled by XML files that are uploaded from the device. Communication could be Ethernet/RSX. Equiped with a Plain VM this could be an interesting concept where HMI logic is executed on the HMI unit and only events/data transferred to/from the rest of the system.

Making the app above might seem complicated, but it’s nothing I have not done before from scratch in C/C++. I am thinking more and more about creating a standard HMI app in Qt since that can run on Windows, Linux, Android, OsX etc. I need to check around for options.

<—->

Since we are talking about a network of stand-alone units we could create a full control center as well.

MicroPLC Backbone 3D

The latest version of the backbone bus. It is only 10cm long and with max 8 boards. Connectors are 2 x RSX, 5V PSU, and Actuator PSU’s. On the right side is jumpers and resistors for RS-485 terminator and bias.

The backbone’s can be connected in many ways simply by connecting RSX1 to RSX1 and mount the boards in any way you want. They can easily scale up from a single card to a large multiple backbone system. 32 devices can easily be directly connected, but using an active RSX switch you can scale much higher.

I think I have reached a point where I want to order PCB’s and get going. In this case I want to start with the Backbone, CCM and 3xRSX modules. I need to modify the SWD on the Servo Module + the main purpose with the Servo was actually to test the design. The Servo module have doen it’s job as it forced an important change on the backbone.

I also need to start on the 3D for the fittings and see if I can manage to print those with a 3D printer.

The RSX connectors on the backbone are high speed designed for very short range, but we can also interconnect using 3xRSX modules. I do however still need the RSX Switch with power for sensors, so I will push 2 more modules.

  • The active RSX switch.
  • An upgrade of my preious RSX Sensor (Temperature, humidity, light, distance).

I actually have a few RSX devices in rev 1 that need an update so we can start making a system consisting of sensors and actuators. One step at the time.

Active RS485 Switch

I still got a few components to make\upgrade before I have a full Home Automation network. The CCM and RSX module allows me to create a central, but I need sensors and I need to feed the sensors power. One solution to this is to create an active RSX Switch with power output on each network.

The RS-X Switch as drawn here will take 2 x Ethernet or 2 x RS-X (M1 & M2) input and provide 4 x RS-X output with power. Each of RS-X E1,E2,E3 & E4 can be switched on/off separately and be used for networks or 1:1 with sensors/actuators.

The functionality in the switch is simple message switching. The idea of having 2 x Ethernet and 2 x RS-X Input is redundancy, but I realise this might be a bit tight to achieve so will see what pins & space I have available.

This module will also be a great RS485 Hub used stand-alone.

3 port Galvanic RS-X Module

3D of a 3-port RS485 GW. This actually have 5 RS485 (or RS-X). 2 on the backbone bus running high speed, and 3 isolated with lower speeds in front. These can be used Standard RS485, RSX or even Profibus/485.

The MCU is actually capable of running 3 port Profibus using UART’s saving the need for specialised hardware.

This module do not have the Raspberry PI Zero W add-on option. The reason is because the connector would conflict with the isolation area.

All-In-One Home Central

This is a block diagram of the All-In-One Home Central. This is basically a merge between two PLC cards to create a smaller, mobile bread & butter node. I am not going to do anything on this yet – I simply want the MicroPLC modules up running first since this  is re-use of the same technology.

This also provide a full wireless RS-X switch as an alternative to the low cost wired one. The RPI module have sufficient juice for a secure wireless connection.

Home Automation Network Components

IoT is all about wireless connections these days. The main challenge is that providing sufficient security becomes a challenge becausse you need some computing power for secure encryptions – which easily drive cost and size. Myself I prefer to use secure wireless links to cover distances between buildings and floors, while I use more classic wired networks locally.

To enable this I need two new components to my Home Automation system:

This is a basic PLC module to provide 3 x External RS-X networks. I will create a all-in-one with these integrated later, but we can stick to the PLC backbone for now. Isolating everything will drive cost and size, but I want these 3 connections isolated because they will support long distance wiring exposing the entire system for lightning or pulses from other quipment. I will only get 3 networks on each card, but I can stack loads of cards if I need to.

 The second component is an Active RS-X Switch. This will bridge between an isolated network to a short distance non-isolated with 12V power added. With 4 connectors we can connect 4 devices or add passive switches to create entire sub-networks. We can also add another Active Switch by chaining these up to create larger networks.

The main advavtage is that we add power locally and don’t attempt to send DC power over any distance. Power is best transported as AC. We also create barriers where a lightning strike or other spikes will only have limited impact while we still can add low cost sensors in numbers. I created sensors and passive switch earlier that I will make upgrade revisions of.

PLC Ethernet/GSM Revision 1.0 Annotated

These pictures show the annotated 3D. Full PDF documentation can be found on the Download page (here).

  1. 4 pin HMI header.
  2. Super capacitor for RTC.
  3. SWD.
  4. W5500
  5. Raspberry PI Zero W mounting holes.
  6. Ethernet RJ45
  7. GPS Antenna
  8. GSM/GPRS Antenna
  9. Nano SIM Card holder.
  10. Standard mounting holes. M2.5 in each corner.
  11. SIM808 module
  12. Analogue Audio/USB connector.
  13. 4V PSU (MIC29302BU)
  14. 2 x MAX3485 for RS485.
  15. STM32F405RG
  16. 3.3V PSU (LM1113)
  17. 40 pin PLC backbone connector
  18. 40 pin Raspberry PI 2/3/Zero W connector
  19. Audio/USB available on back side. 5V + VBUS available here.
  20. Test holes for PCM
  21. Extra wiring to enable swapping of PCN In/Out