Go Down

Topic: Analog input: PWM (Read 6497 times) previous topic - next topic

dep

Dec 21, 2009, 09:36 pm Last Edit: Dec 21, 2009, 09:36 pm by dep Reason: 1
Hello everyone,
I have just received my first Arduino, and am very impressed with it. Hardware that's simple enough for a software guy like me! ;D

However, I've also run into my first problem. I'm trying to read an analog control voltage that I measured to be in the 0-5 V range. Couldn't be simpler as it is already in the perfect range for an Arduino, right? Well, what I discovered after trying it out was that the voltage is microprocessor controlled, and looks like this when I read it from the Arduino:


So, I am assuming this is some kind of pulse-width modulation..?  :-?
For the record, reading the analog input as such works ok, with the connection in the AnalogInput tutorial. My connection is the same, except ground goes to ground and analog0 to the control voltage on the device.

So, my question is: how should I go about reading the voltage correctly (so that the value I get is unfluctuating, like the display on my voltmeter)?

Thanks in advance :)

retrolefty

To convert a PWM signal to a true analog voltage it has to pass through a low pass filter. That can be as simple as a resistor/cap filter to a op-amp active filter. Search around the site you should fine something on using a low pass filter.

Lefty

Grumpy_Mike


dep

Alright, thanks for the tips! I will post about my progress as I make some ;)
Happy holidays!

dep

Alright! I think I actually understood the PWM guide, to a degree, and managed to get the input working. Many thanks for the help! :)
You can have a look at my project here.

Grumpy_Mike

Glad you got it working, thanks for the link to the PWM page.
Cheers.

Andrew

Is it really measuring brain activity, or is it something else like electrical signals from muscle contractions in your forehead when you frown in concentration?

Andrew

Grumpy_Mike

My guess is the latter.  ;)

dep

#8
Jan 20, 2010, 01:07 pm Last Edit: Jan 20, 2010, 01:07 pm by dep Reason: 1
Quote

Is it really measuring brain activity, or is it something else like electrical signals from muscle contractions in your forehead when you frown in concentration?


From Wikipedia: "EEG is the recording of electrical activity along the scalp"
So, it is measuring brain activity, and it is measuring electrical signals on your forehead :)
It's a science toy, so it is not to be taken too seriously, but the principle is the same as in medical EEG. The main differences are probably resolution, and the fact that a real EEG cap looks like this:

;)

Grumpy_Mike

Quote
So, it is measuring brain activity, and it is measuring electrical signals on your forehead


So you put an electrode on your head. How do you tell if the resulting signal is coming from the brain activity or from muscle activity?

Quoting a definition of what an EEG recording is does not mean that is what you have.

Go Up