RS232 to TTL

Hi friends,
Firstly, I have arduino mega 2560 r3 board and fire terminal. I configured the fire panel printer output as rs232 (not ttl) which baud rate is 9600.

When I connected firepanel printer output to usb converter, it works well. So everything is good at that moment :slight_smile:
I bought ttl to rs232 serial converter, it works with computer and arduino but it doesn’t work with firepanel. I didn’t receive any messages when firepanel sent.

I made some tests. They’re :
PC <-> Usb - RS232 converter <-> Fire panel (It works)
PC <-> Usb - RS232 converter <-> RS232 - TTL Converter <-> Arduino (It works)
PC <-> Usb - RS232 converter <-> RS232 - TTL Converter <-> TTL - USB Converter <-> PC (Works, I did that for be sure the converter is works.)
PC <-> TTL - USB Converter <-> Arduino (It works)

Fire panel <-> Arduino (I connected direct, it received wrong data)
Fire panel <-> RS232 - TTL Converter <-> Arduino (that i want to do, but it recevies nothing !)

Could you tell me what the my problem is ? :grin:
Thank you all :smiley:

My rs232 to ttl converter is :

RS-232 has two "genders" - DCE and DTE. You can not connect a DCE to a DCE or a DTE to a DTE without an adapter.

please, can you little bit be specific?

if i’m wrong, please let me know it :slight_smile:
I’m only using 2,3,5 pins so when i connect the cables cross (2 <-> 3, 3 <-> 2 , 5 <-> 5), i can change the connector. Am i right ?

By the way, I tried every cable combination, it didn’t work.
Thank you for your answer.

For those lacking the mind reading skill...

Explain: "fire terminal/fire panel"

To someone like me, a fire panel is something located in the Security Officers office to monitor building fire control features.

Fire Panel

Yes, we need more details. What fire panel device, What Arduino board (5V or 3.3V)?

Does the fire panel use RS422? Convert RS422 from fire panel to RS232 on host system

MAX3232

Caner:
Hi friends,
Firstly, I have arduino mega 2560 r3 board and fire terminal. I configured the fire panel printer output as rs232 (not ttl) which baud rate is 9600.

When I connected firepanel printer output to usb converter, it works well. So everything is good at that moment :slight_smile:
I bought ttl to rs232 serial converter, it works with computer and arduino but it doesn’t work with firepanel. I didn’t receive any messages when firepanel sent.

I made some tests. They’re :
PC <-> Usb - RS232 converter <-> Fire panel (It works)
PC <-> Usb - RS232 converter <-> RS232 - TTL Converter <-> Arduino (It works)
PC <-> Usb - RS232 converter <-> RS232 - TTL Converter <-> TTL - USB Converter <-> PC (Works, I did that for be sure the converter is works.)
PC <-> TTL - USB Converter <-> Arduino (It works)

Fire panel <-> Arduino (I connected direct, it received wrong data)
Fire panel <-> RS232 - TTL Converter <-> Arduino (that i want to do, but it recevies nothing !)

Could you tell me what the my problem is ? :grin:
Thank you all :smiley:

And where is the code? How many uarts does mega have? How are you checking if mega received correctly?

The PC is DTE and it works with the fire panel so the fire panel is DCE. It doesn't work with the arduino to fire panel because the arduino is also DCE. (The PC to arduino works and the PC is DTE so the arduino must be DCE. DCE to DCE does not work. You can only interface to the fire panel with a DTE device.

I've written a bit about RS-232 / Serial at...

http://www.arunet.co.uk/tkboyd/ec/ec1ser232.htm

=== Sadly, I have to point out that what you might have meant by...

By the way, I tried every cable combination,

... could mean that you connected things that weren't meant to be connected... and which will no longer be working, as a result.

Electronics can be wonderfully forgiving.... but you can't "beat up on them" willy nilly!

=== "DTE"/"DCE" can be a bit confusing. https://en.wikipedia.org/wiki/Data_terminal_equipment

is helpful.

At the heart of it all: The data OUT of one device has to go into the data IN of the other. And of course, there may be TWO channels, four connections. (Data from device "A" to device "B", and the other channel for data flowing the other way. But for the printer part of your system, the data flow is probably just TO the printer, no data the other way, of course.

=== And then there's the handshaking. That's another area of potential problem.

hi,

i have had similar problem and i think i kind figured this one out though havent tested it yet but may be it can help you.

try using a cross cable or null modem cable:

Arduino <-> TTL - USB Converter with Female DB9 <-> Null Modem cable <-> Fire panel device.

The PC is a DTE device and Fire Panel is a DCE. When you install a TTl - RS 232 converter with a female DB9 (these are abundantly available as compared to the ones with male DB9), it also has the configuration of DCE device but you want your arudino to behave as a DTE. so if you use a null modem or cross cable, it should solve your problem.

do test and let me know the results.

Did you notice the date on the post to which you replied?

3 1/2 years and we still have no reply on what a fire panel is.

3 1/2 years and we still have no reply on what a fire panel is.

Yeah, that's a tough one. I think I missed that question...

Paul__B: Did you notice the date on the post to which you replied?

I actually did notice the date. but i left an answer anyway so that someone who came here looking for a solution like i did may find help in my answer.

thehrao: I actually did notice the date. but i left an answer anyway so that someone who came here looking for a solution like i did may find help in my answer.

And in the same way, a correction to the miss-information of one post.

RS-232 was initially designed so no damage to any equipment would happen if ANY of the pins were connected to ANY other pin or combination of pins. That was true 50 years ago and is still the case today. If something was damaged, then the interface was not RS-232.

Paul edited addition:

The use of a DB9 or a DB25 connector does not make it a RS-232 connection. I used to use those connectors for 20ma current loop connections to Data General terminals.

If you're going to give them the solution why not explain WHY it works ? Seriously, HOW MANY PEOPLE (these days) KNOW what DTE & DCE mean ? It goes back to the introduction of the first modems (external mostly) for computers. (Probably CPM originally and later DOS based) The modem was a (DATA) Communications Equipment (DCE) and the computer was a (DATA) Terminal Equipment (DTE). (or you could thing of it as Host/Slave) This makes it easier to understand why Host-Host and Slave-Slave don't work (we'll ignore for the moment the fact the you CAN connect two COMPUTERS to each other but probably not two TERMINALS unless you use a null modem cable) So since the Fire Panel is mimicing a modem, the "null-modem" cable is so called because it swaps Tx & Rx pins allowing the Tx to connect to an Rx and vice versa, hence "nullifying" the DCE modem mode, thus it is a " null modem " cable.

Only the "old guys" remember DB25 connectors which were the norm at one time.

raschemmel: It goes back to the introduction of the first modems (external mostly) for computers. (Probably CPM originally and later DOS based)

Err, no!

Somewhat earlier.

Ok, how far back does it go ?

Do you remember the modem with the cradle that the telephone handset sat in?

Do you remember the modem with the cradle that the telephone handset sat in?

Didn't they use that in some movies about hackers ? (or was it War Games ?)