2
\$\begingroup\$

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)
\$\endgroup\$
  • \$\begingroup\$ @MattJenkins @vicatcu please check my edit to the question and see if I have understood correctly. Thanks! \$\endgroup\$ – Kellenjb Jul 1 '11 at 13:13
  • 1
    \$\begingroup\$ Do you have an oscilloscope or logic analyzer that can determine if the signals are doing what they should? \$\endgroup\$ – Majenko Jul 1 '11 at 14:34
2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ This very well could be the case, especially if this "serial device" isn't a full computer. \$\endgroup\$ – Kellenjb Jul 1 '11 at 13:12
  • 1
    \$\begingroup\$ but he can't even receive data from a laptop... \$\endgroup\$ – vicatcu Jul 1 '11 at 14:03
  • \$\begingroup\$ 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? \$\endgroup\$ – Majenko Jul 1 '11 at 14:32
  • 1
    \$\begingroup\$ I use a USB dongle for RS232 and it struggles to give me \$\pm 7V\$... \$\endgroup\$ – Majenko Jul 2 '11 at 8:55
  • 1
    \$\begingroup\$ I took matt's advice & built my own with a max232 ic. Solved the problem. That's for the insights! \$\endgroup\$ – user4882 Jul 3 '11 at 7:59
0
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ I'm using the male pin headers that you'd use to plug a shield over the top of the arduino. Yep I did try slower baud rates too - Same result. \$\endgroup\$ – Richard Freedman Jul 1 '11 at 5:12
  • \$\begingroup\$ (Continuity tested ok all the way down the line from the rs232 Green LED to Arduino) \$\endgroup\$ – Richard Freedman Jul 1 '11 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.