5

I have a DSC-1555 Alarm system that I am trying to wire up to an Arduino-Mega the problem I've run into is that the DSC uses 12v TTL to the Console and the Arduino uses 5v TTL.

I was just guessing to use some resistors but I want to double check before trying.

  • 1
    What does TTY mean? Do you mean TTL? – J. Polfer May 21 '10 at 16:40
  • 1
    I was thinking unix for some reason, the serial output to the alarm mumpad is what I was thinking of. –  May 21 '10 at 16:44
  • The problem your'e mentioning is a _hardware problem_ (mismatched logic levels), and not a software problem. So I wouldn't refer to the system as a TTY in the case. – J. Polfer May 21 '10 at 16:46
  • 2
    A TTY is a teletype. I think here it means RS232 aka serial port, 12V is the standard voltage for that. – starblue May 21 '10 at 19:08

3 Answers3

4

You'll need to convert the DSC-1555 Alarm systems 12V levels down to something the Arduino can handle.

Without having prior knowledge of how the DSC-1555's serial hardware works, there's not much I can say. I'd get a hold of the datasheet and get more info.

Is it RS-232C (or some other revision) compliant? If so, you should get a 12V RS-232 -> 5V line converter. You could try "stepping down" the voltage with resistors to something the Arduino can handle, but this is fraught with problems, as the signals will likely be inverted and may be outside the range the CMOS chip can handle, potentially causing damage. If it's RS-232 compliant, get a converter and your headaches will be far less.

J. Polfer
  • 3,780
  • 2
  • 27
  • 33
  • Im not really sure, I'm fairly new to hardware electronics so this project might be over my head. Thanks anyway –  May 21 '10 at 17:01
  • @Aaron - Since the DSC-1555 is a home security/automation device, you might find some more tips/help on a DIY home security or home automation site, as they might know more about how the DSC-1555 works. The folks here are primarily into electronics and embedded stuff, but not specifics like that. – J. Polfer May 21 '10 at 18:28
  • @Aaron - Another thought - try wiring up the numpad to a PC serial port, and using a terminal emulator running on that port with different options (baud rate, bits, parity, flow control, etc) to see if you can get any data out. You may need to use a null-modem to connect the two together, as the TX/RX lines may need to be swapped. – J. Polfer May 21 '10 at 18:32
  • If it's RS232 then use a MAX232 as a level converter. – starblue May 21 '10 at 19:02
4

It's a little unclear what you're interfacing with, exactly, but if it comes down to getting 12V RS-232 levels in & out of an Arduino (or any other 5V logic), it's not all that difficult.

Regular RS-232 levels are spec'd at -3V to -12V for the 'marking' state (logic '1') and +3V to +12V for the 'space' state (logic '0'). A typical device isn't going to cover that entire range, for example, a PC serial port might give you a -11.5V mark and a +11.2V space, while another device might give you -9 and +9.

TTL levels on the other hand are spec'd at logic 0 being less than 0.8V and logic 1 being more than 2.4V, although with CMOS devices logic '1' wants to be as close to the supply rail as you can get it.

There are a number of chips that will change between 5V logic levels and +/-12V RS-232, that are quite cheap, and even work without an extra 12V supply. You could check out parts like the ones Maxim makes.

JustJeff
  • 19,163
  • 3
  • 48
  • 75
0

"Real" serial ports use the EIA-RS232 standard of +/-12v volts which allows quite long cables. Lots of embedded gear uses the TTL logic levels of 0/5v, as this is much simpler but can only be run a metre or so. Sometimes you can cheat and connect TTL outputs to an RS232 input, even though this violates the RS332 spec. I wouldn't recommend going the other way and connecting 12v to a defenceless uC expecting 5v, though.

The reason for the use of 12v and -12v is noise immunity---5v serial lines only work over short distances before the noise overwhelms the signal, while RS232 can run up to 10m or more.

Traditionally the line drivers/receivers used to convert TTL to RS232 require +/- 12V power. This is the main reason there is a -12v line on a PC power supply. For 5v only systems, the Maxim MAX232 is the defacto standard for RS232 interfacing--this chip uses capacitor charge-pumps to generate +/- 12v from a single 5v supply.

If you aren't up to building a MAX232 interfacing circuit you can buy one pre-built from futurlec for about $5: http://futurlec.com/Mini_RS232_TTL_5V.shtml

I can provide a work-alike single-sided PCB layout for a TTL<->RS232 converter, if anyone is interested, as I built one a while ago to use when prototyping serial interfaced projects.

Christopher Biggs
  • 1,486
  • 7
  • 7