0% found this document useful (0 votes)
178 views6 pages

Arduino Hall Effect Sensor (Gaussmeter) - Arduining

Using a Hall effect sensor connected to an Arduino, the document describes how to create a Gaussmeter to measure magnetic fields. The sensor output is read from an analog pin and mapped to a value range to display the magnetic field strength in Gauss in the serial monitor. A sketch is provided to read the sensor and display the output.

Uploaded by

Edwin Bagas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views6 pages

Arduino Hall Effect Sensor (Gaussmeter) - Arduining

Using a Hall effect sensor connected to an Arduino, the document describes how to create a Gaussmeter to measure magnetic fields. The sensor output is read from an analog pin and mapped to a value range to display the magnetic field strength in Gauss in the serial monitor. A sketch is provided to read the sensor and display the output.

Uploaded by

Edwin Bagas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

15/9/2015 Arduino 

Hall Effect Sensor ( Gaussmeter ) |  Arduining

Arduining
Physical Computing Mini­Projects

Home
About
Diagrams

Type text to search here...  
Home > Exploring Ideas, Hardware testing > Arduino Hall Effect Sensor ( Gaussmeter )

Arduino Hall Effect Sensor ( Gaussmeter )
July 17, 2012 ardunaut Leave a comment Go to comments

Using the SS495B Miniature Ratiometric Linear Hall Effect Sensor from Honeywell and the
Arduino NANO.

Just connect the sensor  to  GND and VCC and the “Output” pin to the analog input A0.
The effect of North and South magnetic fields in the sensor are observed in the Serial Monitor.

GLUTA LAPUNZEL

Rp125.000

http://arduining.com/2012/07/17/arduino­hall­effect­sensor­gaussmeter/ 1/6
15/9/2015 Arduino Hall Effect Sensor ( Gaussmeter ) |  Arduining

The Sketch used:

