#55 Using a Hall Effect Magnetic Sensor

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • New! ralphbacon.blog
    Using an electronic sensor with no moving parts is surely better (more reliable) than using anything that moves (a relay, a reed switch just to name two) so here we use a Hall Effect sensor that can detect magnetic fields - not only that, it can detect North or South pole magnetic fields depending on how the device is oriented.
    So whether it's an improved door opening switch you're after, or a better burglar alarm switch the 3144 Hall Effect device is for you. Easy to set up and use, it's also reliable and extremely cheap from our friends in the Far East. Even sourced from a local supplier it's unlikely to break the bank.
    I'd consider this one of the fundamental building blocks of an Arduinite's toolkit. Once you know how to use a Hall Effect device (just by following my simple example) then you'll never forget it, and will one day put that knowledge to good use!
    And in case you don't already know, I give a reminder on how you can increase the number of GPIO pins on your Arduino UNO (and other variants too) - for free!
    I'll include the Hall Effect sketch even though it's simplicity itself (if you understand the standard Arduino Example Blink sketch then this is just as easy), really it is.
    Sketch here:
    bit.ly/HallEffe...
    Item sourced from:
    www.ebay.co.uk/... (seller: digital-paradise9)
    Also in the UK:
    www.ebay.co.uk/... (seller: connchri-uk)
    But available anywhere for the same prices (Far East / UK).
    Datasheet:
    bit.ly/2du8Jag
    If you like this video please give it a thumbs up, share and if not already subscribed please do so :)
    And my channel is here:
    -----------------------------------------------------------------
    / ralphbacon
    ------------------------------------------------------------------
    How can I remember this? Memory tip: "See" Ralph Bacon, geddit?

