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.

bill.french's Content

There have been 260 items by bill.french (Search limited from 09-May 23)


By content type

See this member's


Sort by                Order  

#7698 NetDuino Quadrocopter

Posted by bill.french on 15 January 2011 - 03:17 AM in Netduino 2 (and Netduino 1)

I think 'dones' was just teasing. [For reference, I apparently look about 3-5 years younger than my age as well. On my first driver license, I looked like I was in elementary school still. :)]

Chris


Whoa, after meeting you at Maker Faire, I never would have guessed you were in your 50s!



#7645 NetDuino Quadrocopter

Posted by bill.french on 14 January 2011 - 02:04 PM in Netduino 2 (and Netduino 1)

Is this evidence of the "issue" - or is it just a precision issue with the Saleae Logic Probe? Notice the highlighted gaps, which are regularly repeating.

I used this code:
namespace TightLoopTest1
{
    public class Program
    {
        public static void Main()
        {
            OutputPort d2 = new OutputPort(Pins.GPIO_PIN_D2, false);
            bool status = false;
            while (true)
            {
                status = !status;
                d2.Write(status);
            }


        }

    }
}

and got this @ 24Mhz:
Posted Image



#8599 Quad.Net Quadrocopter for .NETMF

Posted by bill.french on 28 January 2011 - 04:22 AM in Project Showcase

Great community we have here.


Is it kind of a weird collision between an incredibly sophisticated language (C#) and development environment (VS), used to build some of the most sophisticated, multi-national, billion-dollar systems in the world, and all the baggage that comes with that sort of thing...

... and trying to get a toy helicopter to fly!

PLEASE PLEASE PLEASE keep going! Make it fly!



#6981 LCD Help needed, 16x2s are boring

Posted by bill.french on 04 January 2011 - 01:20 PM in Netduino 2 (and Netduino 1)

so I went out an bought an Arduino UNO.


Wait, did you literally go out somewhere and buy an Arduino? Like, to a bricks and mortar store? Where are these stores???

Besides that, thank you for your work on this. I was just about set on this screen: http://www.sparkfun.com/products/10090

...which I might still get, but now having a <$10 option is fantastic.



#7146 LCD Help needed, 16x2s are boring

Posted by bill.french on 06 January 2011 - 02:44 PM in Netduino 2 (and Netduino 1)

I might have to get one now that you've done all the hard work :)

LOL I ordered mine yesterday! B)



#4703 Basic Analog Input Circuit and Program

Posted by bill.french on 09 November 2010 - 01:41 AM in General Discussion

This post covers:
  • a very basic circuit using a potentiometer
  • a program for reading an analog input port

First, the circuit. You'll want to read about voltage dividers to really understand what is happening. The potentiometer acts as one of the resistors in the voltage divider -- and since a potentiometer's resistance changes by turning it, it provides a good source for the analog input. If you are comfortable with Ohms Law (V=IR) the wikipedia article on voltage dividers is pretty approachable in my opinion. Something important in the circuit is the link from 3.3v to the aref pin. Aref is "analog reference" and sets the ceiling of the analog input. The max is 3.3v. I believe the revision B netduino boards have an internal tie in so that using aref is optional.

Posted Image

... and what it might look like on a breadboard:
Posted Image

... and the program:
using System.Text;
using Microsoft.SPOT;
using System.Threading;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;


namespace NDP_SocketSender1
{
    public class Program
    {
        public static void Main()
        {
       
            AnalogInput a5 = new AnalogInput(Pins.GPIO_PIN_A5);

            while (true)
            {
                string s = a5.Read().ToString();
                Debug.Print(s);
                Thread.Sleep(100);
            }
        }
    }
}

Basically, the program opens up an analog input port (a5 in this case), reads the value into a string, and prints the string to the output window in visual studio every 100ms. As you adjust the potentiometer, the values displayed in debug should change, varying from about 0 to about 1023, which are the bounds of the 10-bit ADC (analog-digital coverter) built in to the netduino.

Since I have a Netduino Plus, I have also set it up send the readings over the network and graph them in a Windows Forms Application, so I could see the results visually as I turned the potentiometer to different positions. It's important to realize that digital inputs read either 1 or 0; analog inputs have a range, and the graph from my netduino plus illustrates this:

Posted Image

If you don't have a netduino plus, you can cut and paste the data from the output window in Visual Studio into Excel or a Google spreadsheet and graph from there.

If this is interesting to you, I would encourage you to search the forums for "analog", "analoginput", and "setrange" for lots more useful information.



#4752 Basic Analog Input Circuit and Program

Posted by bill.french on 09 November 2010 - 06:31 PM in General Discussion

Sure! It's over in the netduino plus forum: http://forums.netdui...er-the-network/



#8434 Basic Analog Input Circuit and Program

Posted by bill.french on 26 January 2011 - 04:36 AM in General Discussion

