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

Digital Pins Never Off.


  • Please log in to reply
7 replies to this topic

#1 ddoodm

ddoodm

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationSydney, Australia.

Posted 21 August 2010 - 07:15 AM

Hey again everyone!

I've been trying to rebuild a few of my Arduino projects with the Netduino. However, I'm having problems with my digital I/O pins. Whenever I set any output pin to false (off), it doesn't disable the pin, but it seems to limit the output voltage of the pin to around 1.65v. I'm currently trying to control a DFRobot relay module which works perfectly with the Arduino, but when I try it with the Netduino, the indicator LED on the relay module just dims (doesn't go off) and I only hear a slight flicking noise from the relay when the LED dims (but it doesn't actually do anything). Here's my code (just sample code from the beginner video):

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace NetduinoApplication1
{
    public class Program
    {
        public static void Main()
        {
            OutputPort Relay = new OutputPort(Pins.GPIO_PIN_D9, false);

            while (true)
            {
                LED.Write(true);
                Thread.Sleep(500);
                LED.Write(false);
                Thread.Sleep(500);
            }
        }

    }
}

PS: The same kind of thing happens when I use my Ping Ultrasonic sensor. However, the light stays on, and doesn't do anything.

Thanks for any help! I'd really appreciate it. :)

#2 Flores

Flores

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 21 August 2010 - 08:54 AM

Are you using an external power supply? If so, are you sure all the gounds are connected?

#3 ddoodm

ddoodm

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationSydney, Australia.

Posted 21 August 2010 - 10:02 AM

Are you using an external power supply? If so, are you sure all the gounds are connected?


I've tried it with both an external 12v supply, and just the USB cable. Neither work. I can upload a picture if you'd like.

#4 Flores

Flores

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 21 August 2010 - 10:06 AM

Have you tested it just with a volt meter with nothing connected? This behaviour could be caused by other connected components.

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 August 2010 - 12:17 PM

A picture could be very helpful. Also, testing with a voltmeter/multimeter using just the Netduino (as Flores just suggested) would narrow down the issue. 5V - 3.3V = 1.7V. 1.7V is roughly 1.65V. Curious. Chris

#6 ddoodm

ddoodm

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationSydney, Australia.

Posted 21 August 2010 - 12:35 PM

Have you tested it just with a volt meter with nothing connected?

Thanks for the suggestion, but other components don't seem to be the problem.

I isolated the Netduino from everything and tested it with a volt meter. Everything looks perfect. Identical to the Arduino (Apart from the Arduino giving out 4.97v, while the Netduino only gave 3.3v). However, when I tried my relay module on both the Arduino and Netduino (both isolated from everything), it worked 100% on the Arduino, but still not the Netduino. This ain't making sense at all... I have to wait 'til the morning to get some LEDs. I can't seem to find one anywhere.

A picture could be very helpful.

I think I'll record a video when I pick up that LED tomorrow. Not exactly sure what to take a photo of now I think about it. :D

Thanks again for the help! Really appreciate it.

#7 Flores

Flores

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 21 August 2010 - 01:03 PM

Are you sure that your relay module is suited for the netduino with regards of the current that can/will be drawn?

#8 ddoodm

ddoodm

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationSydney, Australia.

Posted 22 August 2010 - 06:43 AM

I did a few tests today. For some reason the relay works if I power it with 3.3v instead of 5v. So it's all good now. Thanks for the help guys!




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.