/*
GaussPlot
27/12/2011  Arduining.com
Showing Gauss measured by the SS495B in the serial monitor.
(Miniature Radiometric Linear Hall Efect Sensor)
Sensor connected to Analog channel 0.
*/
#define XRANGE  50 
int x,gss;
void setup(){
  Serial.begin(9600);
}   
void loop(){
  int aValue =analogRead(0);
  x = map(aValue, 0, 1024, 0, XRANGE);
  gss = map(aValue, 102, 922, ‐640, 640);
  Serial.print("|"); 
  for (int i=0;i<x;i++){
    if(i==XRANGE/2‐1)Serial.print("|");
    else Serial.print("‐");
  }
  Serial.print("O");
  for (int i=x+1;i<XRANGE;i++){  Follow
    if(i==XRANGE/2‐1)Serial.print("|");
    else Serial.print("‐");
  }
Follow
  Serial.print("|"); “Arduining”
  Serial.print(gss);
  Serial.println("Gauss"); Get every new post delivered
  delay(100); to your Inbox.

Join 35 other followers
See the YouTube presentation:
Enter your email address

Sign me up

Build a website with WordPress.com

http://arduining.com/2012/07/17/arduino­hall­effect­sensor­gaussmeter/ 2/6
15/9/2015 Arduino Hall Effect Sensor ( Gaussmeter ) |  Arduining

Arduino Hall Effect Sensor ( Gaussmeter )

About these ads

S hare this:

 Twitter 1  Facebook 3

 Like
One blogger likes this.

Related

Using the Linear Sensor Array Arduino Rocket Launch Single Pixel Camera with


TSL201R with Arduino Controller Arduino Nano
In "Exploring Ideas" In "Driving Displays" In "Driving Motors"

Categories: Exploring Ideas, Hardware testing
Comments (9) Trackbacks (0) Leave a comment Trackback

1. 
weissa7
February 11, 2013 at 2:35 AM
Reply

Can you please explain why you used the map function ( twice) in your code and how you

http://arduining.com/2012/07/17/arduino­hall­effect­sensor­gaussmeter/ 3/6
15/9/2015 Arduino Hall Effect Sensor ( Gaussmeter ) |  Arduining
determined what parameters to use within map function??

2. 
planbee
October 12, 2014 at 4:30 AM
Reply

Awesome! Worked first time for me. I’m using the SS495a model which seems to be the
same.

3. 
De Wilde Quinten (@beyondalmeadows)
February 15, 2015 at 8:57 AM
Reply

I’m having the DR5053 and when using your sketch my “0” point is ­473 to ­475 gauss. Is
that the actual gauss or just an indication. I want to know my 0 point so I can bring to the
middle point of 0­1023 bit.

De Wilde Quinten (@beyondalmeadows)
February 15, 2015 at 8:58 AM
Reply

DRV5053 I meant.

ardunaut
February 15, 2015 at 10:16 AM
Reply

You need to change the following line to reflect the range of the DR5053 (0­
2Volts):
x = map(aValue, 0, 1024, 0, XRANGE); to x = map(aValue, 0, 410, 0,
XRANGE);
410 is the analogRead value when the input voltage is 2 Volts (5V as reference).

Also the line:
gss = map(aValue, 102, 922, ­640, 640); needs to change.
Here you need the last two letters of the DR5053 code.
for the DR5053CA (23 mV/mT) is the same as 2,3mV/Gauss:
gss = map(aValue, 0, 410, ­435, 435);

Remember the precision for this devices are low.

4. 
Wen
September 2, 2015 at 4:48 PM
Reply

I have the SS49E, it work well with that code?

ardunaut
September 2, 2015 at 7:33 PM
Reply
http://arduining.com/2012/07/17/arduino­hall­effect­sensor­gaussmeter/ 4/6
15/9/2015 Arduino Hall Effect Sensor ( Gaussmeter ) |  Arduining
The SS49E has a different gain and range.
To use it change the line:
gss = map(aValue, 102, 922, ­640, 640);
Use his:
gss = map(aValue, 205, 810, ­1000, 1000);

Wen
September 3, 2015 at 2:14 AM

How can I know the gain and range of the sensor?

ardunaut
September 3, 2015 at 5:48 PM

Check this Quick_Reference:
http://arduining.com/testpage/

1.  No trackbacks yet.

Leave a Reply

Enter your comment here...

LaunchPad and Energia ( StopWatch ) Arduino Punched Card Reader
RSS feed

Twitter

Recent Posts

Arduino For Free, Almost.
NodeMCU Breathing LED with Arduino IDE
NodeMCU ESP­12 Development Kit V1.0
Interrupts with the TRINKET
analog comparator
Arduino and Two Stepper Motors

Archives

Select Month

Categories

Arduino Sketch
http://arduining.com/2012/07/17/arduino­hall­effect­sensor­gaussmeter/ 5/6
15/9/2015 Arduino Hall Effect Sensor ( Gaussmeter ) |  Arduining
Driving Displays
Driving Motors
Exploring Ideas
Hardware testing
Internet of Things
Launchpad and Energia
Made using Processing
Trinket Projects
Uncategorized

Meta

Register
Log in
Entries RSS
Comments RSS
Blog at WordPress.com.

Follow me on Twitter

Tweets Follow

Atmel Corporation 1 Apr


@Atmel
Battery life for decades! And, this is
NEITHER a typo nor an elaborate April
Fool’s joke: bit.ly/1HWHd03
pic.twitter.com/9H3rL85rXH
Retweeted by Arduining

Expand

Xively         31 Jan
@XivelyIOT
5 Tech Trends to Watch in 2015 ‐ by
@TelstraBusWeb lgme.in/6015ImSH
pic.twitter.com/oBiC9f8EIs
Retweeted by Arduining

Expand

Tweet to @Arduining

Top
Blog at WordPress.com. The INove Theme.

http://arduining.com/2012/07/17/arduino­hall­effect­sensor­gaussmeter/ 6/6

You might also like