- Netduino Forums
- → bill.french's Content
bill.french's Content
There have been 260 items by bill.french (Search limited from 29-June 23)
#6596 Quick & Simple Shift-register Example
Posted by bill.french on 28 December 2010 - 01:56 AM in General Discussion
#6595 Quick & Simple Shift-register Example
Posted by bill.french on 28 December 2010 - 01:52 AM in General Discussion
#4752 Basic Analog Input Circuit and Program
Posted by bill.french on 09 November 2010 - 06:31 PM in General Discussion
#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)
#6544 Analog input varying too much on temp sensor (LM335A)
Posted by bill.french on 26 December 2010 - 10:21 PM in General Discussion
#4703 Basic Analog Input Circuit and Program
Posted by bill.french on 09 November 2010 - 01:41 AM in General Discussion
- 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.
... and what it might look like on a breadboard:
... 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:
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
@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
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
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:
and using this code: (which is faster)
while(true) { d0.write(true); d0.write(false); }
I got this:
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
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.Really? Why?
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:
#8174 Quick and dirty GPIO speed test - findings
Posted by bill.french on 23 January 2011 - 03:37 PM in General Discussion
...but not the Netduino, Secret Labs, or Chris Walker???Don't get me wrong, I love the .Net Micro Framework
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.
I like it, it's very "sexy" in a mac sort of way, and works in 7 and OSX.PS: Bill, how do you like your Saleae analyzer so far?
..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)
#4590 External buttons problem
Posted by bill.french on 07 November 2010 - 05:43 PM in General Discussion
#7243 Doing a PIC's Job
Posted by bill.french on 07 January 2011 - 09:01 PM in General Discussion
#8012 Doing a PIC's Job
Posted by bill.french on 20 January 2011 - 07:00 PM in General Discussion
other than the thermal pad, you could hand solder this, i think.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?
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
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
#6910 Doing a PIC's Job
Posted by bill.french on 03 January 2011 - 01:27 PM in General Discussion
#5403 Anyone have a Windows Phone already?
Posted by bill.french on 27 November 2010 - 02:09 PM in General Discussion
#3898 Analog input fluctuations
Posted by bill.french on 14 October 2010 - 05:37 PM in General Discussion
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
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!
#3589 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 11:18 PM in General Discussion
#3558 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 12:56 AM in General Discussion
#3560 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 02:16 AM in General Discussion
#6927 Doing a PIC's Job
Posted by bill.french on 03 January 2011 - 08:25 PM in General Discussion
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.Sorry, that's a typo, I meant 1-10 cells.
- Netduino Forums
- → bill.french's Content
- Privacy Policy