Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Hall Effect Sensors (http://www.chiefdelphi.com/forums/showthread.php?t=111375)

bhughes 16-01-2013 13:11

Hall Effect Sensors
 
Where could I find FRC legal hall effect sensors that would work with a PWM cable? I've found this and this. Any recommendations for use, mounting, wiring, sourcing and buying? Also, how could you code one in Java or C++?

protoserge 16-01-2013 13:57

Re: Hall Effect Sensors
 
Custom Circuits are legal. Make sure all wiring is within the rules and the power is provided as legally required.

R39, R47, R54, R58, R69, R72 are a few.

We have used a hall effect in the past. I will direct some additional help to this thread.

You can code in anything. If you are running your robot using LabVIEW, I don't see why you couldn't do it in there too.

Here's an email I got from another mentor:

Quote:

Team 836 had great success using the linked Hall Effect sensor very similar, if not identical to your Digikey linked sensor (http://www.adafruit.com/products/158). The magnet can also be found on Adafruit.

This particular hall effect sensor is sensitive to the south pole of a magnet and is active low, (eg. every time the sensor sees a south pole, it will connect the output to ground.) Please note this is a simple explanation.

As for ways to interface this sensor on the Digital Side Cars: all DIOs are pulled high by a 10K resistor built into the DS. When your sensor triggers, it will pull the line low, so your DIO pin will be at 5Volts until the magnet passes the sensor, momentarily returning 0V as the magnet passes, then return to 5V.

I would suggest you take a small piece of protoboard and solder a PWM cable directly to the sensor in this order: PWM signal to sensor output, PWM power to sensor power, and ground to ground. Put the solder joints on the back side of the board. Then bend the sensor and lay it flush with the protoboard, using some 26 gauge wire (CAT5 works well) and the other holes in the board to secure the pwm cable to the back side of the board and the sensor to the front of the board. This will provide some strain relief for the cable and something to keep your sensor flush with the protoboard. Next, drill a couple holes in your proto board for mounting to the robot. The other end of your PWM cable can hook to the digital side car DIO just as it normally would. Remember when you're mounting, that these sensors work best <~1/4 inch away from the magnet.

As for coding this again pretty simple, look at the WPI documentation for gear tooth or counter. You will want to count either rising or falling edges then use the period output to give you the time between the edges ie time take for each rotation. A little math and presto... RPM!

BitTwiddler 16-01-2013 20:29

Re: Hall Effect Sensors
 
Team 1726 has used both kinds of magnetic sensors with good results.
The gear tooth sensor will detect the presence of ferromagnetic material (such as a steel sprocket) passing by whereas the magnetic switch will require a magnet (North turns it on - South turns it off).
The magnetic switch will require some additional components but the gear tooth sensor is ready to use with a Digital IO.
The magnetic switch is a lot cheaper to purchase and is also available at Sparkfun Electronics.
Also, we found the output of the magnetic switch to be somewhat noisy electrically but using the Low Pass filter from the PID library can reduce the noise.

Gregor 16-01-2013 21:12

Re: Hall Effect Sensors
 
We used the hall effect sensor in your second link last year, combined with a 22 tooth steel sprocket on our shooter, with no issues.

Included below are some photos from our Facebook page showing the mounting.

https://fbcdn-sphotos-f-a.akamaihd.n...92706845_n.jpg

https://fbcdn-sphotos-e-a.akamaihd.n...43415980_n.jpg

protoserge 17-01-2013 06:50

Re: Hall Effect Sensors
 
1 Attachment(s)
A photo is worth at least 836 words...

Brandon Zalinsky 19-01-2013 17:19

Re: Hall Effect Sensors
 
We tried to use Hall Effect sensors to detect the bump last year, and it did not work at all for us. They were so finicky that if they were 1/64 higher or lower than the 1/8" mounting window, they wouldn't work.

Ether 30-01-2013 11:41

Re: Hall Effect Sensors
 
Quote:

Originally Posted by stinglikeabee (Post 1217067)
A photo is worth at least 836 words...

Hey! Finally somebody who knows where the "macro" button is on their camera :)



protoserge 30-01-2013 13:33

Re: Hall Effect Sensors
 
Oh no! I forgot to put the Gaussian blur effect on! :D


I feel your pain with the atrocious camera phone shots trying to clarify something.

Katna.Grace 01-02-2013 02:16

Re: Hall Effect Sensors
 
3 Attachment(s)
We (3132) are using hall effect sensors with a buffering circuit this year. We developed them in the off-season for our 2012 shooter wheels.

We use Hall Effect sensors from RS (http://australia.rs-online.com/web/p...-ics/7384743/).

We are mounting the board flat underneath our shooter wheel, and 'hanging' the magnets down off the wheel. The magnets are epoxied into a piece of aluminium hex stock that was turned to a taper and had a hole drilled in it for the magnet. A thread was then tapped into the other end of the piece, to mount it on the end of the bolt holding the wheel on.

When mounting them, make sure that the sensor itself can't move, so that it can't be sheared off by whatever it's measuring or drift away from the magnet.

I'm attaching a picture of the board, and a picture of our magnet mounts (before the pcb is attached), as well as the schematic for the buffering circuit. Let me know if you have any questions.

electroken 01-02-2013 12:59

Re: Hall Effect Sensors
 
A useful gear tooth sensor that wires directly into a digital input is the Allegro Microsystems ATS667LSG. We like to use them when we need speed information but not direction information and we don't need the highest resolution. We also like that they're $6.

In the photo below an ATS667LSG is mounted to a carrier board and installed in the side of a Cim-u-lator gearbox, with its face about 0.03" from the output gear. It gives us a nice, clean 27 pulses per output shaft revolution. The sensor on top of the right motor is just posing for the photo.


Ether 01-02-2013 13:36

Re: Hall Effect Sensors
 
Quote:

Originally Posted by electroken (Post 1225905)
It gives us a nice, clean 27 pulses per output shaft revolution

How are you decoding the signal?



BitTwiddler 01-02-2013 15:12

Re: Hall Effect Sensors
 
Quote:

Originally Posted by electroken (Post 1225905)
A useful gear tooth sensor that wires directly into a digital input is the Allegro Microsystems ATS667LSG. We like to use them when we need speed information but not direction information and we don't need the highest resolution. We also like that they're $6.

Nice find! A few questions.
1. Where did you purchase them?
2. Did you wire them with the bypass and lowpass capacitors?
3. Do you have any data on how it performs on chain sprocket teeth?

MrForbes 01-02-2013 16:33

Re: Hall Effect Sensors
 
Quote:

Originally Posted by BitTwiddler (Post 1225995)
3. Do you have any data on how it performs on chain sprocket teeth?

.....steel? aluminum?

Kevin Sevcik 01-02-2013 17:00

Re: Hall Effect Sensors
 
Quote:

Originally Posted by MrForbes (Post 1226028)
.....steel? aluminum?

Steel. Gear Tooth Sensors have an embedded rare-earth magnet along with a hall effect sensor. They detect a change in the magnetic field that you're not going to see with a non-ferrous target.
EDIT: Also, Digikey has 22,690 in stock. Better order quick before they run out.

BitTwiddler 01-02-2013 17:56

Re: Hall Effect Sensors
 
Quote:

Originally Posted by Kevin Sevcik (Post 1226044)
Steel. Gear Tooth Sensors have an embedded rare-earth magnet along with a hall effect sensor. They detect a change in the magnetic field that you're not going to see with a non-ferrous target.

I think Jim was yanking my chain (also non-ferrous) for not being more specific.
Thanks for the source info though. We'll get our order in ASAP!

electroken 01-02-2013 18:15

Re: Hall Effect Sensors
 
Quote:

Originally Posted by BitTwiddler (Post 1225995)
Nice find! A few questions.
1. Where did you purchase them?
2. Did you wire them with the bypass and lowpass capacitors?
3. Do you have any data on how it performs on chain sprocket teeth?

1. Digi-Key (hurry... only 22,000 left!)
2. The capacitor hiding in the epoxy is a 0.1uF 50V ceramic across power and ground.
3. We haven't tried reading sprocket teeth, but I would expect them to work well with steel sprockets and a small air gap.

electroken 01-02-2013 18:17

Re: Hall Effect Sensors
 
Quote:

Originally Posted by Ether (Post 1225921)
How are you decoding the signal?



That's a good question. I told the student writing the code what to expect for a signal, and he said "Yeah, I got this".

Ether 01-02-2013 18:32

Re: Hall Effect Sensors
 
Quote:

Originally Posted by electroken (Post 1226084)
That's a good question. I told the student writing the code what to expect for a signal, and he said "Yeah, I got this".

The decoding method makes a big difference in the quality of the signal, especially at high speeds (depending in the method used).

Could you ask him to join the discussion here?



MrForbes 01-02-2013 22:49

Re: Hall Effect Sensors
 
Quote:

Originally Posted by BitTwiddler (Post 1226074)
I think Jim was yanking my chain (also non-ferrous) for not being more specific.

It was a serious question, Dave, because the sprocket is aluminum and I thought they only worked on ferrous teeth.

carneeki 02-02-2013 04:23

Re: Hall Effect Sensors
 
Quote:

Originally Posted by Katna.Grace (Post 1225732)
When mounting them, make sure that the sensor itself can't move, so that it can't be sheared off by whatever it's measuring or drift away from the magnet.

Hi Katherine,

We (FRC #4774) are going to use the same sensor boards! Thanks for making them open for others :D

We (FRC #3132) *1 forgot to include the value of T1 on the schematic. It is a 2N2222 NPN transistor, a TO92 package. Part of me is wondering if we can make all components sit flat so the board could be laminated in a future revision?

BR,

Adam

*1 (Yes, I am a mentor for two teams) :)

Oldbikerider 02-02-2013 18:13

Re: Hall Effect Sensors
 
Quote:

Originally Posted by carneeki (Post 1226288)
We (FRC #4774) are going to use the same sensor boards! Thanks for making them open for others :D

Hi Adam, we've just ordered magnets from a company in Sydney: http://www.magnet.com.au/neodymium_r...ts#discs_small

If I'd known that you were going to use the same sensors I'd have ordered enough for 4774 as well. We may have extras, so let us know if you need some.

Of course, as you know, DealExtreme also ship neo magnets to Australia.

fovea1959 14-02-2013 13:37

Re: Hall Effect Sensors
 
Team 2729 also is selling some boards they designed and made that are quite nice and that wire right up to the sidecar with a PWM cable; proceeds fund their team. See http://www.chiefdelphi.com/forums/sh...2&postcount=14.

We glue a small diametrically magnetized ring magnet (K&J Magnetics R424DIA) on the back shaft of a BaneBots motor to drive it, 'tis robust. See http://www.chiefdelphi.com/forums/sh...d.php?t=112294

philso 14-02-2013 14:10

Re: Hall Effect Sensors
 
Quote:

Originally Posted by electroken (Post 1225905)
A useful gear tooth sensor that wires directly into a digital input is the Allegro Microsystems ATS667LSG. We like to use them when we need speed information but not direction information and we don't need the highest resolution. We also like that they're $6.

In the photo below an ATS667LSG is mounted to a carrier board and installed in the side of a Cim-u-lator gearbox, with its face about 0.03" from the output gear. It gives us a nice, clean 27 pulses per output shaft revolution. The sensor on top of the right motor is just posing for the photo.



Electrotoken, am I right in thinking that the magnets in the hall effect sensor in the ATS667LSG detects the disturbances in the fields from the magnets mounted in the sensor package as the steel gears in the gearbox rotates through the field? Did you just connect it into one of the digital inputs on the Digital Sidecar? The datasheet does not seem to show any sort of calibration. Did you just stick it on, connect the wires and run?

electroken 14-02-2013 15:03

Re: Hall Effect Sensors
 
Quote:

Originally Posted by philso (Post 1233342)
Electrotoken, am I right in thinking that the magnets in the hall effect sensor in the ATS667LSG detects the disturbances in the fields from the magnets mounted in the sensor package as the steel gears in the gearbox rotates through the field? Did you just connect it into one of the digital inputs on the Digital Sidecar? The datasheet does not seem to show any sort of calibration. Did you just stick it on, connect the wires and run?

Your thinking is correct in that the magnet is buried in the sensor. I don't know if the 0.1uF cap I have between power and ground at the sensor end is strictly required, but it makes me feel better.

It really is as simple as wiring into the digital sidecar and counting pulses. We used two of these last year and will be using three this year.

jwakeman 19-02-2013 14:33

Re: Hall Effect Sensors
 
Quote:

Originally Posted by Gregor (Post 1216883)
We used the hall effect sensor in your second link last year, combined with a 22 tooth steel sprocket on our shooter, with no issues.

Do you know if you were able to sense direction with this sensor?


All times are GMT -5. The time now is 00:28.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi