Help needed connecting the Next board UART to a PC RS232 serial port

This section is for discussing everything about Next hardware and latest updates.
User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Help needed connecting the Next board UART to a PC RS232 serial port

Post by KevB » Thu Dec 21, 2017 7:26 am

ESP8266.png
ESP8266.png (776.97 KiB) Viewed 1791 times
Hi, I'm hoping to connect my TBBlue 2A to a PC serial port using a NULL MODEM cable. I've wired up a HALJIA RS232 serial port to TTL converter (MAX3232) as I understand the PC serial port voltage can range from -13V to +V13 which will overload the Next board.

I couldn't find the pin out description for the TBBlue 2A ESP8266/UART socket so I took the pin outs from the WiFi module ESP-01 found on the web. Please note that the Rx/Tx pairs are crossed.

I haven't powered my Next board on with this setup as I don't want to damage it. I only have basic knowledge of electronics otherwise I would have more confidence with my project lol. I'm a little worried about the voltage level going to the Next board as the MAX3232 operates between 3.3V and 5V.

I've provided a photo of my wiring. Would it possible to verify if my setup is correct and safe before I go ahead and power up and connect to a PC serial port?

The UART is mentioned here: https://www.specnext.com/the-next-on-the-network/

The UART voltage warning is documented here: http://devnext.referata.com/wiki/UART

The HALJIA RS232 serial port to TTL converter can be found here: https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1

Thanks in advance.
Last edited by KevB on Thu Dec 21, 2017 3:42 pm, edited 1 time in total.
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

seedy1812
Posts: 67
Joined: Tue May 30, 2017 11:31 am

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by seedy1812 » Thu Dec 21, 2017 10:14 am

I would not try it.
Some interesting reading - I'm just a programmer not an electronics expert https://www.sparkfun.com/tutorials/215

Edit : Just noticed you are using the RS232 serial port to TTL and not straight RS232 voltage so I guess it would be right ( famous last words ) as long as it does not go over 3.3 v

seedy1812
Posts: 67
Joined: Tue May 30, 2017 11:31 am

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by seedy1812 » Thu Dec 21, 2017 10:47 am

