Z-UNO + RS232

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
ondrej_bajer
Posts: 33
Joined: 17 May 2018 09:55

Z-UNO + RS232

Post by ondrej_bajer » 17 May 2018 11:22

Hi guys,

I'm trying to use Z-UNO in order to pull the data from the UPS, via RS232 serial interface.
I've added RS232 to TTL module to Z-UNO, but no matter what I try, it's not able to communicate. What I tried aleready:

- Module power is connected to Z-UNO pins +5V and GND
- Serial0 (UART0, pins TX0, RX0)
- Serial1 (UART, pins TX1, RX1)
- Connect Z-UNO to UPS via DB9 direct cable
- Connect Z-UNO to PC, via DB9 laplink cable
- Swapped RX/TX wires between Z-UNO and RS232toTTL module
- 2400 baud
- 9600 baud

When Z-UNO sketch is talking to a computer via built-in USB serial, it work fine (using Arduino Serial Monitor or Putty).
When I switch the sketch to use Serial0 or Serial1, nothing comes thru.

Please, do any of you have Z-UNO working with any kind of RS232 module? Maybe that mine is incompatible (got 2 same, none works).

Thanks a lot!
RS232TTL MALE.JPG
RS232TTL MALE.JPG (30.97 KiB) Viewed 904 times

petergebruers
Posts: 220
Joined: 26 Jul 2015 17:29

Re: Z-UNO + RS232

Post by petergebruers » 17 May 2018 15:59

What chip is on that converter board? I suspect possible issues if the nominal voltage is 5 V. The Z-Uno outputs max 3.3 V (actually closer to 3.1 V). That might not be high enough to signify "1". Also, it does not accept more than 3.3 V on any pin, higher voltage with no current limit damages the Z-Uno. I a alrost always put 1 k resistors in series with any I/O pin when I am are experimenting.

You could try to power that converter on 3.3 V but without knowing the specs of the chip this is "a shot in the dark".

ondrej_bajer
Posts: 33
Joined: 17 May 2018 09:55

Re: Z-UNO + RS232

Post by ondrej_bajer » 17 May 2018 17:26

Hi Peter,

tt's:
MAX3232
ESE+ 1708


So, you mean power this from 3.3V pin and put 1K resistor in series with RX and TX?

petergebruers
Posts: 220
Joined: 26 Jul 2015 17:29

Re: Z-UNO + RS232

Post by petergebruers » 17 May 2018 17:29

Yes. The resistors are there, in case you accidentilly connect the uno to 5 or 12 V. Any partnumber on that chip.

ondrej_bajer
Posts: 33
Joined: 17 May 2018 09:55

Re: Z-UNO + RS232

Post by ondrej_bajer » 17 May 2018 17:39

On the chip there's just MAX3232 ESE+ 1708 written, nothing else.
Bought from here: https://www.ebay.com/itm/263286469667

petergebruers
Posts: 220
Joined: 26 Jul 2015 17:29

Re: Z-UNO + RS232

Post by petergebruers » 17 May 2018 17:44

Tht's ok, that is a "typical rs232 converter IC"

According to the datasheet: "Operates With 3-V to 5.5-V VCC Supply"

BTW I have not used RS232 in 10 years :-) my memory is rusty. There is a whole bunch of signals like CTS and DTR that might need to be set, before the UPS wants to transmit. I do not have a clue. Wikipedia, rs232?

ondrej_bajer
Posts: 33
Joined: 17 May 2018 09:55

Re: Z-UNO + RS232

Post by ondrej_bajer » 17 May 2018 18:23

For this particular model, there are just 3 pins in the supplied cable:
- TX
- RX
- GND
So, there's no need for hardware signalling CTS etc... :)

Just checked Z-UNO, and RX/TX pins of UART0 are fried. But RX/TX pins of UART1 are still working in digital_out mode (LOW/HIGH).
So, I will connect the RS232 module to +3.3V and UART1 to test it...

petergebruers
Posts: 220
Joined: 26 Jul 2015 17:29

Re: Z-UNO + RS232

Post by petergebruers » 17 May 2018 18:50

Oh... Xon/Xoff protocol? Or maybe no handshake at all? Plausible.

I'm sorry to hear about those fried pins... Yeah... 1 k resistors...

A tiny (clone) logic analyzer might come in handy right now.

ondrej_bajer
Posts: 33
Joined: 17 May 2018 09:55

Re: Z-UNO + RS232

Post by ondrej_bajer » 17 May 2018 19:54

- Swapped Z-UNO board for a new one.
- Swapped RS232 module for 2nd.
- Probing RX/TX pins with a LED+resistor.

LED slightly changes brightnes in both cases:
1) when I'm sending a string from Z-UNO, and probing TX pin 7
2) when I'm typing into Putty, and probing RX pin 8

So, the TX pin is able to send, and signal from the computer(putty) is making it thru RS232 module, hitting Z-UNO's RX pin.
BUT, no data is really comming to/from Putty. I'm lost.

Looks like I really need a validated HW solution :|

ondrej_bajer
Posts: 33
Joined: 17 May 2018 09:55

Re: Z-UNO + RS232

Post by ondrej_bajer » 17 May 2018 20:00

Now it works :)
Z-UNO is sending a text and also able to receive info from RS232. Finally!

I've changed baudrate from 2400 to 9600 on both sides (sketch and Putty) and it started working.
Shame, I need 2400 baud as UPS has fixed baudrate :(
RS232 - Z-UNO putty.jpg
RS232 - Z-UNO putty.jpg (229.24 KiB) Viewed 870 times

Post Reply