3.3V PSU on MC4X15A

This scope pic is from the 3.3V on my MC4X15A – Universal Motor Controller. The MCU is running and I have the 0.33F Supercap mounted. Ca 200mV point to point ripple is to much for my taste, but it works and this is far better than I have measured out of the Lab PSU’s. I am also using the DPS5005 in this case just to see if it worked at all.

This started as a small experiment as I wanted to see the effect of swapping out the inductor on my LMR14206 – I obviously need to revisit my lab PSU design. The lab PSU and scope is located next to each other on the shelf and I only need to switch it on to introduce noise – I don’t even need anything connected. I obviously have introduced a noise source in my lab that I need to figure out.

This is a set-back because I have been extremely happy with DPS5005 before this.

Returning to LMR14206 I seem to be stuck with 200mV point to point ripple. I am also puzled to as why I see the same ripple on 12V and 3.3V, but I will get some help investigating that. The actual reading on the scope pic is much higher, but that is the external noise. The ripple signature will differ a bit from using DPS5005 versus Thaoxin as they introduce different noise pictures. The small spikes you see above is the 1.25Mhz switching frequency of LMR14206 – and just for the record – it’s no problem adding a filter on the 12V and remove this ripple, but that add PCB size and complexity – part of the objective here was small space.

LMR14206 – 12V DC/DC

I decided to test my LMR14206 based DC/DC again and replaced the 15uH inductor with a 47uH inductor on the 12V design. The scope pictures was a shock:

This first scope picture show what I saw as 12V out. It is 12.2V, but look at that ripple picture of several voltages. To compare I scoped what I got out of my PSU and what a shock – I saw the same signature in and huge spikes & ripples out of the DPS5005 based PSU.

This is with no load and it show the same noise signature. The Scope above have different time scaling. Replacing the DPS5005 with the older Thaoxin I also instantly saw a different ripple signal from LMR14206 as can be seen below:

This is a bit better as we have 12.2V and +/-100mV ripple out. But, I need to go back and open my DPS5005 to figure out where the ripple noise is introduced.

ESP32/STM32/Raspberry PI – all in one dev kit

Starting at left is a ESP32 Breakout board, then one of my own STM32F405RG breakout boards, a 5″ HDMI, Wireless keyboard and Raspberry PI 3 with my 5 port Hat – and your right it’s a different Hat with screw terminals, so I do have 2 x 5 port Hat’s working.

 What I will do here is to wire up SPI between ESP32 & STM32 for testing, and I can add CAN breakout boards etc getting the boards to communicate. The only drawback here is that I can only use one SWD at the time, but I will get around that.

Raspberry PI Wiring

This shows a Raspberry PI 3 with a Communication Hat, Display and mini keyboard. This is basically all the hardware I need for a very advanced CAN Adapter & Analyzer. The main reasons I am skeptical is the wiring needed on this solution. Using a HDMI display is very powerfully, but you need a large project box for this. The total size and cost of the adapter adds up. I seriously which someone would create a more box-able display solution for Raspberry PI – one that take into account the Hat option.

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!

RS485 & CAN Line Interface

I am just assembling one of my first Raspberry PI Hat’s With a 3 x RS485 and 2 x CAN for testing. The circuits below is what I used at the time. Rev 1.2 will use 3.3V only and remove the components crossed in Red.

It is a common error to add protection towards ground, but what you actually do is to force ground to be part of the signal. RS485 and CAN are both differential signals that should not need ground. If you need protection use the galvanic Versions! Even worse, the “protection” will disturb your signal quality at higher speeds.

Another issue here is that RE and DE is connected – this works, but it prevents some options – etc reading as you send to detect conflicts and disabling both sending and receiving etc.

The rev 1.1 also used some 1206 Components and a mix of 3.3V and 5V, as well as a XC6206 3.3V regulator in SO23 package. This will all be replaced with AMS1117, 0603 packages and 3.3V Components. Rev 1.1 also had the mistake that I implemented ground plane on both sides – it is not realy a mistake as such, but it makes it harder to assemble prototypes by hand.

Galvanic RS485/CAN

