Go Down

Topic: Picking a board, newbie help needed (Read 1 time) previous topic - next topic


So, to start off, I'm a computer science student in his senior year, so I know everything about code, and nothing about electronics :-)

I want to read a bunch of analog signals(3 to 6) that are 0-5v, or 0-1v, and bring them into my computer and access that information using C#/Java or whatever.

Which product might you all suggest? And what is the learning curve required? I've done some reading, but I'm lacking a large base knowledge to fully comprehend what it is I'm getting myself into :(


You can use just about any Arduino board for that, just get the Duemilanova, the newest.

It's very easy to read voltages in the 0 - 5 V range.

Arduino has 6 pins that are connected to an internal ADC (Analog to digital converter). If you hook up your voltages to these pins you can use the AnalogRead() function to convert the voltage present on the pin to a number in the 0 - 1023 range.

Then you can send that information over ther serial line to your c# program.

Using the serial port in c# is quite straight forward.


Hmm, when I was in 4th year Computer Science, I didn't think I knew everything about code.

If all you want to do is read analog values into a PC based program, any Arduino will suit your needs.  Something based on the surface mount version of the MCU gives you 8 analog inputs instead of 6, but even that doesn't matter to you since you said you just need 3-6.


What accuracy do you need in your measurements? Is 8 or 10 bits enough?

What types of signals are you trying to measure? Sometimes signal conditioning
circuits are required to interface a sensor to the uC.

For the 1V signals I would switch the reference to the internal reference. This will
give you better accuracy. Look at the ADC section in the Atmel datasheet.

If you want to do the PC connection wireless you may want to take a look at the XBee.
The XBee has an ADC and can be setup to periodically measure analog lines
and transmit the results. I do not recall the number of channels.

(* jcl *)


The 4th year CS student and knowing everything was kind of a joke... I'm pretty sure as seniors we are aware we know even less, than we are aware of when we started as freshmen.
In fact undergrad seems to be about finding out about all the areas you know jack shiet about, and then moving on ;)

But anyway!

I would love to use the board for all kinds of things, as I love exploring and learning. The major set of analog inputs in my life, and ones I can play around with mathematically with ease, are the analog inputs to the instrument cluster in my old car. So in other words, I believe 8 bits should be plenty. 100mph/1024 is probably more accurate than the instrumentation! :)

So the voltage I am reading will be constant...or fluid... or some other good EE term for non-spiking input.

Though this does bring up a point. If I were trying to pick up a single timed signal volt, say the voltage required to open a fuel injector, is there a frequency that would max out the ability of the board to detect?

So to break it down, here is what I'm understanding so far.
If I go with the Duemilanova I will have the following steps:

1. program the Duemilanova to map the analog inputs to the USB. Is that sufficient? Seems like relatively simple code if all I want is the ADC functionality.

2. Write code on whatever platform I like, to read in the data coming from the USB port. At this point we are out of the hands of Arduino, right? Or are their supporting drivers that are required?

Thanks for all your input so far!


So after hours and hours of prodding the Arduino site, and coming up with half the information by using google (which points me back to the arduino site at a place I never found before) I've managed to learn a few more things about the process...I think.

So Arduino calls a program running on the Duemilanove a "Sketch", correct? One can create Sketches by using cross platform software for free, and it is written in a "C like" language.

So, let's say I've wired my Duemilanove to my analog inputs, I've got a proper Sketch program running on the Duemilanove that converts and forwards that analog input to the USB connected to a computer. At this point I can not figure out what the process is programatically for accessing the information coming from the Duemilanove. And if I can't figure out the process, I don't know how easy/hard it is, or if it's possible on my chosen platform.



Mar 12, 2009, 10:11 am Last Edit: Mar 12, 2009, 10:13 am by mem Reason: 1
A good place to look for Arduino information is the Arduino wiki- its called the Playground  and you can find it here: http://www.arduino.cc/playground/

There are many ways to do what you want, the wiki section on 'Interfacing with Software' as a few dozen links to various methods of talking to PC applications.

The first one on that page is Firmata,  this is simple way of getting values from the analog and digital ports onto computers running the Open Source Processing Platform.

You can read more about this here:

Have fun!


Thank you very much yet again for the info!
Google had yet to find that particular wiki :-)

So this all looks very doable without becoming a(n) EE.
Unless someone cares to contradict my current understanding, or someone else's advice, I guess my only other question is this: Is it programatically, either in Sketch or in whichever computer-side language is chosen, to read in multiple analog signals concurrently? I'm not asking "how", so much as "is it possible with ease". I want to make sure I can get this board to do what I want it to do, without becoming a EE, before I purchase it and sink time into a project. After all, I do still have this darned CS degree to finish ;-)


Mar 13, 2009, 09:25 am Last Edit: Mar 13, 2009, 09:30 am by mem Reason: 1
The great thing about Arduino is that complicated tasks are easy to do. This sketch sends readings from the six analog inputs to the serial port
Code: [Select]
// a sketch to send all six analog values to the serial port

void setup() {

void loop() {
 for(int i=0; i < 6; i++){
    int val = analogRead(i);    // read the value from the sensor
    Serial.println(val);          // send the value to the serial port

Note that these samples are taken consecutively at around 10ms intervals.

Go Up