Communication Adapter

You can find Annotated Schematics for the Communication Adapter on the downloads (here). I have so many designs that I need to make proper documentation on them, so these doc’s will be uploaded & updated on regular basis. The doc basically contains info like MCU pin usage and stuff needed to program the devices + notes on schematics.

Have fun!

High Speed RS485

This ADM2582E, is a galvanic issolated RS485/RS422. I picked it because it was my only option for galvanic all-in-one. I was just checking it’s speed and it support 18Mbps and 256 Devices in a network. It cost ca 4.- USD compared to a few cents for MAX3485, and it’s a bit larger that MAX3485. You need ca 15 x 20mm PCB space for each of these. I have currently used them in two of my designs.

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.

Ethernet/GPRS Module 3D draft

Meet my new Ethernet/GPRS module. I am not finished routing the PCB and lack some 3D packages, but you get the idea. This 3D modeling tool is a bit ruff in the edges anyway, but it serves it purpose. Also, I still have a few loose ends here – so work in progress…

This 3D show a small button battery holder for RTC, but the SIM808 has a build in battery charger for a single 3.7V LIPO so considering if I can use that or add my own – I consider attaching a larger 3.7V LIPO battery on the back side to drive both MCU and SIM808, but I also need on/off for RPI if I do that. Basically the 5V from the back plane would charge the battery. For RTC I could use my old trick an insert a small supercap.

This shows the backside with the connector and mounting holes for a Raspberry PI Zero Wireless add-on. This add’s secure wifo + bluetooth as well as a very capable Linux server. HDMI & USB will be at front. Needless to say this can also connect a full Raspberry PI 3 using a 40 pin cable.

I am considering using the Space left of the Raspberry PI module for a LIPO battery as mentioned earlier.

As for the All-In-One Home Central I could just make a 1-2 card dedicated backbone with a 5-6V adapter and this would serve the purpose…

At precent I see no purpose in makeing a separate GSM, Ethernet or RPI module as indicated earlier – this combi does the job very well. Don’t be surpriced if you see the Zero W popping up as an option on more modules.

Loose ends/notes:

  • Battery charger/LIPO- I have little Insight into the build-in charger, so consider finding a different solution that also can be used on other Boards. Need digital on/off for RPI.
  • Antenna – not sure about the quality of my PCB shielding so considering using these micro taps and allow people to supply a shielded cable directly rather than adding 3-4cm of PCB lanes.
  • USB. I have space to output pins, but not for a connector.
  • Mic/Speaker – I have space to output pins to a header.
  • Bluetooth antenna on SIM808. Should try to add a micro antenna connector – yet another component I need package for. Not sure I ever need this, but I do have space for it, so why not.
  • GPS antenna crossing RPI header. Should ground pin 15 (GPIO22) & 16 (GPIO23) on the RPI header to create a continious ground plane under the antenna signal.
  • GSM Antenna is close to the SIM card. Possible to just move the card holder to the otherside with strong ground plane support to minimize effect. Either that or moving the SIM card holder to the middle of the card in which case it will be a pane to insert card. Not sure if this is a big issue.
  • RTC oscillator must be added, but little space here. We can use the HSE/8, but not sure how accurate that option is. Possible we can ignore the RTC clock on STM32 as we also have one on SIM808.
  • Consider if we need to add TVS on 4V. The Reference recommend this due to 2A on/off surge. This should not be any issue with a LIPO connected here. But, we should have space for this TVS so could just add it on PCB.
  • Some other LEDS from SIM808 – not sure if they add any value.
  • Top/Bottom edges need a clean up. Considering using a sliding holder and avoid screws in which case we need 1-2 mm clearing on top/bottom for a track.
  • Need to increase aura around drill holes and avoid these being ground. This is a mistake I have done repeatedly as I by old habit ground through mounting holes.
  • Need to adjust mounting holes for Raspberry PI Zero accurate.

PCM Interface – I2S

PCM Interface is a kind of standard build on the same principles as SPI. The SPI interface can handle the clocked bit-streams, but I2S can also handle the PCM encoding. In simple words I should be able to send/receive voice effortless – just need to get my head around register settings in STM32F405 which is made easier with STM32CubeMX (see Picture) – just a few clicks and you have sample code to play with. Just watch out because not all options are available in CubeMX.

Not sure if this is the correct setting – the PCM_CLK from SIM808 is fixed to 256Khz which is twice the frequency I need for 8000 Hz which is telecom standard (8000 * 16 = 128000) – assuming 1Hz on the clk is 1 bit I am missing something…

This is the issue dealing with various Chinese components – documentation in English is often limited – but we will sort it out.

The M4 is basically so fast that I was prepared to do this protocol the hard way – first time I look into the I2S and how it’s used. We have 2 of these available.

Ethernet/GSM/GPS/RPI Module

I decided to replace ESP-12 with a Raspberry PI Zero W fitted on the back facing front. The PLC card is of the same height as the PI Zero Length, so this is perfect. Mountimng it on top was difficult due to the Ethernet connector sticking out +  I had no space fr routing. I had to use a SMD version of a 2.54 pin header, but that’s fine. One of the things that made my decition is lack of encryption on ESP-12, something a Zero W does easily and you get a full Linux server as a add-on for 10.- USD.

The SPI Flash is still shown as an option, but I have no 4th SPI port so this is in reality ditched. I do however have an annoying right top corner with nothing – perfect for a RTC battery. I am in the process of routing this PCB and we are still at 80 x 65 mm. It will still take me a few days before this module is done.

SIM808 GSM, GPRS + GPS

Choosing GSM modules is a pain, but I landed on SIM800/SIM808. The difference is that the later contains GPS for an additional 4.- USD. I was first tempted to save those, but decided that a GPS add a very nice function for anything that is mobile. At a price of ca 10.- USD this is still affordable – so here we go – updated draft of the Ethernet module above and the RPI module below.  The only reason to chose SIM800 would be price, but I actually expect these prices to drop.

As mentioned earlier the RPI version will be a Hat that also plugs into the PLC backbone. I will work on the layout details – RPI is a bit tricky as it has connectors on 3 edges.

The reason I want both these are because I want an alternative that don’t include a Raspberry PI due to size, cost, slow start-up and SD-card (in)reliability. I am not blind for the option to combine these two into one – making Raspberry PI an optional add-on module.