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 29-June 23)


By content type

See this member's


Sort by                Order  

#6596 Quick & Simple Shift-register Example

Posted by bill.french on 28 December 2010 - 01:56 AM in General Discussion

Also: I think your diagram needs a ground connection on pin 8.



#6595 Quick & Simple Shift-register Example

Posted by bill.french on 28 December 2010 - 01:52 AM in General Discussion

Thanks, Omar, I was just getting ready to try out my shift registers.



#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/



#3291 Can't connect via Visual Studio or MFDeploy, erase does not fix

Posted by bill.french on 30 September 2010 - 05:25 PM in Netduino Plus 2 (and Netduino Plus 1)

Any progress recreating (and fixing) the original issue?



#6544 Analog input varying too much on temp sensor (LM335A)

Posted by bill.french on 26 December 2010 - 10:21 PM in General Discussion

If it's worth anything, after doing everything under the sun i could think of (caps, resistors, chokes, inductors) to quiet the power supply, the aref, the supply to the thermistor, and showed it to gray beard ( :lol: ) who teaches microcontroller programming at Rutgers, using an oscilloscope, he was surprised at how quiet i got the power, but we still could not eliminate the fluctuations. Even with just a simple voltage divider -- no thermistor involved. The voltage was solid on the oscilloscope, but the analog readings were wild by as many as 4 bits, occasionally more -- even after averaging 100 readings. Mine was *way* worse using an external power supply -- even a battery.



#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.



#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.



#6432 Analog input varying too much on temp sensor (LM335A)

Posted by bill.french on 23 December 2010 - 02:15 PM in General Discussion

I had similar issues dealing with a thermistor:

http://forums.netdui...ch__1#entry3556

I even went so far as to get an external ADC (MCP3204) and still couldn't get it to work well. I came to the conclusion that something about the netduino is too noisy, or analog circuits are too hard.

That's when I switched to the DS18B20 digital temp sensor.



#8126 Quick and dirty GPIO speed test - findings

Posted by bill.french on 23 January 2011 - 12:23 AM in General Discussion

Let me start off by saying that I think the netduino and the netmf is wonderful. *BUT* this is something you need to know coming into this, if you've ever done anything with lower level micro controllers. Folks "new to the sport" probably won't run up against this for a while.

There was a bit of discussion on this in an earlier thread:
http://forums.netdui...ch__1#entry6380

... also interesting, in the quadrocopter discussion, I had checked out the timings using my saleae logic and you can see what is apparently the scheduler getting involved:
http://forums.netdui...ndpost__p__7645

I did some new measurements with my saleae so i could zoom in and provide a different perspective of what you're talking about:
using this code: (this was so I could get the timings of the on/offs as equal as possible)
while(true)
{
b = !b;
d0.write(B);
}
I got this:
Posted Image
and using this code: (which is faster)
while(true)
{
d0.write(true);
d0.write(false);
}

I got this:
Posted Image

There is lots of interesting things to think about, I think.
1. It's interesting to me how much slower the first example is
2. We might want to keep track of these types of timings to have a handle on if firmware changes impact the timings at all
3. I wish I could mail Corey my saleae to get the timings under his fluet interopt... which is awesome. (Or, alternatively, I with I was brave enough to try it myself!)
http://www.youtube.com/watch?v=9EcEUbtgO2I
4. I wonder what the impact of things like GC and the scheduler are

#2 sounds like the start of development of a test suite for the netduino, where we can independently test the netduino during firmware upgrades. I might consider taking on this project myself. (Once I learn what a test suite is)



#8210 Quick and dirty GPIO speed test - findings

Posted by bill.french on 23 January 2011 - 09:07 PM in General Discussion

Really? Why?

I imagine in real life you have a very strong personality. It comes across in your posts. Instead of hopes and wishes, you have expectations and demands. This has served you very well in life! I'd like to know and understand where in your life this comes from, as I try and find my own path in the world, as I'm sure besides helping you advance through life, it's even helped others around you achieve, if not in admiration of you, than out of fear of disappointing you. I bet you are a good leader. Some people might "get" you, and others might think you come across as a bit of a jerk sometimes, but both will work hard for you.

So, I get ruffled when I think you might be acting like a jerk to Chris and the state of the union here. But this is just me being oversensitive and trying to learn about life and technology. And Chris is his own successful person, with an awesome product, quoted in magazines, etc. and can fend for himself!

:)