How did I miss seano's question? Sorry. The units are from 0-1023, because it's a 10bit adc, and 2^10 (minus 1) is 1024. Search the forums for "setrange" for interesting info.

@vaticanuk: yes you are right, but i thought using a voltage divider circuit would be slightly more useful (in my opinion) for the example because you can replace the potentiometer with something else, like a thermistor. In your circuit the potentiometer is the voltage divider.

Either way works for a potentiometer.



#9004 Pull Up/Down Resistors, and when to use them?

Posted by bill.french on 04 February 2011 - 07:32 PM in General Discussion

I guess a basic guideline is if you need to read a 0 or 1 reliably, and your circuit has an "open" state, say the reed switch, then you'll want to use a pull up/down resistor, depending on the circumstances. The problem with an open state is that the input will be open to the environment, so any stray charges can make the input go to 0 or 1 unpredictably. In your case, knowing nothing else about your circuit, you can probably get away with a "pull up" resistor instead, which the netduinos have built in and available for activation via software. This will simplify your circuit.



#9013 Pull Up/Down Resistors, and when to use them?

Posted by bill.french on 04 February 2011 - 09:53 PM in General Discussion

Thanks Bill! Thats exactly what I needed!



What about to drive a relay? If I were to go with a pull up resistor, wouldn't I have to switch from a NPN to a PNP? I'm thinking specifically about about the circuit at http://www.arduino.c...ning/relays.pdf

Or am I just over-engineering this, and the arduino relay circuit is fine?

Thank you for your help!


Sorry, not following you - I don't see where a pull up or pull down resistor would come into play. You do need a resistor to the base of the transistor, but that is not a "pull" in either direction. You *might* want to use a pull down to overcome the momentary pull up resistor during boot up.



#8633 FreeRTOS

Posted by bill.french on 28 January 2011 - 07:56 PM in Netduino Plus 2 (and Netduino Plus 1)

Quick aside...should we make a "FreeRTOS and C/C++ programming" forum?

I thought something like what the original post said would be clever: "Netduino without a .Net"



#8922 Steps to restore an Erased Netduino

Posted by bill.french on 03 February 2011 - 01:21 AM in Netduino 2 (and Netduino 1)


3. (**WARNING.. no turning back after this point.) Using a jumper, Connect the 3V3 power header to the ERASE pin (gold pad directly underneath digital pin 0) for about 2-3 seconds. After doing this, disconnect the Netduino from your PC.

...

5. Run SAM-BA. Select the COM port that your device is connected to. In my case this was COM4. Select AT91SAM7X512-ex from the dropdown.

In case it's helpful:

for step 3, here's a pic of the erase pad on my netduino plus:
Posted Image
and for step 5, did not have AT91SAM7X512-ex, but a -ek, so I picked that and it seemed to work fine.



#3470 Pointless fun: Morse Code Interpreter

Posted by bill.french on 04 October 2010 - 04:29 PM in Project Showcase

if you've never seen this video, it's mildly entertaining -- Morse Code vs. Text Messaging:



#7305 Reading temperature from DS18B20 using OneWire

Posted by bill.french on 09 January 2011 - 02:35 AM in Netduino 2 (and Netduino 1)

Are you aware I'm using the PHAnderson OneWire controller? The DS18B20 gets hooked to the controller (as per the instructions included with the controller); the controller gets hooked to the Netduino's uart. This thread has my sous vide circuit: http://forums.netdui...rst-shield-pcb/



#5962 Reading temperature from DS18B20 using OneWire

Posted by bill.french on 10 December 2010 - 03:14 AM in Netduino 2 (and Netduino 1)

Using Peter H. Anderson's awesome RS232 - OneWire Controller I have managed to successfully read temperature using the Dallas DS18B20 one wire temperature sensor.

The DS18B20 is really awesome, seems very accurate and very responsive. Considering my struggles getting reliable readings from a thermistor, I am finally :) .

Here is my temperature reading code, and attached is a class I wrote to interface with the OneWire controller, in case someone finds it useful.
using System;
using System.IO.Ports;
using System.Text;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using PHAOneWire;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace SerialTest1
{
    public class Program
    {
        public static void Main()
        {
      
            int Tc, Tf;

            using (OneWire ow = new OneWire())
            {
                while (true)
                {

                    ow.Write("P0W0ccS044");
                    Thread.Sleep(1000);  // need to wait for conversion
                    ow.Write("P0W0ccW0be");
                    
                    byte low = ow.ReadByte();
                    byte high = ow.ReadByte();

                    // it's dealing with temps as integers, for instance, 23.5F comes back 235000
                    // since it's 12bits of precision, the smallest difference in temp is .0625
                    
                    Tc = ((high * 256 + low) * 10000) / 16;
                    Tf = ((Tc * 18) / 10) + 320000;

                    Debug.Print(Tf.ToString() + " - " + Tc.ToString());
                    
                    Thread.Sleep(10);
                }
            }
        }
    }
}

