2

Product Link

I am connecting this to an Arduino. (once Arduino programmed I removed the USB connector as it shares the serial comms with Pin0&1)

RS232<->Arduino
VCC <-> 5V
GND <-> GND
TX <->Pin0(RX)
RX <->Pin1(TX)

Seems simple enough. However when I connected the DB9 port to the actual serial device I could clearly see the serial data being sent to the RS232 (RedRX LED was active) but nothing was coming back from the actual device I was connecting to.

So...

I then connected the device to my laptop & hyper-terminal to test I could communicate with it. Sent the same commands as I was getting the Arduino to do... And yes I was getting the correct responses from the device.

I then connected the Arduino+SparkFun RS232 to Hyper-Terminal and loaded up a basic program into Arduino that a) sends a welcome message and then b) sends a message each time it receives a character via the serial interface (one of the example sketches of the Arduino). The result I am getting is the welcome message only, the SparkFun RS232 is not seeing anything I send back from Hyper-Terminal.

Is it faulty or am I missing a vital trick to getting it working properly?

Thank you for any help.

edit: I should also add that this morning I tested pins 0 & 1 with a simple LED blink sketch to prove the arduino pins were functioning (which they were).

This is Kellenjb- I am having a hard time easily seeing what cases are working versus not working. Rather than writing a long and hard to follow comment or an answer that isn't an answer, I am going to add it here and have the OP or someone else correct me if I have understood wrong.

Arduino Sparkfun Shifter -> Serial Device (No Go)
Serial Device -> Arduino Sparkfun Shifter (Go)

Serial Device -> Laptop (Go)
Laptop -> Serial Device (Go)

Arduino Sparkfun Shifter -> Laptop (Go)
Laptop -> Arduino Sparkfun Shift (No Go)
Kellenjb
  • 17,509
  • 5
  • 51
  • 87
  • @MattJenkins @vicatcu please check my edit to the question and see if I have understood correctly. Thanks! – Kellenjb Jul 01 '11 at 13:13
  • 1
    Do you have an oscilloscope or logic analyzer that can determine if the signals are doing what they should? – Majenko Jul 01 '11 at 14:34

2 Answers2

2

The sparkfun is a bit of a hack device that doesn't actually do proper RS-232 level shifting. Instead it uses the voltages from the other end to charge capacitors to use for the sending voltages - a clever idea, but I can forsee flaws if the other end isn't sending high enough voltages...

I would recommend ditching the sparkfun and using a MAX232 or similar device to do real level shifting.

Majenko
  • 55,955
  • 9
  • 105
  • 187
  • This very well could be the case, especially if this "serial device" isn't a full computer. – Kellenjb Jul 01 '11 at 13:12
  • 1
    but he can't even receive data from a laptop... – vicatcu Jul 01 '11 at 14:03
  • The question has to be asked - what is the laptop's RS232 like? Is it giving full \$\pm 12V\$ or TTL? Is it integrated, or a USB dongle? Have other RS232 devices been tried? – Majenko Jul 01 '11 at 14:32
  • The serial port on the laptop is a USB to serial cable (I presume there is no chance of \$\pm 12V\$ from that. And by the looks of it the actual device is not giving me \$\pm 12V\$ either. I'lll take the advice and build my own with a MAX232. (Will let you know the result – Richard Freedman Jul 01 '11 at 23:35
  • 1
    I use a USB dongle for RS232 and it struggles to give me \$\pm 7V\$... – Majenko Jul 02 '11 at 08:55
  • 1
    I took matt's advice & built my own with a max232 ic. Solved the problem. That's for the insights! –  Jul 03 '11 at 07:59
  • @RichardFreedman - Maybe you can accept Matt's answer and upvote it. – stevenvh Jul 03 '11 at 08:46
0

Make sure your wires to the Arduino are making a good electrical connections. Other than that I don't think you could really be missing anything... Have you tried slower baud rates maybe (e.g. 2400)? If it's not bad wires or connections, I'd say your SMD is indeed to blame.

vicatcu
  • 22,499
  • 13
  • 79
  • 155