Show Posts
Pages: [1]
1  Using Arduino / Sensors / Re: Magnetic Sensor on: February 28, 2011, 03:07:42 pm
@liudr:

Im using it for my biomedical project to locate a magnet inside the body for orthopedic purposes...works very well so far!
2  Using Arduino / Displays / Re: LCD/serial monitor on: February 27, 2011, 06:38:07 pm
Thanks for the help!  Im still experimenting with different codes for my hall sensor, and I like this one that I found on the arduino website:


/*
 *    FILE: MM01
 *  AUTHOR: Rob van den Tillaart
 *    DATE: 2010 03 19
 *
 * PURPOSE: use a A1301 as magnetometer   
 *
 * Pinlayout A1301
 * ==================
 *  1     GND
 *  2     signal    connected to Analog 0   
 *  3     Vdd +5V
 *
 */

int  time = 0;
int  oldtime = -1;
int  rawMM = 0;

#define BNULL 505L    // My midpoint, calibrate this
#define BFAC  1000L   // 2500 mv == 1000 Gauss in 505 steps

void setup()
{
  // setup serial - diagnostics - port
  Serial.begin(9600);
}

void DoMeasurement()
{
  // measure magnetics
  rawMM = analogRead(0);   // Range : 0..1024

  Serial.print("MM: ");
  Serial.print(rawMM);

  long B = rawMM - BNULL;  // adjust midpoint
  B = B * BFAC / BNULL;    // adjust scale -> -1000 .. +1000 Gauss

  Serial.print("  = B in Gauss: ");
  Serial.print(B);

  if (B > 0) Serial.println(" South-pole");
  else if (B <0) Serial.println(" North-pole");
  else Serial.println();
}

void loop()
{
  time = millis()/75;
  if (time == oldtime)
  {
    delay(100);
  }
  else
  {
    oldtime = time;
    DoMeasurement();
  }
}
  How would I put this into an LCD?
3  Using Arduino / Displays / Re: LCD/serial monitor on: February 27, 2011, 03:09:41 pm
Already got the LCD...went with the arduino hd44780....but here is the code for my sensor:

int sensorPin = A0;    // select the input pin for the sensor
int sensorValue = 0;  // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
 Serial.println(sensorValue); 
 delay (75);
 
}
4  Using Arduino / Displays / LCD/serial monitor on: February 24, 2011, 07:45:50 pm
Hey everyone,

I am currently using a hall sensor to detect a magnet, and I was wondering if it was possible to have the live results from my serial monitor be on my LCD instead....if not, then could anyone provide any info to get my lcd to display what the hall sensor is sensing?
5  Using Arduino / Sensors / Re: Magnetic Sensor on: February 24, 2011, 07:41:34 pm
Thanks for the help everyone! Got the sensor working very well...went with the A1302 hall sensor and can use it to sense my magnet a good half foot away!
6  Using Arduino / Sensors / Re: Magnetic Sensor on: February 11, 2011, 04:04:55 pm
Thanks everybody for the help! But I havent gotten anything to work yet...Im still confused as to how exactly I need to set everything up...I have a breadboard, resistors, wiring my arduino and my sensor...am I missing something? If anyone had a diagram for a simple magnetic sensor, it would help greatly!
7  Using Arduino / Sensors / Re: Magnetic Sensor on: February 07, 2011, 09:53:13 pm
How would I connect the arduino with the sensor?
8  Using Arduino / Sensors / Re: Magnetic Sensor on: February 04, 2011, 08:25:51 pm
Thanks! Ill definitely get started
9  Using Arduino / Sensors / Magnetic Sensor on: February 04, 2011, 04:02:59 pm
Hey Everybody,

Im pretty new to the arduino, and I was looking for any insight into using a hall sensor to simply detect a magnet with the arduino.  I would also like to visualize any output with an LCD, 7 segment display, or LED.  Any help with coding and circuitry would be greatly appreciated!
Pages: [1]