UART interface SBMS0

131 views
Skip to first unread message

Dave Festing

unread,
Apr 7, 2021, 3:36:44 PM4/7/21
to electrodacus
Hi Dacian,

I having been using the SBMS0 data connection to a RaspberryPi for months and now want to interface to a UART on a ESP32.  I have a FDTI FT232 board and have worked out that I can "inject" 5V on the USB connection so that 5V gets back to the SBMS0 as in a normal USB connection.

On page 15 in the manual:

If you are using the USB then this side of the isolator is powered from USB
else if you say want to use this with UART directly connected to Raspberry
Pi or similar boards then you need to provide also 3.3V on the 3V labeled
pin. 

I assume if I inject 5V  as described then I don't need to do this.  Is the "3V labeled pin" on the schematic.

Thanks,
Dave

Dacian Todea

unread,
Apr 7, 2021, 4:37:08 PM4/7/21
to electrodacus
Dave,

You can just connect the USB in to your RaspberyPi and that is all you need to have a isolated serial connection. On the SBMS0 WiFi/USB board there is a UART isolator the MAX14851  and after that there is a UART to USB converter.
ESP32 will be disabled as soon as you set the UART as active in the SBMS0 menu.
And yes if you power the board through USB the 3.3V will be already present there but if you connect the USB to Raspberry Pi then you already have both the power need (just a few mA) and the UART interface trough the build in UART to USB converter in the SBMS0. 
The max reliable speed through USB is 460.8Kbps but even 115.2k is more than sufficient as there is not that much data.

Dave Festing

unread,
Apr 7, 2021, 5:36:55 PM4/7/21
to electrodacus
Thanks for confirmation.  Where is this "3V labeled pin" on the schematic?  And why would you want "to provide also 3.3V on the 3V labeled
pin".  Is that for cases where you haven't got VDD5 coming from the connected device? 

Dave Festing

unread,
Apr 7, 2021, 6:25:36 PM4/7/21
to electrodacus
On further investigation when I choose 3V3 on the 3V3/5V voltage selector jumper on the FDTI FT232 board it feeds 3V3 back the USB cable.  The CH340 evidently works at 3V3 so hopefully no further messing-about is required.

Dacian Todea

unread,
Apr 7, 2021, 6:45:39 PM4/7/21
to electrodacus
Dave,

There is a CH340 build in to SBMS0 (the WiFi/USB board) In the schematic that is noted as VDD33.  If you use the USB then power and data is all available no need for any other connection.
If you do not want to use the USB connector then you can supply the 3V (2.7 to 3.3V) from the raspberry PI to the SBMS0 (WiFi/USB) bard and connect the TX pin to one of the Pi RX inputs on one of the UART ports that you want to use then the CH340 will not be used but signal and power is still isolated thanks to the MAX14851 
Not sure why you will need a FTDI FT232 in any of the two options if you are using the Pi then either use the USB port on SBMS0 as that already contains the CH340 same functionality as the FT232 and if not you can just connect directly to one of the UART pins on the Pi and supply GND and 3.3V from the Pi to the SBMS0.

Dave Festing

unread,
Apr 7, 2021, 7:21:59 PM4/7/21
to electrodacus
So, the "labeled 3V pin" is VDD33.

I do want to leave the SBMS0 as is.  I need a FDTI FT232 board to convert the SBMS0 USB interface to a UART interface on a ESP32.  I am running Micropython on a ESP32_Devkitc_v4 board and as UART0 is used for REPL I need to use another UART (ie 1 or 2).

Because the ESP32 is not 5V tolerant I am running the USB/UART board at 3V2 and feeding that back to the SBMS0.  I am not seeing any data ... but that is my problem :)  I was really just checking that I didn't need to do anything in SBMS0 when feeding 3V2 back in the USB port.

Thank you,
Dave

Dacian Todea

unread,
Apr 8, 2021, 2:26:09 PM4/8/21
to electrodacus
Dave,

Simples way to connect your ESP32 to the SBMS0 is to provide 3V same one that you use for the ESP32 to the SBMS0 and also connect the GND then connect the TX pin that will be limited to 3V to one of the RX pins on your ESP32 nothing else will be needed.
There is nothing to send so you do not need to use the RX pin on the SBMS0 as only the TX pin is used to transmit automatically the data at the interval you set in the SBMS0 menu 1 second the fastest but I think default is one data packet every 30 seconds.

Dave Festing

unread,
Apr 8, 2021, 2:46:25 PM4/8/21
to electrodacus
Dacian,

I would prefer to leave the SBMS0 in its current state.  I have ordered a proper USB host controller to UART board.  In a month it will give me something to do on a long winters evening!

Thanks,
Dave

Dacian Todea

unread,
Apr 8, 2021, 3:46:58 PM4/8/21
to electrodacus
Not quite sure what you mean. You will not do any modifications to the SBMS0.

Dave Festing

unread,
Apr 8, 2021, 4:17:29 PM4/8/21
to electrodacus
I would prefer not to connect more wires to it.  Also, if I want to revert to using the RaspberryPi then buying a  $15NZ USB host controller to UART unit makes things "plug and play".

I would make modifications to the SBMS0 if I can't the host controller solution to work.

Dacian Todea

unread,
Apr 8, 2021, 11:47:51 PM4/8/21
to electrodacus
Dave,

SBMS0 is already plug and play if connected to one of the USB ports on a RaspberryPi all you need is a USB to micro USB cable nothing else.

No matter what you connect to SBMS0 the Pi or an ESP32 all you need is a cable no active devices need USB cable or 3 wires in case of ESP32.

Dave Festing

unread,
Apr 9, 2021, 12:24:06 AM4/9/21
to electrodacus
Dacian,

I have been using a RaspberryPi for the last year.  My definition of "plug and play" means not removing the SBMS0 (first run) from the cavity in my wall, connecting more individual wires or soldering any wires to the WiFi board. 

I will try using the USB host controller to UART device then if there are many long winters evenings I might try the "3 wires" approach :)

Cheers,
Dave 
Reply all
Reply to author
Forward
0 new messages