Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Interfacing / Re: hall effect sensor as a rpm mesauerment device on: December 13, 2007, 01:59:35 pm
cool thank you.  right now im just using a push button, but i got some sensors in the mail.

ill posy on how it turns out
2  Forum 2005-2010 (read only) / Interfacing / Re: hall effect sensor as a rpm mesauerment device on: December 10, 2007, 11:25:57 pm
im not exactly sure how you would use the interupt for this situation.  i have two ideas from what you have mentioned.

1) use the interupt as the data in from the hall effect sensor.  when the interupt is triggered send the current time out via the serial link ot the comp to log and process this data and then graph it.
2)run code to count all of the positive state transistions the hall effect sensor has, when setting up a timer to trigger the interupt at a constant time, and do the math based on how many revs per interupt period.


if you have another way please specify.

thanks for the info/help i really apreicate it.
3  Forum 2005-2010 (read only) / Interfacing / Re: hall effect sensor as a rpm mesauerment device on: December 09, 2007, 08:43:03 pm
also, is that a good way to do this function.  i dot really know much about code format.
4  Forum 2005-2010 (read only) / Interfacing / Re: hall effect sensor as a rpm mesauerment device on: December 09, 2007, 08:41:48 pm
on a side note, i wrote some code to count how many times a button is pressed, and to only measuer the state changes.

here is that.

int ledPin = 12;                // LED connected to digital pin 13
int inPin = 2;   // choose the input pin (for a pushbutton)
int val = 0;     // variable for reading the pin status
int cnt =0;      // var for counting the presses
int tog =0;       //bit used to toggle and keep track of when the button is pressd or not

void setup()                    // run once, when the sketch starts
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
  pinMode(inPin, INPUT);    // declare pushbutton as input
  Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps

}

void loop()                     // run over and over again
{
  val = digitalRead(inPin);  // read input value
  if (val == HIGH) {         // check if the input is HIGH (button released)
    digitalWrite(ledPin, LOW);  // turn LED OFF
    if (tog ==0){
      tog++;}
      else{
    while ( tog == 1) {
      cnt++;
      Serial.print(cnt, DEC);
      Serial.print("\t");
      Serial.print(tog, DEC);
      Serial.print("\t");
      tog = 2;
    }  
  }
  }
  else
  {
    digitalWrite(ledPin, HIGH);  // turn LED ON
    tog =0;
  }
}



can i just replace the push button with the hall effect sensor?
5  Forum 2005-2010 (read only) / Interfacing / Re: hall effect sensor as a rpm mesauerment device on: December 09, 2007, 04:51:23 pm
just to see if i have the concept down correctly.  what i want to do i measuer the acceleration of a wheel.  it will be spinning at 100 hrz at the top speed.  i tihnk the best way to do this is to have the hall effect sensor singal the interpt on the aurdino every time it goes high.  each time it is trigered i want to export a time stamp to the pc and log it, and then graph the trend of the acceleration based on the diference between a time stamp and its previous time stamp.

does hat make sense, or is there a better way to do data logging with the arduino.

thanks
6  Forum 2005-2010 (read only) / Interfacing / Re: hall effect sensor as a rpm mesauerment device on: December 09, 2007, 03:24:50 pm
how would you poll the sensor so theres is a constant sample rate, would it be by using an interupt, i feel that the code delay times would fluctuate based on the data that is acquired and the different times it will take to pass it along the serial conenction.
7  Forum 2005-2010 (read only) / Interfacing / hall effect sensor as a rpm mesauerment device on: December 05, 2007, 02:15:10 pm
hello.  i had a quick question about hall effect sensors and arduino sample rates.  i want to use a hall effect sensor to measure the rpm and acceleration of a wheel.  the wheel will accelerate to 6000 rpm, or 100 rev a sec in about 6 seconds or so.  my question is about the speed of the digital input.  

first, will there be a race condition, and inaccuracy from the sensor and the clock pulses not syncing up.

and two, if anyone has a recommendation for a decent hall effect sensor.


i was also considering a optical sensor, but the set up the hall effect and magnet set up would work better i think.

thanks for the help,

anthony
anicolai@coe.neu.edu
8  Forum 2005-2010 (read only) / Workshops / Re: Arduino Workshop in Boston Anyone? on: December 05, 2007, 03:04:31 pm
hi, i just joined this board and happened to see the boston post and would also be interested in any meet ups that are going on.
thanks

anthony

anicolai@coe.neu.edu
Pages: [1]