Jump to content
Drunkenclam

Hall Effect Sensors

Recommended Posts

Drunkenclam

I'm not sure if anyone has played around with these type of sensors instead of using IR. So I though I'd give it a go. So for those who don't know. Hall Effect sensors measure or detect changes in magnetic field. So I am hoping that the field generatad by the motor will be detected. Failing that. It is possible to add an earth magnet into a train car. So I'll build a small test 

 

Now I'm only intending to put basic signal lighting on my layout, so nothing to grand. I ordered some of these signals. 3 aspect and a little short of 4cm. These are currently on order.  

 

20190516_165945.thumb.jpg.e42872aceda5a5046e33284c9da1bd47.jpg

 

The sensors arrived today. This type is omnipolar. As these are meant to detect both N & S magnetic fields. 

 

20190516_170421.thumb.jpg.cf85c623ecc2d59c9408b5fde1f428ea.jpg

 

20190516_170400.thumb.jpg.58c89632b277aaf29c60913f3a301a5f.jpg

 

One of the things I might try is, if they work. Apply a little grey paint to them as they make nice ATC detectors, 🙂

 

20190516_170441.thumb.jpg.a96a702a8208558b146c2fc57c853b4d.jpg

 

 

 

 

  • Like 5

Share this post


Link to post
chadbag

Do let us know how it works out!  Good luck!   I have some long term interest in this myself.   Short term I am working on other things, but longer term this is great!

 

 

Share this post


Link to post
Keith

I am also interested as detection is one of my long term goals.

Share this post


Link to post
cteno4

Small neodymium magnet on the belly of the loco should do it. Works for the Tomytec bus sensors.

 

jeff

  • Like 1

Share this post


Link to post
Drunkenclam

I am hoping the trains own magnetic field would be enough. I'll have to rig it up to an analog input on the arduino and read the output readings for different trains. Then maybe put in some threshold limits. 

 

First build a small test breadboard, to make sure happy with the program. Then install a sensor a a straight section of track. Will probably fit 2. One in different planes. 

  • Like 1

Share this post


Link to post
Drunkenclam
Posted (edited)

So added some resistors and stuck them in the bread board. Done a little bit of coding on the arduino and test. I do want to change the code later away from using delay and time millis. So I can  run more sensors at a time. The program also detects it the train is still over the sensor before changing from red to amber. I know the Kato ones would start changing through sequence. Even if there was a long train running through. Not much use for the hall effect sensor. but ok. if using IR detection.

 

ie. if detecting, change to red, if clear for more than 0.5 seconds, start the timer to change from red to amber....

 

 

 

Edited by Drunkenclam
  • Like 2

Share this post


Link to post
Drunkenclam

So I'm pretty happy with the coding now. Soldered some wires to a sensor ready to mount on a piece of track. Stuck with the kids. So there I'll stop for the day.

  • Like 1

Share this post


Link to post
Drunkenclam
Posted (edited)

I guess, stage one was a failure. The magnetic field generated by the motor wasn't enough to trigger detection. I'm going to order up some magnets and when they arrive, Try again.

 

so basic test videos of different motor cars

 

 

I hope I don't get into trouble for so many videos in one post.

 

Edited by Drunkenclam
grammer

Share this post


Link to post
cteno4

Bummer. I bet a tiny may neodymium magnet will trip it on the bottom of the car as low as possible. I wonder if a taller magnet might trip the Hall effect better than a flat one as I think it will concentrate a longer but tighter magnetic field. Might get some 1x2mm magnets and attach one then if it doesn’t work pop another one on top and build up to see. The are only a penny or two each on ebay.

 

Benefit is you can put them on the non powered lead cars to trip signals.

 

jeff

Share this post


Link to post
Drunkenclam
Posted (edited)

Ok. So I ordered some 35x8x3 magnets. 

These fit nicely inside the Kato passenger cars and are held nicely to the metal rails running through the chassis for the lighting.

 

20190616_115744.thumb.jpg.36f62073506ee32dc1b7851dc4c1608b.jpg

 

Don't really fit in the tomix or microace passenger cars I have and a bit large to stick to the underside.

 

20190616_115655.thumb.jpg.657d7927534c5c921f97750c67396fe4.jpg

 

20190616_115621.thumb.jpg.fb96e10702b065fad637cda3129c8df3.jpg

 

20190616_115712.thumb.jpg.b29c1b26a65cd3a313c1c355f0760b4d.jpg

 

But testing. They seem to work without issue. 

 

 

 

 

Edited by Drunkenclam
Predicted texted prefers microwave to microace
  • Like 2

Share this post


Link to post
Keith
Posted (edited)

That is great news, it is so much simpler than breaking large sections into different detection zones and the circuitry is much easier than current detection.

Which model Hall effect sensor did you use?

Edited by Keith

Share this post


Link to post
cteno4