ความคิดเห็น • 42

  • @johnalbu2319
    @johnalbu2319 ปีที่แล้ว

    Just when i thought i knew everything about Hall Effects you showt me something new. This time you pointed out the North Face of the sensor. Good Stuff Ralph.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Glad you found it helpful, John!

  • @geraldbull9272
    @geraldbull9272 3 ปีที่แล้ว

    At last, someone down to earth and sensible.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Nice of you to say, Gerald!

  • @squalazzo
    @squalazzo 8 ปีที่แล้ว

    your videos are very well done and full of clear info and complete explaination of code, concepts and technics... you deserve way more followers of what you have now...

    • @RalphBacon
      @RalphBacon  8 ปีที่แล้ว +1

      +squalazzo
      So nice of you to take the trouble to post that uplifting message, thank you. My subscribers are (slowly) increasing, I think it needs a bit more time for people to notice my tiny channel amongst the millions out there. We shall see.

    • @squalazzo
      @squalazzo 8 ปีที่แล้ว

      keep on, it's only a matter of time :)

  • @SkottTomas
    @SkottTomas ปีที่แล้ว

    Hi Ralph
    yet another great video - even though it's 6 years since you relased it ;)
    You mention the special arduino version with two extra pins. Just be aware that these two are analog-in pins only!

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      Yes, indeed, A6 & A7 are analog input only on the ATMega328P but on the (almost pin-compatible) ATMega328PB they are standard GPIO pins. A pity that Arduino never updated their UNO design to use that chip, a missed opportunity (about 8 years ago, anyway).

    • @SkottTomas
      @SkottTomas ปีที่แล้ว +1

      @@RalphBacon Oh. So now I also learned something 😉

  • @larrydee8859
    @larrydee8859 5 ปีที่แล้ว

    Great videos, Ralph!
    Easy to understand.
    Thanks.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Glad you like them Larry, thanks for posting.

  • @gartmorn
    @gartmorn 8 ปีที่แล้ว

    Great videos Ralph especially for newcomers to microcontrollers like myself! I don't think there would be anything mechanical that would exceed its frequency range. If there was something spinning that fast I don't think that I'd want to be in the immediate vicinity anyway! I suppose they were mass produced for the automotive industry at the advent of the electrnic ignition.

    • @RalphBacon
      @RalphBacon  8 ปีที่แล้ว

      +gartmorn
      Yes, you're totally right about the speed of a mechanical device; sometimes we forget how much an electronic device can do in a millisecond (compared to anything mechanical). Thanks for posting and enjoy the rest of my videos, past and future.

  • @giselechiozigotardi3224
    @giselechiozigotardi3224 5 ปีที่แล้ว +1

    Hi Ralph, thanks for the video. I need an analog hall effect sensor for my project. Which one do you recommed?

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      The 3144 I mentioned in the video, Gisele, is still alive and kicking on the Banggood website, I guess they made millions of them and are still selling them: bit.ly/HallEffectDevice
      For that price (currently $0.61 / €0.55) and free shipping it's worth getting more than one in case you make a mistake and destroy one!
      Good question, thanks for posting.

  • @yudeo9782
    @yudeo9782 4 ปีที่แล้ว

    Thank you for creating this video, very good tutorial for a noob like me. Is it possible to get analog value for the hall sensor input instead of getting just HIGH/LOW. Maybe with specifying different pin mode? I want to detect approximate location of a magnet, whether I need to have more or less sensors placed if a row.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Yes, absolutely, but not from this device, as this one contains a Schmitt trigger which specifically outputs either a HIGH or LOW with no intermediate stages. However, if you search for a module like the one below, you can get both analog and digital outputs:
      www.digitspace.com/products/sensors/others/ky-024-linear-magnetic-hall-sensor-module/?d624ad09dcc26da7

  • @ajayassani9413
    @ajayassani9413 6 ปีที่แล้ว

    Hi Ralph can this transistor be used directly without Arduino. I want to use it to turn on 12v led strip. Thanks

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      I'm afraid not, Ajay, this transistor (well, it's more than that) is only a sensor and cannot handle high currents at all. I doubt it could even switch on a relay. It really does need to be used with something that can handle higher currents, but that could be something as simple as another transistor. I hope this helps.

  • @juanandrewsasongko4443
    @juanandrewsasongko4443 6 ปีที่แล้ว

    Hi Ralph, It's a really good video.
    Currently I'm trying to make a magnetic flux detector inside a rotor using hall effect sensor too
    The desired output is Weber
    I have a few question for you if you don't mind helping me
    Thank you very much!

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      Post your questions right here, Juan, then others can see them too and might also be prepared to chip in with their ideas.

    • @juanandrewsasongko4443
      @juanandrewsasongko4443 6 ปีที่แล้ว

      Ralph S Bacon Hi Ralph!
      1. I want to know how to convert the output of hall effect (which is volt) to Weber(Vs)? What is the seconds doin here?
      2. The main point is how can I get Weber from the hall effect, when I'm supposed to measure the magnetic flux inside the motor? Could you please share your idea?

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      The short answer is, I don't know. But, what with Google being my best friend and all, I found this:
      The SI unit for Weber is (m^2 x kg)/(s^2 x A).
      One volt equals to one joule/coulomb, which is: W/Q.
      Now, the SI unit for volt is (m^2 x kg)/(s^3 x A).
      now volt x sec = (m^2 x kg x s)/(^3 x A)
      volt x sec = (m^2 x kg)/(s^2 x A)
      volt x sec​ = weber
      Also, refer to this wiki page: en.wikipedia.org/wiki/Weber_(unit). For your question this may be important: "A change in flux of one weber per second will induce an electromotive force of one volt (produce an electric potential difference of one volt across two open-circuited terminals)."
      I hope this helps you more than it helps me, that's for sure! Tricky question, perhaps others will answer too.

  • @buder5116
    @buder5116 4 ปีที่แล้ว

    how to use hall sensor without arduino or OpAmp ?
    kinda stuck at that
    i wanna use it to know when to fire a sparkplug
    lets say if it can handle 100hertz it should be more than enought

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      A Hall Effect transistor will easily manage 100Hz. But it's doing something with the relatively low signal level that I see as a problem. You don't need a full Arduino, an ATTiny85 would be fine (and cheap).

    • @buder5116
      @buder5116 4 ปีที่แล้ว

      @@RalphBacon the sparkplug is only the start i want to adjust maybe fuel based on pressure because i want turbo and injector
      now i wonder what the reaction time of an arduino
      Thanks

  • @Bonjour-World
    @Bonjour-World 4 ปีที่แล้ว

    High RPM motors are a bit closer to 30,000 RPM

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Indeed, just like electric vehicles, very fast.

  • @jwcolby54
    @jwcolby54 4 ปีที่แล้ว

    Can it sense the magnet from feet away?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      No, John, not at all, we're talking a cm or two. I'm not sure many things can detect a magnet from several feet away. A large coil, like you find in metal detectors, maybe!

  • @ashwinis1065
    @ashwinis1065 5 ปีที่แล้ว

    Sir plzzz do model to measure the magnetic strength

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      If you look at the datasheet for the device you may get the information you need, Ashwini.

  • @EasyPlay555
    @EasyPlay555 6 ปีที่แล้ว

    are you a teacher or a lecturer sir?

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      I'm unsure how to interpret this question! At face value, you're simply asking whether I'm either one of those as a profession. I'm neither, although I have done a fair bit of training people as part of my day job. The other way this question can be interpreted is asking whether I'm teaching or laying down some dogmatic rules (lecturing) people on how to do things, which I fervently hope is not the tone of any of my videos. I'm hoping you were just asking the former! Now I'm worried...

    • @EasyPlay555
      @EasyPlay555 6 ปีที่แล้ว

      Ralph S Bacon sir i mean "are you teaching at any school" because I thought you are teacher, I love your work and your videos are great :D sorry for unclear question

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      No need to apologise, EasyPlay! But no, I'm not a teacher at a school (but many, many years ago I nearly was). I'm glad you like my videos, it's nice to have you with me for the journey, thanks for posting.

  • @jesperthulin6422
    @jesperthulin6422 2 ปีที่แล้ว

    Hej ralph. Jeg skriver til dig, fordi jeg har et projekt, er kunne bruge din hjælp.. mvh jesper, danmark

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Hej Jesper, find min e-mailadresse på siden 'Om' på min kanal.