Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Serial port communication

Serial

  • Please log in to reply
5 replies to this topic

#1 John West

John West

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 20 January 2014 - 04:30 PM

I'm trying to talk to a serial device on my N+2.  I can see traffic coming in, but when I send bytes, they just echo immediately, while seemingly not being seen by the device. I'm connecting TX, RX and ground from the device to the corresponding pins on the N+2, with TX and RX swapped, of course.

 

I did see some other talk about voltages.  I'm not sure what to make of that, but here are some measurements.  I connected a voltmeter between the device's transmit and ground and receive and ground.  Each time I got ~.5V.  Since the N+2 is using 3.3V, could it be that 3.3 is too much?  If so, how do I bring down 3.3V to .5V in the easiest possible way to test? Yep, I'm a newbie :).  Am I even on the right track?



#2 John West

John West

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 20 January 2014 - 04:51 PM

So I found this article which I think is what I need... well, unfortunately paste doesn't work with these forums and IE11.  But it's about using two resistors and connecting at the middle.  I'm trying it and I'm getting different results, which I think are closer.

 

The issue now is that I'm supposed to be receiving 90 as a polling value, but I'm seeing 41.  Gotta figure this out now... ughhh.  Why do I do this as a hobby ;)?



#3 John West

John West

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 20 January 2014 - 09:58 PM

Nothing is working.  I found an old post where someone mentioned a logic level adapter.  Anyone know what that is?  Is there a reason I can't talk to the device without it?



#4 John West

John West

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 20 January 2014 - 10:02 PM

Ok, I think I've just been non-understanding.  I see more posts that lead me to believe the problem is that I need an rs232 shield.  Time to place the order...



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 January 2014 - 10:41 PM

Hi John, It does sound like you're talking to an RS-232 device. RS-232 voltage levels are often +5V for one logic state, and -5V for the other logic state. And they can go up to +15V/-15V. To convert the +5/-5 voltages to 5V/0V or 3.3V/0V signals...you will want the RS-232 level conversion circuitry, as you surmised. Chris

#6 TechnoGuy

TechnoGuy

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts
  • LocationCanada

Posted 22 January 2014 - 06:34 PM

Hi John,

 

In replying to your post I am hoping to save you a bit of time & a few headaches.

 

Like you I am building a Netduino project which communicates with a serial device.  In my case I am connecting to an analog modem with an RS-232 serial interface.  This modem has a female connector on it and is intended to connect to the serial port on a PC (which has a male connector) using a straight-through 9-pin serial cable (male on one end, female on the other).

 

Many of the adapter devices I've investigated, which convert from TTL-level voltages to RS-232 level voltages (i.e. 3.3V/0V or 5V/0V to +12V/-12V), are built with a female DB-9 connector.  I guess most of the developers of these adapters assume that the micro controller device (i.e. Netduino or Arduino) will be connected to a PC and be controlled by the PC, rather than the micro controller device being the master and controlling something else.

 

Anyway, I have found that SparkFun Electronics has several devices which you can use to do the conversion:

  • RS232 Shifter Board Kit (PRT-00133); has female connector (you need to get out your soldering gun to build it)
  • RS232 Shifter (PRT-08780); has no connector - you can buy one separately & solder it on
  • RS232 Shifter (PRT-00449); has female connector
  • MAX3232 Breakout (BOB-11189); no connector
  • RS232 Shield (DEV-11958); has female connector

 

I also found an RS232 / TTL converter on eBay which has a MALE connector on it:

 

http://www.ebay.ca/i...984.m1497.l2649

 

I ordered the eBay item and received it about 2 weeks after placing the order.  I haven't yet incorporated it into my project but will let you know, if you're interested, when I do.


- Ian

 

My Current Dev Boards:

  • 3 x Netduino Plus 2
  • 1 x Netduino 3 WiFi





Also tagged with one or more of these keywords: Serial

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.