Nice! I wonder if you could get away with much smaller ones under the car. The Tomytec bus are pretty small in the roadway for the sensors in the bus.

 

jeff 

  • Like 1

Share this post


Link to post
Drunkenclam

I'll be ordering some smaller ones. 6x4x1.5

Then try them out

Share this post


Link to post
cteno4

Might try some oof the small round ones like 3x3mm as I think that’s about the size of the bus ones. Just paint them black and glue them on the undercarriage. Harder to do on locos but maybe a 1x5mm disc may work on the bottom.

 

jeff

Share this post


Link to post
Madsing

Yes, this is very interesting.

I tested the OH3144 Unipolar Hall Effect Switch IC (search for OH3144 at AliExpress) and they can detect the bus steering magnet from under the Tomytec bus track.

Note that the OH3144 as well as the A3213 used here are switches. They have a latch and provide a "digital" output when the magnetic field becomes strong enough (or changes in a significant way). I also tested the AH35 Hall Sensor, and this one as a linear response (an analog voltage output that varies with the magnetic field). I wonder if it would be able to detect the train motor. Not tested.

 

Marc

 

Share this post


Link to post
Ochanomizu
On 6/16/2019 at 9:05 PM, Drunkenclam said:

Ok. So I ordered some 35x8x3 magnets. 

These fit nicely inside the Kato passenger cars and are held nicely to the metal rails running through the chassis for the lighting.

 

Hello,

 

Don't these magnets short out the metal rails you referred to above?  Wouldn't it be better to locate the magnet elsewhere?

Share this post


Link to post
cteno4

I think the chassis has them recessed some so it’s not coming in direct contact with the magnet but close enough for magnetic field to grip onto them. If the contacts are flush piece of scotch tape will insulate.

 

jeff

Share this post


Link to post
Ochanomizu

Hello,

 

I am investigating.  Is it possible to use the Hall Effect Switch with the inputs on Digitrax products such as the DS54, DS64, or SEC8? 

 

All of these have 8 auxiliary switches and the SEC8 also has 8 detection zones.

Share this post


Link to post
Drunkenclam
2 hours ago, Ochanomizu said:

 

Hello,

 

Don't these magnets short out the metal rails you referred to above?  Wouldn't it be better to locate the magnet elsewhere?

 

1 hour ago, cteno4 said:

I think the chassis has them recessed some so it’s not coming in direct contact with the magnet but close enough for magnetic field to grip onto them. If the contacts are flush piece of scotch tape will insulate.

 

jeff

 

Correct. The magents sit on the plastic insert that makes the seat interiors,  so not touching the rails.

 

1 hour ago, Ochanomizu said:

Hello,

 

I am investigating.  Is it possible to use the Hall Effect Switch with the inputs on Digitrax products such as the DS54, DS64, or SEC8? 

 

All of these have 8 auxiliary switches and the SEC8 also has 8 detection zones.

 

Thats behond my knowledge, But if it accepts a 5V dc input, I can't see why not.

 

I did order some 3x2x1 magnets, Alot smaller to fit on the underside, for testing, I don't know why I go for bar magnets, Maybe easier to disguise then something thats round.

  • Like 1

Share this post


Link to post
cteno4
3 minutes ago, Drunkenclam said:

I don't know why I go for bar magnets, Maybe easier to disguise then something thats round.

 

LOL! You are right it will work better on an undercarriage. I default from discs from wood working projects where I use the and can easily just drill a countersink hole to mount them in flush. I guess we have our own defaults that rule our reflexes!

 

cheers

 

jeff

Share this post


Link to post
Keith
2 hours ago, Ochanomizu said:

Hello,

 

I am investigating.  Is it possible to use the Hall Effect Switch with the inputs on Digitrax products such as the DS54, DS64, or SEC8? 

 

All of these have 8 auxiliary switches and the SEC8 also has 8 detection zones.

 

I was looking this morning at the RR-CirKits TC64 to see if you could just put the outputs com the Hall effect circuit directly in without another board.

Share this post


Link to post
Drunkenclam

Been playing with the 1mm magnets on the underside, seems the minimum thickness for consistance is 3mm so thats 3x2x3

Share this post


Link to post
cteno4

yep the magnet shape will effect the magnetic field created. cool sounds like a block that will look like a general piece of undercarriage equipment. i guess shinkansens you may need to use a bigger one inside the lead cars.

 

jeff

Share this post


Link to post
inobu
Posted (edited)

I tried this route and the magnets were not practical. I did find another possible solution. SEN-13679. Sparkfun current sensor. Its a breakout board so its ready to go. It has 400mV sensitivity which is low enough. I got tied up on other stuff and put it on the shelf.   They are $8 but you should be able to get them cheaper ordering (making your own pcb) in bulk.

 

If you want to still try used the Keyes Hall sensor ky-035. Its a circuit board with LED build in. 

 

Inobu

 

 

Edited by inobu
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×