Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
» About me » Bristol VA/TN » E-Mail » Hobby Electronics » Environmentalism » US Constitution » Ending Racism » Religious Themes » PICAXE Microcontroller » Arduino Microcontroller » Microcontroller Input/Output Ports Using Hall Effect Switches and Sensors by Lewis Loflin Hall effect sensors are solid state magnetic devices used as either magnetic switches or to measure magnetic fields. There are three basic types I'm concerned with here: The Hall effect switch, the Hall effect latch, and the ratiometric or analog sensor. For more on the general operation see my You Tube video above. Here I'm concerned with illustrating various electronic circuits and how to connect the sensors and use them. A Hall effect switch will turn on in the presence of south magnetic field on its face or north magnetic field on the opposite side. It will turn off when the magnet is removed. A Hall effect latch works like a switch, but will stay on when the magnet is removed. It will turn off if the north pole is applied to the face or the power is turned off. A ratiometric Hall effect sensor outputs an analog voltage proportional to the magnetic field intensity. The devices I will use on a separate page are unipolar and in general with no magnetic field applied the output is one-half the supply voltage. The voltage will increase with the south magnetic pole on the face or decrease with the north magnetic pole on the face. See Using Ratiometric Hall Effect Sensors Pictured above are typical pin outs on three lead Hall sensors. The south pole of the magnet goes towards the 'face' turning the device on. The north pole on the face will have no effect unless the device is a latch, which it will turn off if it's already on. Considering Magnets The magnetic field typically produced by rare-earth magnets can be in excess of 1.4 teslas, whereas ferrite or ceramic magnets typically exhibit fields of 0.5 to 1 tesla. The Tesla is named in honor of the inventor, physicist, and electrical engineer Nikola Tesla. A smaller magnetic field unit is the Gauss (1 Tesla = 10,000 Gauss): 10-9 - 10-8 gauss: the human brain magnetic field; 0.31-0.58 gauss: the Earth's magnetic field on its surface; 25 gauss: the Earth's magnetic field in its core; 50 gauss: a typical refrigerator magnet; 100 gauss: a small iron magnet; 2000 gauss: a small neodymium-iron-boron (NIB) magnet; 15,000-30,000 gauss: a medical magnetic resonance imaging electromagnet. Above ref. Wiki. To find out more about rare earth magnets in general visit www.rare-earth-magnets.com. Magnets can be stacked (N to S) to form a more powerful magnet. Let's consider a UGN3013T five volt Hall effect switch. To trip the switch on requires typically 500 gauss to a max of 750 gauss. But to release or cut off is a typical 225 gauss to as low as 110 gauss. So we have a reasonable range of 275 that we need to stay in for reliable operation. So it's obvious even a small iron magnet may work well or has to be very close to the sensor. Note this is an old obsolete part I just happened to have. Newer units are much more sensitive. We can also use electromagnets. Pictured above is a basic Hall effect switch. It consists of a Hall effect plate, amplifier, Schmidt trigger, and open-drain field effect transistor. (FET) The Hall effect plate produces a very small output that must be amplified, the Schmidt trigger will turn on when the amplifier output reaches a certain level, which will then turn on the FET. The FET is an electronic switch much like a mechanical light switch. When "ON" it completes the path to ground switching on an external device connected to positive VCC. A Hall Effect latch only differs in having some additional latching circuitry. When on uses the turn "HIGH" we men the FET is turned off breaking the path to ground. The voltage on the drain will climb to VCC. When we say "LOW" the FET is turned on it will "sink" the current to ground and the voltage on the drain goes to zero. This is true of almost all modern digital circuits. For more on the concept of sink/source see Basic Transistor Driver Circuits for Micro-Controllers Pictured above is a Hall effect switch connected to a light emitting diode. (LED) In the off condition TP2 will be "HIGH" or 5 volts measured relative to ground. The LED will be off. When switched on by a magnet TP2 will measure about .5 volts and the LED will be on. This can be directly connected to the input port of a micro-controller or other 5-volt digital logic. The problem with the above circuit is that a Hall sensor is a low power device that can sink about 20 mA. Now we will look at a number of simple circuits to boost the power output of the device. In the example above we used 1/6 of a 7406 HEX inverter to drive an N-channel MOSFET such as the IRF630. With the Hall effect switch (U3) off, TP1 is five volts, TP2 is 0 volts, and TP3 is 12 volts with the lamp off. Apply magnet: TP1 = 0 volts; TP2 = 12 volts; TP3 = 0 volts and lamp is on. R1 is 4.7k and R2 is 10k. To use a 12-volt Hall effect switch or a latch such as a SS466 from Honeywell, change the 7406 to a 74C906 and R1 to 10k. Note the IRF630 is an enhancement mode MOSFET. In the above example we used a N-channel depletion mode MOSFET. When U4 is off, TP4 and TP5 each = 12 volts and the lamp is off. When a magnet switches U4 on TP4 and TP5 both go to 0 volts and the lamp is on. Voltage Isolation In the above sample circuit we use a 5-volt Hall switch to operate a 24-volt relay circuit to operate a high-voltage AC circuit. All of the voltages are electrically isolated from each other and even the common ground between the 5 and 24 volt supplies can be severed. With the Hall switch off we note the following meter readings: TP1 = 5 volts; TP2 = 24 volts; indicator LED D3 is off; relay K1 is de-energized, contacts open; the voltage across K1's contacts is 120 VAC; and lamp B1 is off. When Hall switch U2 is turned on by a magnet: TP1 = 0 volts; TP2 = 0 volts; indicator LED D3 is on; relay K1 is energized, contacts close; the voltage across K1's contacts is 0 VAC; and lamp B1 is on. R1 can be 330 ohms while R2 can be 1000 ohms. D2 is a general purpose silicon diode used for spike suppression when the relay coil is de-energized. In our final circuit we use a 5-volt Hall switch and a MOC30XX type opto-coupler to operate a high voltage triac circuit. When Hall switch U4 is turned on TP1 goes to zero volts and the lamp turns on. R1 is still 330 ohms and R4 is 180 ohms. Triac Q1 should be at least 200 volts. This completes my introduction to Hall Effect switches. Our next section we will look into ratiometric sensors, circuits, and uses. From there we will connect a Hall sensor to a micro-controller. To purchase Hall sensors or explore the many varied types of sensors see www.allegromicro.com. If one wants a kit of parts to perform the above experiments contact me at [email protected] for information. Using Hall Effect Sensors with Alternating Current Using Hall Effect Switches and Sensors Using Ratiometric Hall Effect Sensors Using Hall Effect Sensors with the Arduino-ATMEGA168 TL173C 12-Volt Ratiometric Hall Sensor (PDF file) UGN3503 5-Volt Ratiometric Hall Effect Sensor (PDF file) SS466 Hall Latch (PDF file) Added January 2012: PICAXE Micro-controller Projects! The PICAXE series of micro-controllers rank as the easiest and most cost effective way to use Microchip processors. I wanted an easier and less expensive way to introduce my students to the "PIC" micro-controller. Here I hope to get those starting out past poorly written literature and lack of simple working code examples. Exploring the PICAXE Micro-Controller Understanding Micro-Controller Input/Output Ports Using the 74HC165 Shift Register with the PICAXE Micro-Controller Connecting the 74HC595 Shift Register to PICAXE Micro-controller Using 7-Segment Displays with the PICAXE Micro-Controller Potentiometers and Analog-to-Digital Conversion with the PICAXE PWM Motor Speed Control and the PICAXE Micro-Controller Connecting the PICAXE to the DS1307 Real Time Clock Connecting the PICAXE to an External EEPROM (24LC08) Connecting a Servo to a PICAXE Connecting the TLC548 ADC to the PICAXE Connecting the AD5220 Digital Potentiometer to the PICAXE The next groups of links below go to specific electronic/electrical devices on how to use and test them. Build a Thermocouple Amplifier Build a Potato battery Testing a Diac Basic Triacs and SCRs Solid State AC Relays with Triacs Light Activated Silicon Controlled Rectifier (LASCR) Basic Transistor Driver Circuits for Micro-Controllers Opto-Isolated Transistor Drivers for Micro-Controllers Build a H-Bridge Motor Control with Power MOSFETS Series/Parallel batteries Using a CdS Photocells Voltage Comparator Information And Circuits Resistive Humidity Sensors Reed Switches Diodes and Rectifiers Transformers and misc. topics ATMEGA168 Arduino Micro Controller Projects Using Hall Effect Sensors with the Arduino-ATMEGA168 Connecting the Arduino to the TMP37 Centigrade Temperature Sensor Connecting the ATMEGA168/Arduino to MCP23016 and LCD Display Display Time/Date with Arduino, LCD Display, and DS1307 RTC Controlling Low-Voltage Driveway Lights with the ATMEGA168/Arduino Hatching Chicken Eggs with ATMEGA168/Arduino The TSL230R Light to Frequency Converter and Arduino/ATMEGA168 Interfacing the ATMEGA168/Arduino to the MCP23016 I/O Expander Using the ATMEGA168/Arduino with a DS1307 Real Time Clock Using a Unipolar Stepper Motor with a Arduino Using the ATMEGA168/Arduino with the TA8050 Motor Controller Using the ATMEGA168/Arduino with a 24LC08 Serial EEPROM Hardware Interrupts Demo and Tutorial for ATMEGA168/Arduino Micro-controller AC Power Control Using Interrupts &&& http://www.bravenet.com/ http://counter47.bravenet.com/index.php?id=374618&type=overview&usernum=3964059931 Web site © Copyright Lewis Loflin, All rights reserved. If using this material on another site, please provide a link back to my site.