I'd like to check out this: http://www.sump.org/...nalyzer/client/
or this: http://www.lxtreme.nl/ols/
using this: http://dangerousprot...-logic-sniffer/ -- which i just noticed is doing exactly what I was doing with decoding IR in this pic:
Posted Image



#8174 Quick and dirty GPIO speed test - findings

Posted by bill.french on 23 January 2011 - 03:37 PM in General Discussion

Don't get me wrong, I love the .Net Micro Framework :)

...but not the Netduino, Secret Labs, or Chris Walker??? :lol:
Your posts ruffle my feathers! I'm still reeling from the basic comment on loading assemblies.
But, you're obviously brilliant and successful, so, I am still a Fabien Fan. I wish I was at least better looking, but we kind of look like we could be brothers. :o

PS: Bill, how do you like your Saleae analyzer so far?

I like it, it's very "sexy" in a mac sort of way, and works in 7 and OSX.
..but, if feels very basic, feature wise. I've never used a logic analyzer before, so I'm not sure what I'm expecting. I was trying to "reverse engineer" an IR signal with it, and while it was useful, there was no way to compare two "bit trains" side-by-side from different samples, so I was cutting and pasting screen shots into paint.net. I have no idea if any logic analyzer has that sort of functionality. The software essentially has no menus, so I found myself hungry to do simple things like split the screen in two vertically.



#4381 HXT 900 Servo

Posted by bill.french on 31 October 2010 - 12:29 AM in Netduino 2 (and Netduino 1)

www.hobbycity.com has lots and lots of servos at very low prices.



#4590 External buttons problem

Posted by bill.french on 07 November 2010 - 05:43 PM in General Discussion

can you post your complete source code?



#7243 Doing a PIC's Job

Posted by bill.french on 07 January 2011 - 09:01 PM in General Discussion

ah, sorry, I thought since you could use a 3.3v FTDI cable, you could power it with that. Apparently not!! My mini arrives today, i have 1 hard lesson out of the way!



#8012 Doing a PIC's Job

Posted by bill.french on 20 January 2011 - 07:00 PM in General Discussion

So, I've been looking over battery charger ICs and I found one that I really like, the trouble is that it's a "thermally-enhanced TSSOP" package which has a pad that needs to get soldered to the circuit board. It also looks very surface-mount and I don't have anything to deal with that. Is there any way to utilize this IC or should I look for something that's easier to use?

other than the thermal pad, you could hand solder this, i think.

Or use this: http://www.proto-adv...ucts_id=2210234

It has videos and everything!



#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



#7211 Doing a PIC's Job

Posted by bill.french on 07 January 2011 - 02:13 PM in General Discussion

Batteries are often rated on their discharge/charge capabilities as multiples of "C". So, for instance, a 2000mah battery might have a discharge rating of 20C and a charge rating of .5C, which means you can discharge it at 40 amps (2000ma * 20) and charge it at 1 amp. Generally higher C batteries are higher quality and more expensive. If you don't mind me asking, what are you doing with this and why no LiPo?



#6910 Doing a PIC's Job

Posted by bill.french on 03 January 2011 - 01:27 PM in General Discussion

One thing to consider is the 20 cell aspect; 20 x 1.2v = 24v, so you'd have to boost your 12v to *at least* 24 volts, probably significantly more. This charger costs $17 and charges up to 15 MiMH cells: http://www.hobbyking...idProduct=11668 This one does up to 27 cells and costs $37: http://www.hobbyking...idProduct=12104 The $17 one is so cheap you could buy it and scavenge things like the display and voltage booster from it and come out ahead of the game.



#5403 Anyone have a Windows Phone already?

Posted by bill.french on 27 November 2010 - 02:09 PM in General Discussion

Well, I think it's a great idea. I probably won't get a windows phone any time soon, simply because i'm still mad at how terrible pocket IE was all the way up through window mobile 6.5 ... I mean, it's like they were intentionally being cruel to the users -- but if I saw something cool going on with visual studio, c#, and a netduino plus, i could be swayed. I mean, my droid is nearly a year old now, if you can imagine someone keeping a phone for so long!



#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



#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!



#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.



#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.



#6927 Doing a PIC's Job

Posted by bill.french on 03 January 2011 - 08:25 PM in General Discussion

Sorry, that's a typo, I meant 1-10 cells.

LOL, well, that does make a difference. Even with 10 cells, though, they might peak as high as 1.5v/cell (or more depending on what you're dealing with), so that's still 15v.




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.