Since we talk about galvanic RS485 & CAN Adapter’s I guess it is time to visit this project as well. The universal adapter below was something I started last time I needed CAN. This adds W5500 and ESP12-E + NRF in addition to CAN & RS485.

I never made a revision of this Board, but it served a purpose to test CH340G, STM32F405RG and ADM2582E together. The Board above with the added coil was after my struggle to get STM32 ticking at 168Mhz.

I never tested ADM3053, so that is what I will do next. I see no point sending for a new PCB including parts of this design before I have completed this test.

As for the adapter above – this has in many ways been a big success because I have corrected and re-used a lot of the design I did here, but I will not finish this adapter as such. ESP32 is so much better than the ESP12 or ESP8266 based options. I do however have things left to test on this Board.

Why not Raspberry PI as CAN Adapter?

This is the rev 1.2 of my 5 port Hat with 3 x RS485 and 2 x CAN. I never ordered this PCB because it is only mechanical changes from Rev 1.1. But, using this or a galvanic version with Raspberry PI is an option for my CAN Adaptor plans.

The advantages with this is that Raspberry PI have an excellent HMI option. It would also enable a PLC style adapter where you add on what you need – but it would be a much larger solution as well.

The size difference from a packed, single board solution is not dramatic and it offer other options as you get a proper display, keyboard and a full Linix computer to back it up.

Not so mini CAN Adapter

This is the same drawing as the previous post, but I added the TF Card option. Basically this is a small mini-computer Complete With display, keyboard (in the display), Wifi, Storage etc. Just for the record it actually got more “disk” and RAM than my first IBM Compatible PC.

I have never done a TF-card Interface, but I have some breakout boards laying around. As mention you can actually buy this on the NET known as “CAN32” for ca 39.-USD. It comes as a specialized breakout Board for ESP32. But, the good things is that I can easily assemble this on a vero Board to get started – and since someone else have made firmware for this we can use their project and modify it as a starting point.

What I want to achieve here is a CAN Tesrter, Analyzer & Adapter – all in one. I need CAN connectivity and I need to see what happens on several CAN Networks simultaneously. As mentioned earlier I will use a STM32 to deal with CAN and make this galvanically isolated later, but this is something I can wire up and start with while waiting for PCB’s.

Assuming the TF Board Works out I should also add this to the larger Board. I also think I want to Mount the display on ESP32 and if I have Space add the 16 analogue IO lines from STM32 as a separate port.

This design start to make a bit sence because we now use ESP32 for Wifi, HMI, Storage, while we leave CAN and IO to STM32.

The last part of this project is boxing it. In fact, we could use Bluetooth to connect to our phones/tablets as HMI rather than adding a UART based HMI as well. With Wifi I can obviously connect my laptop as HMI, but the reason I explore other options is because my laptop usually is occupied otherwise and I need the extra screen. Fiddling around swapping screens and turning Smart Phones orTablets on/off is not always the most convenient choice, so having a physical display on the adapter is a priority IMO.

It’s only one flaw here – I am making all this for CAN while I myself am a heavy user of RS485/RS-X. The STM32 I use here have 5(6) UART’s, and if I commit on using STM32F405RG I have 2 x 10Mbps RS485 capable ports that will be very handy for sniffing on my PLC system later. The only thing is that I can’t use galvanic isolation at that speed, but I can live with that.  Woops – wrong! Checking the datasheet of ADM2582E it supports data rate to 16Mbps!

Puh – I better stop writing before I add more into this – my only concern here is what speed I can get between ESP32 and STM32 on UART or SPI. I am hoping on 40ich Mbps on SPI, but that is yet a unknown that I need to investigate. I think ESP32 is capable of this, but it’s more if I am capable of using it – lets see.

CAN32/CANMini

It exist a project that simply add a CAN Tranceiver to a special ESP32 dev Board – called CAN32. This uses the CAN on ESP32 and provide a Wifi based CAN Interface. I have a few CAN breakout Boards and Nextion displays so I want to assemble one of these. The main drawbacks With this is (1) I am unsure about the quality of CAN on ESP32, and (2) it don’t uses a galvanic isolation.

Galvanic isolation complicate things a bit. You don’t really need it for Wifi usage, but you seriously should have it if you connect the USB to your PC With industrial equipment on the other side.