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

COM1 voltage level


  • Please log in to reply
14 replies to this topic

#1 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 22 September 2012 - 03:05 PM

Hi, it seems to me the netduino mini COM1 port (pin 11-12) use 5V for TTL signals. But it should use 3.3V, right? Since I'm not that hardware-expert, would be really nice if somebody can check his netduino mini COM1 port, which voltage level is used.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 September 2012 - 03:06 PM

Hi,

it seems to me the netduino mini COM1 port (pin 11-12) use 5V for TTL signals.
But it should use 3.3V, right?

Since I'm not that hardware-expert, would be really nice if somebody can check his netduino mini COM1 port, which voltage level is used.

Netduino Mini sends 3.3V signals on this UART, but can understand incoming 5V signals as well.

Chris

#3 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 22 September 2012 - 03:14 PM

I'm looking with an oscilloscope on pin 12 and it's at 5V. Is there a pull-up resitor or something like that? A device which I want to connect to COM1 has problems with this 5V. The connected device is powered up by netduinos pin 12, even if I turned the device's on/off switch to off.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 September 2012 - 03:48 PM

I'm looking with an oscilloscope on pin 12 and it's at 5V. Is there a pull-up resitor or something like that?

A device which I want to connect to COM1 has problems with this 5V. The connected device is powered up by netduinos pin 12, even if I turned the device's on/off switch to off.

Hmm, 5V output on that pin shouldn't be possible. If you sample another pin, do they all show as 5V? There are no pullup resistors enabled on the UART.

To stop feeding power to the other module via the pin, create an OutputPort and set its state to false (off). Also the pullups are enabled during boot...if this is a concern, you'll want to use a small circuit to disable the IO until you want to enable it.

Chris

#5 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 22 September 2012 - 04:22 PM

No other module is connected to the netduino.

The deployed program is:
public static void Main()
{
    Thread.Sleep(Timeout.Infinite);
}

Voltage samples:

Pin 1: -6V
Pin 2: -6V
Pin 3: -6V
Pin 5: 3.3V
Pin 6: 3.3V
Pin 7: 3.3V
Pin 8: 3.3V
Pin 9: 1.7V
Pin 10: 1.7V
Pin 11: 3.3V
Pin 12: 5V

Pin 12: 3.3V
Pin 13: 3.3V
Pin 14: 3.3V
Pin 15: 3.3V
Pin 16: 3.3V
Pin 17: 3.3V
Pin 18: 3.3V
Pin 19: 3.3V
Pin 20: 3.3V
Pin 21: 5V
Pin 22: 3.3V
Pin 24: 4.5V

#6 cys

cys

    Advanced Member

  • Members
  • PipPipPip
  • 113 posts
  • LocationSoCal

Posted 22 September 2012 - 08:26 PM



Since I'm not that hardware-expert, would be really nice if somebody can check his netduino mini COM1 port, which voltage level is used.


pins 11 and 12 on my mini both output 3.3V

#7 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 22 September 2012 - 09:16 PM

pins 11 and 12 on my mini both output 3.3V

Thanks for checking.

Really strange: I have two netduino minis, both have 5V on pin 12.

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 September 2012 - 09:20 PM

Hi awaiK,

Really strange: I have two netduino minis, both have 5V on pin 12.

That is really strange. It shouldn't be possible. Can you take a photo of your Mini attached to the multimeter/oscilloscope?

Also just to confirm--you can turn pin 12 on and off via OutputPort, correct?

Chris

#9 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 23 September 2012 - 08:12 AM

[...] Can you take a photo of your Mini attached to the multimeter/oscilloscope?

I took a photo using a multimeter

Also just to confirm--you can turn pin 12 on and off via OutputPort, correct?

I realized I can't switch any GPIO on nor off.

The following code should turn pin 5 definitely off:
public static void Main()
    {
        OutputPort pin5 = new OutputPort(Cpu.Pin.GPIO_Pin5, false);
        pin5.Write(false);
        Thread.Sleep(Timeout.Infinite);
    }

Attached Files



#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 September 2012 - 08:55 AM

Hi awaiK, Since pin 12 is the UART_RX pin, the FTDI USB-TTL converter chip on that board is most likely putting a 5V signal to pin 12. Also...to turn on/off pins, use the Pins.GPIO_##### enumeration, not Cpu.Pin.GPIO_Pin5. They look similar, but Cpu.Pin refers to the pins on the microcontroller itself (rather than the pin #s on the Netduino Mini). Chris

#11 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 23 September 2012 - 05:34 PM


Also...to turn on/off pins, use the Pins.GPIO_##### enumeration, not Cpu.Pin.GPIO_Pin5. They look similar, but Cpu.Pin refers to the pins on the microcontroller itself (rather than the pin #s on the Netduino Mini).

Chris

I'm not ashamed to say that I have slipped up on this several times now. I blame Visual Studio's IntelliSense which always shows the Cpu.Pin first. Don't even get me started on the Cpu.AnalogChannel and Cpu.PWMChannel... :)

Steve

#12 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 23 September 2012 - 07:12 PM

Hi awaiK,

Since pin 12 is the UART_RX pin, the FTDI USB-TTL converter chip on that board is most likely putting a 5V signal to pin 12.

Also...to turn on/off pins, use the Pins.GPIO_##### enumeration, not Cpu.Pin.GPIO_Pin5. They look similar, but Cpu.Pin refers to the pins on the microcontroller itself (rather than the pin #s on the Netduino Mini).

Chris

Hi,

using the right enum I can toggle the pins on/off... <_<


Turning pin 12 off and on via OutputPort, the pin is at 3.3V.
Disposing the OutputPort it switchs back to 5V.

So...it is broken and I need to buy some new ones?

#13 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 23 September 2012 - 07:43 PM

So...it is broken and I need to buy some new ones?

It is not broken. You forgot to mention that you are using SK Pang Netduino Mini Dev Board (shown in the photo), so there is some external circuitry that affects the pin voltage levels. As you can see in the schematics, Netduino Mini pin #12 is connected to FT232R TXD output and this IC is powered by 5V. So disposing OutputPort switches Netduino pin back to input and you measure 5V from FT232R TXD output (as suggested by Chris above).


Turning pin 12 off and on via OutputPort, the pin is at 3.3V.

IMHO you should not be doing that - FT232R TXD is output too, so you are mixing its logic levels with Netduino's 3.3V output.

#14 awaiK

awaiK

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 23 September 2012 - 08:31 PM

Ah okay! Thanks for the clarification. I missed Chris's answer first.

#15 soshimo

soshimo

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts
  • LocationSan Diego, CA

Posted 23 September 2012 - 11:15 PM

It is not broken. You forgot to mention that you are using SK Pang Netduino Mini Dev Board (shown in the photo), so there is some external circuitry that affects the pin voltage levels. As you can see in the schematics, Netduino Mini pin #12 is connected to FT232R TXD output and this IC is powered by 5V. So disposing OutputPort switches Netduino pin back to input and you measure 5V from FT232R TXD output (as suggested by Chris above).



IMHO you should not be doing that - FT232R TXD is output too, so you are mixing its logic levels with Netduino's 3.3V output.


You beat me too it. I might add that SK Pang may want to re look at that design. According to the datasheet if you just hook to 3v3out to vccio you will drive 3.3v output levels. Hooking to vccio to vcc drives output at 5v levels. It's a simple change, and it could probably be an easy mod - cut one trace and add a jumper wire.




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.