Category Archives: PLC

16 x Servo Module – 1st draft

Just the first 3D draft of my Servo Module. I still have the Raspberry PI Zero W hanging on the back of this – we don’t need to populate that header, but had plenty of room for it so just left it there. on top left you see jumpers to select Servo and Servo Signal voltage. On right you see a classic 3 x 16 header for servo connectors with the photo coupler providing a complete isolated Servo module.

I have a few changes I need to do – firstly I want to investigate how to add a current sensor with full isolation – possible using a photo coupler.

Backbone Pinout Revision 5

The Servo Module forced me to think about isolation and made it obvious that I need 2 x 5V supplies in cases where 5V is used for Servo’s etc. I removed 48V as option simply because 48V is used for higher effects/currents. Pin 23/24 is now the 5V MCU supply that must stay isolated from the 5V/12V/24V PSU’s.

Photocoupler Schematics

I don’t show to much schematics in here simply because it’s a bit difficult to copy them into here, but had to show this – this is the first time I use a photocoupler. I decided to try PS2801 after realising that a long range of photocouplers use the same package. I am not sure about the resistor values as examples/references are a bit weak. The drawback with using photo couplers is that signal can only go one way and at a frequency of max 10KHz ++. The advantage is that the MCU is totally isolated.

Max voltage C->E is 40V, so if this works as I expect I input a 3.3V signal and get a 5V,12V or 24V out at 50mA. Just need to add jumopers allowing selection of separate Signal and Servo voltage. I will be using 4 of these circuits on the Servo Module.

Sadly this means I can’t use this module for input – I might have to add a separate digital input module – but, I will also look for more optional solutions – learning in progress πŸ™‚

PLC Rack/Box

This aluminium box cost ca 16.- USD P&P included and is accidentally the correct size to mount 2 of my backbone PCB’s on the inside. I need to do a more exact scaling, but the concept is illustrated below.

To do this I need to make some PCB Holders. The ones illustrated below should be easy to pring with a 3D printer.

The Box have sufficient depth to hide a PSU behind the backbone to deal with mains input. Just an idea

Servo Module

The next module I want to make is the Servo Module. This is handy since the 16 channels also can be used as digital/analogue IO signals.

I will use 16 x 3xRight Angle Headers and some jumpers to select between voltage. I will only support 5V & 12V and max 10A in total. Higher voltage or effects will need to get their power directly.

Supporting 16 channels this way is a bit much as the total current usage can be quite high so I will add current sensors to monitor usage. I also need an inductor to prevent pulses from going back to the backplane. I need to review the 5V here because we currently only have a single 5V supply that also is used for the MCU. I probably need to add a 2nd 5V on the backbone to allow for separate PSU’s for modules connected to actuator/servos.

In this case we also need to feed the 3.3V MCU from the 5V/12V used for the servo’s as we otherwise might not have a ground to our signal. Communication with backbone is RS-485 based on differential siganaling not depending on anything but those two wires, so this will work fine. It also means that we will no connect to the 5V MCU/Ground at all on this module.Β This actually raises a question if I should switch to isolated RS-485 towards the backplane here.

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

New PLC Bus Layout

I have moved the RSX signals to the outer row so they can be reached with a 2.54 pitch connector. This allows a PLC module to use screw connectors or other 2.54 pitch connectors for stand-alone usage “as is”.

An updated 3D model showing possible connectors if the 2×20 pin header is unpopulated. I see no reason not to do this change, but the RS-X line’s here are not isolated, so it must be used with care!

All In One Home Central

Looking at my Ethernet/GSM module I realise that I with a minor change on the backbone pin-out can just add 2.54 pitch screw terminals and we have a stand-alone home sentral with 5V on the upper screw block and RSX on the lower. 5V here is in reality 4.5 to 12V, so we can just add a 2 cell LIPO directly this way. Need to think about this option, but I see no reason not to do the backbone change as this would enable all modules too be used both in rack and stand-alone “as is”.

Ethernet/GSM Module Update

Finally got the last packages in and added some extras. Still some work to do before this is done thought, but in the process of completing 1st final draft. Due to the complexity of this module I expect 1-3 revisions before we are done. Basically I just want to complete this draft & doc and let it mature a bit before I review the design.

Of notable changes is that I decided on a supercap for the RTC battery. Using a battery would cause people to run-around changing batteries. A supercap does not last that long, but I expect an hour++. I actually need to test. I also added an Analogue Audio Connector+ SIM808 USB is available on pins. I changed to Nano SIM Card and added a HMI (UART) connector. The pictures below show the 3D from side/back to illustrate.

I have not added Raspberry PI to the illustration, but it fit on back With the Connectors right. Since my Hat’s also have Zero Mount holes you can actually add several Hat’s by setting their address to 2-8. The Ethernet/GSM module have hard-wired address 1. Full size Hat’s will stick out ca 3cm.