Go Down

### Topic: Can someone help to solve this problem???? I´m new at this (Read 339 times)previous topic - next topic

#### skwer

##### Jul 16, 2017, 07:10 pm
Make an algorithm, program and its Arduino scheme to determine the wind speed, in km / hour. It has an anemometer that generates a square wave with frequency proportional to the speed of the wind. For a frequency of 100 cycles per minute generated by the anemometer corresponds a speed of 10km / h. It is intended that the arduino send to the PC, every 10 seconds, the speed measured in those 10 seconds. You should use interrupts to perform this exercise.

I´m really trying to solve this problem for school but i´m new at this and i am not getting it. Can someone explain it to me please?

#### AWOL

#1
##### Jul 16, 2017, 07:13 pm
You need to post the code you've written so far.
In code tags.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

#### 6v6gt

#2
##### Jul 16, 2017, 07:53 pm
The obvious use of (external) interrupts here would be to detect the pulses from the anemometer and count these. Hint: use pin 2 or 3 on an Arduino (Uno etc.).
You count these in the ten second period that has been specified in your school exercise. At the end of the ten seconds, you do a little maths to calculate the average wind speed in that 10 second period and, using Serial.print or some equivalent, write the value thus obtained to the PC.

Your English, assuming you wrote the question, is not the problem here.

#### aarg

#3
##### Jul 16, 2017, 07:57 pmLast Edit: Jul 16, 2017, 07:59 pm by aarg
The obvious use of (external) interrupts here would be to detect the pulses from the anemometer and count these. Hint: use pin 2 or 3 on an Arduino (Uno etc.).
You count these in the ten second period that has been specified in your school exercise. At the end of the ten seconds, you do a little maths to calculate the average wind speed in that 10 second period and, using Serial.print or some equivalent, write the value thus obtained to the PC.

Your English, assuming you wrote the question, is not the problem here.
100 cpm is barely more than a pulse per second. The counting method will not produce very good accuracy over a 10 second interval. For slow pulses, it is better to measure the time between pulses in a much smaller time unit, average them, and then take the inverse 1/t if you want a quick response for a result.

It's possible that you really do want to average them over a longer period, then you want to count them during a longer period like 60-120 seconds.
... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

#### TKall

#4
##### Jul 16, 2017, 07:58 pm
Quote
I´m really trying to solve this problem for school but i´m new at this
Another one not paying attention in class.  Looks like a job for Natural Selection.

#### 6v6gt

#5
##### Jul 16, 2017, 08:25 pm
100 cpm is barely more than a pulse per second [. . . etc.]
Of course that is correct, but I guess this exercise has been contrived to demonstrate understanding (or lack of same) of computer programming techniques and how realistically it matches a real world problem is only secondary in this case.

#### 6v6gt

#6
##### Jul 16, 2017, 08:29 pm
Another one not paying attention in class.  Looks like a job for Natural Selection.
Well at least the OP had the initiative to seek out a forum where the best Arduino brains available can focus on it. All he has to learn now is how to better disguise the problem as something other than a school exercise to also get a ready made solution.

#### TKall

#7
##### Jul 16, 2017, 08:32 pm
Quote
Well at least the OP had the initiative to seek out a forum
I disagree.

#### el_supremo

#8
##### Jul 16, 2017, 08:52 pm
The OP also had the "initiative" to crosspost this in the Portuguese section

Pete
Don't send me technical questions via Private Message.

#### dave-in-nj

#9
##### Jul 17, 2017, 07:50 pm
The way I read this is that the OP has a school project and is looking for someone to do a google search for him to show how to scale a pulse input.

post results to  PC.

of course that will not work well,  so the results will be horrible.

This will reveal to the professor and student that the depth of programming is much greater than simple math, but that a different way to look at it will be needed to get usable results.   but results will be had nonetheless.

regardless,  the student has to :
learn about sending output to a PC

all of which can be achieved to meet the basic instructions.
albeit with poor real world results.

IMHO, this is the simple break down of the project.

Go Up