Attached Files




#6665 RFID Reader Opinions

Posted by bill.french on 29 December 2010 - 08:04 PM in General Discussion

What kind of distance are you looking for? I've worked with some rfid stuff a bit, but none of this stuff. These look interesting in the sense that they have a simple looking antennae that might be easy to modify: http://www.seeedstud...rd=rfid&x=0&y=0



#3560 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 02:16 AM in General Discussion

Trimpot is a good idea, I will try it. I first tested the analog inputs using one, but was not looking for stability, just movement up and down. I just packed up for the night so it will have to wait until tomorrow. I've tried a variety of consumer wall wart 12v power supplies, an 11.1V li-po that was running at about 11.9v, and the last thing I tried before I packed up was a duracell 9V, with the same results.



#3558 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 12:56 AM in General Discussion

I'm seeing fluctuations +/- 4 'steps' if that is a sensible way to describe it. For example: if the reading should be "610" out of 1024, it is varying from 606 - 614, rapidly. On one of my computers, using only usb power, it fluctuates 1 step, which is fine - but not how I need to use the board. I'm not concerned about the accuracy, but "repeatability" is important. At first I thought it was a noisy power supply, but using a battery (with or without usb) has the same results. If for some reason it might be relevant, I do not have anything plugged into the network jack.



#3556 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 12:21 AM in General Discussion

Hello! I am trying to read a thermistor based temperature probe, but the analog input fluctuates too wildly to be useful for my application. I am using a netduino plus that I obtained from maker faire, in case that is somehow relevant.

Any suggestions?

Some notes:
1. I have vref tied to the 3.3v pin
2. I am using a 47k resistor in my voltage divider, with one end to 3.3v, one to ground, and the analog input in the middle
3. The circuit runs are as short as physically possible, with the longest wire (besides the thermistor probe's actual cable) no longer than the distance between 3.3v and vref.
4. Using an external power supply makes the problem much worse - with our without usb hooked up
5. I've tried several external power supplies including rechargeable batteries
6. I've tried also tying all the other analog inputs to ground just in case

I vaguely remember reading somewhere to do something to an analog input pin before using it as an input, but I cannot find that post and think it might be for some other microcontroller. Using a multimeter, the voltage seems much more stable than the analog input would suggest.

Any ideas would be appreciated! Thanks, --Bill



#3589 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 11:18 PM in General Discussion

I have tried a trimpot with the same results. Reading is acceptably stable using usb on my Sony computer. Using an external power supply (a battery), with or without usb, the readings are all over the place. I have tried both A0 and A5. Setrange won't work as i need as much precision as I can get. Power supply can't matter as it glitches when using a different batteries. Any more thoughts? Thanks!



#3601 Analog input fluctuations

Posted by bill.french on 07 October 2010 - 02:52 AM in General Discussion

Man were you wrong! I'm not in Colorado, near a ski slope, OR skilled! Can't even get a thermistor circuit to work.



#3898 Analog input fluctuations

Posted by bill.french on 14 October 2010 - 05:37 PM in General Discussion

Is this applicable to the Netduino? (From the Arduino playground linked above)

For any unused ADC input pins, it's best to set their pullup resistors so they don't mess with
the others (pinMode(myPin, INPUT); digitalWrite(myPin, HIGH)).




#3864 Analog input fluctuations

Posted by bill.french on 14 October 2010 - 02:08 AM in General Discussion

Well, I've made some progress on my analog input fluctuations.

I borrowed a Rigol DS1052E -- the screen capture is below. I'm still trying to figure the scope out, I've never used a digital one before.

Anyway, is seems only on external power, there's fairly regular pulses of noise on the 3.3V line, regardless if the source is a battery or my 12v regulated supply.

I built the noise reducing circuit in this article, using an inductor and a bunch of caps:

http://www.arduino.c...Lib/Thermistor4

That is the blue line in the picture... so I've at least filtered it out, now, but my readings of the thermistor are certainly slowed.

Any ideas where the pulses are coming from and how to eliminate them, besides the inductor, etc?

Thanks!
Posted Image



#3619 Analog input fluctuations

Posted by bill.french on 07 October 2010 - 01:25 PM in General Discussion

No scope (it got stolen years ago... very sad day for me) but certainly a multimeter. The measurements I remember for 3.3V were 3.29V and when using the lipo battery, 11.9V on Vin. My multimeter is pretty cheap, but the readings were always steady. I might be able to borrow a scope tonight to take a deeper look. edited to add: using a usb power brick is another great idea!



#3593 Analog input fluctuations

Posted by bill.french on 07 October 2010 - 12:24 AM in General Discussion

Nope! I'm in central NJ. No ski resorts close by that I'm aware of. I'll have to update my profile, there are a couple Bill Frenches out there, some more famous than others. The most famous alive that I'm aware of created Laplink. I'm not that guy, either!




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.