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

Logic Level Converter questions


  • Please log in to reply
6 replies to this topic

#1 iukpo

iukpo

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 21 February 2012 - 07:56 AM

Hello everyone! Since my post last October, I've moved on to a new LED strip to use with my Netduino Mini. I connected everything up, and the strip does not respond to any of the data coming out of the SPI MOSI and SPI CLK ports. I've read that the voltage must be 5V (3.3V is apparently too low), so I've put in a logic level converter into the equation. Specifically, this one.

The markings seem obvious, but I've had trouble with this thing in the past: it did not do anything last time when I was using it to step up the voltage for my first strip. I want to use this to step up the output voltage from the SPI Pins. Here are my questions:

1) For the input voltages to the converter, I must provide a 3.3V and 5V input? Seems obvious, but I want to make sure.
2) Are the GNDs for input voltage meant to be connected to another ground? I'm running out of ground sockets on my breadboard: I'm presuming these are simply ground for the input voltage.
3) Since I am stepping up, do I connect the pins from the Netduino as TX on the low voltage side, then connect the RX pins to the strip? Or is TX-TX?

Thanks!

#2 iukpo

iukpo

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 21 February 2012 - 08:12 AM

It appears I found the answers to my original question... http://electronics.t...compass-module/ However, I have a new question! Where on the Netduino Mini can I draw the 3.3V I need to power the low voltage side of this converter? I was thinking about using an output pin that is pulled high (always transmitting), but I am not sure if that is a good approach...

#3 Geancarlo

Geancarlo

    Member

  • Members
  • PipPip
  • 24 posts

Posted 21 February 2012 - 05:40 PM

You can solder a wire to one of the output pins of the MC33269D-3.3G voltage regulator.

#4 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 22 February 2012 - 11:34 AM

I was thinking about using an output pin that is pulled high (always transmitting), but I am not sure if that is a good approach...

This will work as long as you don't draw more than 8mA from the pin.

What I think Geancarlo meant was to solder a tiny wire directly onto the onboard 3.3V regulator of the mini:
Posted Image

That would require some really skillfull soldering and a very steady hand :-)

#5 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 22 February 2012 - 12:08 PM

What I think Geancarlo meant was to solder a tiny wire directly onto the onboard 3.3V regulator of the mini:

The 3.3V is available directly on the regulator output pins (2, 3, 6, 7).

#6 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 25 February 2012 - 05:51 PM

Hi iukpo,

I think you can get the 3.3V using a potential divider connected to the 5V supply you already have. This will save any risky soldering on your Netduino Mini.

Calculating the values:
Looking at the schematic of the converter, the converter has two resistors R3 and R6 that draw current from the LV supply line to the TX_LV input lines. Each resistor is 10,000ohms, hence when a Netduino input signal connected to TX_LV is low, about 0.3mA will be drawn from the LV supply input. When both inputs are low, about 0.6mA will be drawn.

So we need to supply 3.3V at 0.6mA.

A rule of thumb is to make the current that flows through a potential divider about ten times greater than the current that will be drawn from it. This is so that the voltage at the mid point of the divider will not change much as the logic level converter switches on and off.

Hence we want about 6mA to flow in the potential divider from 5V to ground.
  • R = V / I = 5 / 0.006 = 833ohms
e.g. R1 + R2 = approximately 833ohms

To work out the ratio of the resistors,
  • R1 = (3.3 / 5) * 833 = approximately 550 ohms
  • R2 = 833 - 550 = approximately 283 ohms
R1 = 550ohms, R2 = 283ohms.

Resistors don't come in every possible value, so choosing preferred values:
If we set R1 = 270 ohms, and R2 = 560 ohms, this gives
  • R1 + R2 = 830 (pretty close)
  • V = (5 * R1) / (R1 + R2) = (5 * 560) / (830) = 3.37V (good enough).
R1 = 560ohms, R2 = 270ohms.

So in summary connect a 270ohm resistor between the HV and LV supplies of the converter, and a 560ohm resistor between the LV supply and ground. This will give approximately 3.3V on LV and save you soldering to the Netduino mini itself.

Hope this helps - Paul

#7 iukpo

iukpo

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 28 February 2012 - 06:03 PM

Thanks everyone (esp. you Paul!) for your help on the matter. I appreciate it! It turns out that voltage was not really an issue: I was using an incorrect input. Since then, all is working fine: I did not have to do a voltage step up, but I will keep this thread in mind for the future. :)




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.