I got one of the usb to TTL ( keep wanting to put TLL - Tornado Low Level ) to program the UART ( which we don't need anymore ) and that had both 3.3V and 5V output ( http://www.miupanel.com/portals/0/Websi ... gram.png?t ). It makes me wonder if the MAX3232 has both voltage outputs ( https://www.amazon.co.uk/Tenflyer-MAX32 ... B00RG96N7C )

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by KevB » Thu Dec 21, 2017 12:00 pm

Thanks for the reply.

I've been doing research and it turns out that some RS232 TTL converters output Rx/Tx logic levels equal to that of the Vcc supply whereas others just output Rx/Tx at 5V. I'm still trying to verify the output of my HALJIA module as well as search for similar units that clearly state the voltage output of Rx/Tx.

I found this TTL module that states Rx/Tx outputs at Vcc supply level: https://www.amazon.co.uk/Ultra-Compact- ... RC9MSKY8CB

I'm still unsure as I write this reply of the Next board ESP8266 pin specification although J15 mirrors the pins and is documented. I could get a professional to solder a pin header on J15 and tap off the 3.3V pin but then I would still be at the mercy of the TTL converter's Rx/Tx output voltage. I'd rather keep my board unmodified and it's easy to just insert pins into the ESP8266 socket.

I have noticed that the ESP-01 WiFi module requires 3.3V so that would suggest that the Vcc pin meets that specification.
ESP-01.png
ESP-01.png (19.69 KiB) Viewed 1791 times
There was a mention of the HALJIA module on the official Facebook group: https://www.facebook.com/groups/specnex ... 562070635/

I don't have a Facebook account otherwise I would have contributed to the post.

EDIT:

I've decided to order a RS232 to TTL Converter from NulSom as detailed information is available on the web. I'll update this thread when it arrives (hopefully tomorrow).

Product can be found here: https://www.amazon.co.uk/gp/product/B00 ... OZKZ&psc=1

Datasheet is here: http://www.nulsom.com/datasheet/NS-RS232_en.pdf

Product IC (SP3232E) datasheet confirming Rx/Tx output at Vcc here: https://www.exar.com/ds/sp3222e_sp3232e.pdf
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
Andy P
Posts: 123
Joined: Mon May 29, 2017 9:15 pm
Location: Lancashire

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by Andy P » Thu Dec 21, 2017 10:47 pm

Theoretically it should work without any harm. The MAX 232 chip acts like a opto isolator keeping the voltages separate.
The capacitors on that PCB (C1 to C4) are charge pumps which pulse high voltages (-13v and +13v) on the serial side.

Also I have noticed that only RX ,TX & GND are connected to the 9 pin serial side so other signals like RTS, CTS etc are isolated.
As long as the TX and RX give out voltages at VCC level it is safe to use.

However take this as information only as I don't want to be held responsible.

User avatar
Timbucus
Posts: 223
Joined: Tue May 30, 2017 7:43 pm

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by Timbucus » Thu Dec 21, 2017 11:10 pm

I have not actually tried this yet but, was planning to as I have a few MAX3232 modules that look identical to the one in your photo - I cannot read the chip designation in your photo though. I did use the USB to serial port adapter mentioned (for the ESP) this way to connect to my PC and test the UART program I am developing wired the way you show and that works fine at 115K baud. But, back to your question the MAX3232 is rated for 3.3V use so should be fine - http://www.ti.com/lit/ds/symlink/max3232.pdf but, the RX line probably needs a resistor pair to reduce from 5v to 3.3v reading the spec sheet - although if powered from 3.3v not sure it can generate that. Not as easy as it seems... I used mine on a PI so was at 5V - the charge pump capacitors are probably wrong for mine at 3.3v as well. Interested in how you new module works out.
I'm Infinite Imaginations when not in work... PAWS for thought.

philipstephens
Posts: 33
Joined: Mon May 29, 2017 8:38 pm

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by philipstephens » Fri Dec 22, 2017 2:57 am

It sounds like you should put your circuit on a breadboard and test it thoroughly first, rather than just relying on documentation.

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by KevB » Fri Dec 22, 2017 11:43 am

NS-RS232-01-H.png
NS-RS232-01-H.png (630.02 KiB) Viewed 1737 times
Thanks for the advice, it was very helpful and great to read that other members are interested in the subject of UART communication.

My new module has arrived thanks to Amazon Prime. I need to solder some wires before I can progress.

The IC on the HALJIA module is marked MAX3232 ESE+1702.

I'm going to roll with the NulSom solution as I'm confident the SIPEX3232EE based module uses Vcc on Rx/Tx. Sadly I don't have the facility to test on a breadboard although I am tempted to wire up Vcc and GND to the Next board so I can power the module and use a multimeter to check the Rx/Tx levels.

I'm treading with caution on this project so I wont be executing it fully until I am 100% sure it is safe.

SIPEX3232EE datasheet can be found here: https://www.sparkfun.com/datasheets/Com ... _3232e.pdf
SIPEX3232EE.png
SIPEX3232EE.png (652.06 KiB) Viewed 1737 times
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by KevB » Fri Dec 22, 2017 4:44 pm

RS232.png
RS232.png (607.32 KiB) Viewed 1718 times
Here's the NulSom module plugged into the ESP8266 socket. I'm waiting for a little more feedback from the forum before I power on the Next board. I'm pretty sure everything checks out but would like conformation of the ESP8266 socket pins if possible.

The wiring is as follows:

ESP Vcc (Red)
ESP TxD (Orange)
ESP RxD (White)
ESP GND (Black)

The SIPEX SP3232EE datasheet can be found here: https://www.sparkfun.com/datasheets/Com ... _3232e.pdf

The following information is taken from the SP3232EE datasheet providing details of the voltage of Rx/Tx being Vcc + 0.3V:
Vcc.png
Vcc.png (91.14 KiB) Viewed 1711 times
Last edited by KevB on Fri Dec 22, 2017 5:23 pm, edited 3 times in total.
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
Timbucus
Posts: 223
Joined: Tue May 30, 2017 7:43 pm

Re: Help needed connecting the Next board UART to a PC RS232 serial port

Post by Timbucus » Fri Dec 22, 2017 5:07 pm

You could connect the RX and TX to each other and then measure the voltage as you use the PC to set TX ON - as you say from the spec sheet it seems 3.6V is the max generated with Vcc at 3.3v - outbound from the Next would be perfectly safe to try anyway it would only be the data into it if it exceeded 3.3v (+/- tolerance) that could cause an issue. I will put it on the scope when I get time.
I'm Infinite Imaginations when not in work... PAWS for thought.

Post Reply