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

UART - Common ground


  • Please log in to reply
6 replies to this topic

#1 pa-1000

pa-1000

    New Member

  • Members
  • Pip
  • 4 posts

Posted 21 January 2012 - 04:47 PM

I would like to communicate with a foreign device that is powered by a different power supply. The device is only sending data. The foreign device has 3 PINs (GND, TX, 5V). I think that I have to connect: 1. the GND foreign device to the GND of my netduino. So that they have a common ground. and 2. the TX foreign device to a Serial RX Pin from my netduino like PIN D2 for COM2. Is this correct? And is there a chance that something got damage? I use a 1k Ohm resistor in series with the TX -> RX cable. Is this necessary in case that the foreign microcontroller has 5V TTL Level? cheers

#2 Geancarlo

Geancarlo

    Member

  • Members
  • PipPip
  • 24 posts

Posted 21 January 2012 - 11:03 PM

As long as the device uses TTL levels(~0 and ~5V) you are fine since the uart pins on the netduino are 5V tolerant and that resistor is not required

#3 Nico

Nico

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationBuenos Aires - Argentina

Posted 09 August 2012 - 03:28 AM

As long as the device uses TTL levels(~0 and ~5V) you are fine since the uart pins on the netduino are 5V tolerant and that resistor is not required

Sorry for refloating this thread... I've a similar (but inverse) case.
I need to send TX commands from my N+ to a device's RX that only supports TTL input at 5v. Having in mind that N+ only delivers 3.3v on TX, will I need to boost TX voltage up to 5v? How?
Here's the device's specs: Pololu Maestro Servo Controller.

The RX line is used to receive non-inverted TTL (0–5 V) serial bytes, such as those from microcontroller UARTs. These bytes can either be serial commands for the Maestro, arbitrary bytes to send back to the computer via the USB connection, or both. For more information about the Maestro’s serial interface, see Section 5.a. Note that the Maestro will probably be able to receive 3.3V TTL serial bytes, but it is not guaranteed to read 3.3V as high on the RX pin, so you should boost 3.3V TTL serial signals to above 4V if you want to ensure reliable operation.


I'll really appreciate your thoughts about this.
Thanks!!!
"Just by looking how time goes by through patient eyes, will make no sense. Go ahead and do it..."
"Ver como el tiempo pasa a través de tus pacientes ojos no tiene sentido. Ve y hazlo..."

#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 09 August 2012 - 05:52 AM

Hello Nico. The better way is using any HCMOS non-inverting gate, such as an AND (e.g. 74HC08), an OR (e.g. 74HC32), or anything similar that won't invert the logic, but only level the voltages. Of course this chip should be powered at +5V. If you want a "quick-and-dirty" way, but not realiable as the above one, you can use a diode and a resistor. Just catch any common diode (1N4148, 1N4007, 1N4004, etc), and place it in series to the data line. The striped side must be toward the Netduino output. Then connect the resistor (10k should be fine), from the Pololu input (shared with the un-striped lead of the diode) to the +5V. This should work pretty decently, although it's a MacGyver-way to solve this problem. Cheers
Biggest fault of Netduino? It runs by electricity.

#5 Nico

Nico

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationBuenos Aires - Argentina

Posted 09 August 2012 - 11:34 AM

Hi Mario,
The MacGyver-way sounds pretty good to me at least for starting point.
I also did my research and I've found a Logic Level Converter in SparkFun that seems to meet my needs.

Thank you very much for your prompt reply!

Nico.
"Just by looking how time goes by through patient eyes, will make no sense. Go ahead and do it..."
"Ver como el tiempo pasa a través de tus pacientes ojos no tiene sentido. Ve y hazlo..."

#6 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 09 August 2012 - 12:38 PM

Hmm...the Sparkfun shield is pretty equivalent to the MacGyver circuit: they use a MOSFET instead of a diode, but is not better than the first one. It is not better because they both work as "wired-AND" logic, that is using a pull-up resistor for generating the high level. This does work, but has also several limitations, in terms of maximum speed, noise immunity, and cable length. That shield is perfect (I'd also say "mandatory") for the I2C bus, whereas the chips are powered differently. Instead, by using a gate, you'll have a completely different behavior for the high level. The gate offers a push-pull output stage, which allows: - much more current (outgoing the gate); - the impedance of the low and the high level are almost identical, so you can use a much longer cable without pains. I mean that it's easier to have a ready-to-shield, but -please- consider pros/cons in advance. Cheers
Biggest fault of Netduino? It runs by electricity.

#7 Nico

Nico

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationBuenos Aires - Argentina

Posted 10 August 2012 - 12:07 PM

Many thanks for the advice! Honestly, electronics is not my strength so I think I'll need to read everything slowly and twice. :)
"Just by looking how time goes by through patient eyes, will make no sense. Go ahead and do it..."
"Ver como el tiempo pasa a través de tus pacientes ojos no tiene sentido. Ve y hazlo..."




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.