Arduino Uno Tachometer RPM using 3144 Hall Effect Sensor

Here we look at the 3144 hall effect sensor and how it can be used to make a simple tachometer with the Arduino Uno and a 1602 LCD display
A copy of the code and a schematic diagram for this project are included in the shared folder here
drive.google.com/drive/folder...
Files contained are -
SimpleTacho.ino - a text file - can be dowloaded and/or viewed in a normal text editor if required
Schematic_Simple_Tacho....pdf - a pdf of the circuit diagram

Пікірлер: 165

  • @wdwhitmer
    @wdwhitmer4 ай бұрын

    One of the most useful, interesting, and straightforward video. A hidden gem 💎

  • @clockatronic

    @clockatronic

    4 ай бұрын

    Thanks mate, appreciated!

  • @cmccabe3240
    @cmccabe32403 жыл бұрын

    Hay Bruno! Thank you for actually explaining the code. You made a light come on as to using interrupts that I've been struggling with. Thanks,000,000 for helping me understand Arduino code better. - k -

  • @melodicachan
    @melodicachan Жыл бұрын

    la mejor explicacion que encontre, ademas fue entretenido y con ejemplos reales

  • @XenonJohnD
    @XenonJohnD11 ай бұрын

    Thanks. Just used this in combination with a switec micro-stepper motor wired directly to 4 of the other pins so the same Arduino Nano now also drives a dial pointer on an antique RPM gauge for a hot rod. Whole assembly contained inside the original gauge housing, just plug in a USB lead for power from a phone power bank and can also use it for debugging. Really neat.

  • @clockatronic

    @clockatronic

    10 ай бұрын

    Great idea, thanks for sharing!

  • @charlesgunzelman3323
    @charlesgunzelman3323 Жыл бұрын

    Thanks a ton for this video. The LED indicator trick helped me determine 2 of the 3 Hall sensors in my 13kw PMAC motor's Encoder circuit were bad.

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Thanks Charles, much appreciated that you took time out to share that. Always gives me a buzz to hear how the videos might be of help to anyone.

  • @Nordic_Goon
    @Nordic_Goon Жыл бұрын

    Awesome explanation of this particular hall effect sensor. This should get me up and running on a lathe I'm converting to CNC. ***EDIT*** It worked perfectly. I have one of these sending 1 pulse per revolution on my lathes spindle to LinuxCNC as my index phase since my encoder is mounted 3:1 gear ratio with pullies due to size constraints and not being able to fit another pulley the size of the spindle inside the cover. This resulted in the index pulse being sent 3 times per rev, which can't be corrected in the LinuxCNC HAL file. This worked out so perfect. Thanks for the clear details on everything.

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Great stuff Master, thanks for sharing. Delighted it's found a use in your workshop!

  • @zezeA380
    @zezeA3803 жыл бұрын

    Very nice! Very detailed and explained tutorial, easy to understand! Thank u

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Glad it was helpful!

  • @claudeschrader6537
    @claudeschrader65372 жыл бұрын

    Clear and easy to understand video.

  • @rolandberendonck3900
    @rolandberendonck390010 ай бұрын

    What a lovely video. I subscribed and looked for any other video's because you are really entertaining and creative. And then I noticed you only uploaded three video's. I am sure people, including me, would really like to see more of your type of content. Cheers mate 👍

  • @clockatronic

    @clockatronic

    10 ай бұрын

    Thanks @rolandberendonck3900 , I appreciate the encouragemen to think again about more videos. In fact I have uploaded more, but they're embarrassingly bad, attracted almost zero views so I've made them unlisted. But for sure, this tacho video has done unexpectedly well so publishing more videos is certainly a very tempting option in the future at some point - and I do have a few ideas. But right now my time is devoted to my psychedelic healing online presence (utube channel - www.youtube.com/@MintyLoveDMT/videos ) and Discord. However, it as I say, it certainly remains an option to resurrect the Clockatronic thing, and potentially a lot less hassles involved! All the best!

  • @rolandberendonck3900

    @rolandberendonck3900

    10 ай бұрын

    @@clockatronic Thank you for your answer and I will have a look at your other channel too than. I myself am trying to get more acquainted with PID controlling. That's why I had so much fun when you used a simple lettuce centrifuge for your project 😂

  • @longdo2078
    @longdo20782 жыл бұрын

    excellent! It's very useful for measuring rpm

  • @jlucasound
    @jlucasound Жыл бұрын

    I like your dedicated bread board LED with built in resistor and jumper lead extensions. I have not seen that yet. I will definitely be making one. Thank You. You get a Thumbs Up and a Sub for that!! 😁

  • @BETA3605
    @BETA360510 ай бұрын

    Wonderful video. We'll done. Great application of HALL sensor

  • @christopherlarson9212
    @christopherlarson92122 жыл бұрын

    Great video! Simplest explanation of this use case.

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Thanks mate, appreciate the kind words. If I had more comments like yours I'd definitely be tempted to bring this channel back from its current mothballed state and get it back to life again. But TBH I'm getting far better vibes on my other channel (about psychedelics) here kzread.infovideos Best wishes, speak soon.

  • @conversationwithgod272
    @conversationwithgod272 Жыл бұрын

    Nice explanation...great effort..you are great.Thanks

  • @jmemusic
    @jmemusic2 жыл бұрын

    Nice video, thanks for sharing. I was looking how those sensors are used to detect speed and your video showed it nicely. In the future, I would like to modify some organ pedals I have and somehow measure the speed that the person operating them uses to touch the pedals. This is translated as the volume of the note.

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Sounds like an interesting project.

  • @akikhan45
    @akikhan45 Жыл бұрын

    Thank you for helping me understand, i am working on arduino with some sensors. But i got stuck in codes logic, your explanation help me understand everything. Lol Now i feel that have information sensor in my mind that illuminate with your video.

  • @clockatronic

    @clockatronic

    10 ай бұрын

    Glad it helped

  • @StigBSivertsen
    @StigBSivertsen2 жыл бұрын

    Awesome! I will use this to build a windlass anchor chain counter for my boat :-)

  • @occrc3333
    @occrc3333 Жыл бұрын

    I want to use a similar setup for a Arduino based RC car. Great video

  • @AvrCdavr
    @AvrCdavrАй бұрын

    This was very useful. Ive been trying to find out a way to convert one complete rotation of my stationary bikes wheel into 1 mouse click and this seems like a great way to do it.

  • @Steinersgarage
    @Steinersgarage2 жыл бұрын

    I will use this knowledge for my HUD that i want to make for my car

  • @reverendlawrence7584
    @reverendlawrence75843 жыл бұрын

    Great video very informative thank you

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Glad it was helpful!

  • @FPChris
    @FPChris11 ай бұрын

    Awesome video. A great help

  • @variacenavsiav9945
    @variacenavsiav99452 жыл бұрын

    Thank you for great tutorial.

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Glad you liked it

  • @tonyfremont
    @tonyfremont5 ай бұрын

    You really did a good job on this video. If you'd like, I can give you some code that uses the input capture feature of the Arduino. This ability, takes snapshots of the timer register, every time the pin gets a pulse. In the ISR, it only copies the timer value to a circular queue, after calculating the difference from the last pulse value. This means the queue contains period timings, in microseconds usually, but you can get to about 125nS resolution, iirc. At main level, you just pull entries from the queue at your leisure (reasonably, the queue is only so big). The mathematical inverse of the period time is revs per second, just multiply by 60 to get RPM. These measurements are sub microsecond and perfectly measured by hardware, even if you're in the middle of another ISR, it still takes the snapshot right when the pulse edge occurs. Its a great feature of the atmega chips (and others), but the Arduino framework doesn't use it, because it precludes the use of a couple of PWM pins. If you can live with that, its the absolute best way to take precision measurements of pulse timings. Input Capture is the way to fast RPM updates and precision accuracy. Theres a little more to it, like it uses pin 9 for the input pulse pin, you cant change that. Timer overflows occur every 32mS, so that's handled by another ISR for really long pulses. The capture ISR factors in the rollovers when it's calculating the time interval since the last pulse interrupt. I wrote the code about 15 years ago, so ill have to dig up a copy. Its not much, just some register manipulation in setup() and some in the interrupt handlers, but its really small code and lets you capture pulses as short as 15-20uS, yes microseconds, not millis. delay() and millis() are okay for many things, but precision isn't one of them. Edit: I'd really like to see this method documented in a KZread video, but I'm not gonna make one. 😊 I did it for some guy on the Arduino forum wayyy back. People rarely suggest it, though it's the most accurate way, and very little coverage of using it on Arduino exists on KZread, that I know of anyway. I first did this with a pic chip about 20 years ago, to time mechanical clocks and watches. I wanted serious accuracy, and this is how you get that. I would be more than willing to talk to you about it further, if you're interested. For all I know you already know all this, but wanted to keep it simple, and I'm making a complete fool of myself. ;-)

  • @clockatronic

    @clockatronic

    5 ай бұрын

    @tonyfremont Thanks Toni, much appreciated. In fact this is the first I've heard of this input capture thing, so if you have some example code I can look at I'd certainly be interested. Maybe a link to a shared drive, or you can send me a mail on mintylove45a@gmail.com if it's more convenient. As regards a video about input capture, well no promises but if it fills a gap in the usual utube arduino references then this is something that might well induce me to launch another. As you can see, I've mothballed the Clockatronic channel at the moment, most of my time goes into another channel unrelated to electronics, but it'd be good to put out a video here every now and then. So yes, thanks again and loom forward to hearing more.

  • @tonyfremont

    @tonyfremont

    5 ай бұрын

    ​@@clockatronicI tried posting a link to it, but KZread removed the comment. So I sent you an email. :-)

  • @tonyfremont

    @tonyfremont

    5 ай бұрын

    ​@@clockatronic #include "Arduino.h" volatile unsigned t1captured = 0; volatile unsigned t1capval = 0; volatile unsigned t1ovfcnt = 0; volatile unsigned long t1time; volatile unsigned long t1last = 0; #define BUFFER_SIZE 32 volatile unsigned long int buffer[BUFFER_SIZE]; volatile byte head = 0; volatile byte tail = 0; void setup() { Serial.begin(9600); TCCR1A = 0x0; // put timer1 in normal mode TCCR1B = 0x2; // change prescaler to divide clock by 8 // clear any pending capture or overflow interrupts TIFR1 = (1

  • @andrewmcivor7265
    @andrewmcivor72652 жыл бұрын

    Good Video. Interrupts on arduino are not my strong suit. Your explanation will help. I have some vintage dirt bikes that I would like to know the engine speed of and this is an excellent starting point. Thanks again.

  • @MarcoPono
    @MarcoPono Жыл бұрын

    Thank you so much!

  • @striper8400
    @striper8400 Жыл бұрын

    Thanks for the tutorial, helped with my application, I was a little concerned when you fired off the mower with you foot partially under it though.

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Haha, thanks mate. Yes, I didn't even realise I'd done that til afterwards!

  • @wsip82
    @wsip82 Жыл бұрын

    Cool! Well done!

  • @clockatronic

    @clockatronic

    10 ай бұрын

    Thanks!

  • @guillermotierhs6245
    @guillermotierhs6245 Жыл бұрын

    The Best!

  • @johntoe6127
    @johntoe61272 жыл бұрын

    Very nice video. It could have been a lot more exciting though... just after you started the lawn mower with your foot under it!

  • @MintyLoveDMT

    @MintyLoveDMT

    2 жыл бұрын

    Maybe I'll save the toe-chopping for part two!

  • @waliedemarah5835
    @waliedemarah58353 жыл бұрын

    Good work I hope it works with me.

  • @mikesmobileroadshow8087
    @mikesmobileroadshow80873 жыл бұрын

    That was dead on. Mowers run at 3000 to 3500. Great video

  • @jamnagarlos2944

    @jamnagarlos2944

    3 жыл бұрын

    What is that sound

  • @Edmorbus
    @Edmorbus Жыл бұрын

    thanks for sharing

  • @clockatronic

    @clockatronic

    10 ай бұрын

    My pleasure

  • @geoffkelland5606
    @geoffkelland56062 жыл бұрын

    Nice!!

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Thank you! Cheers!

  • @tannermolitor9371
    @tannermolitor93713 жыл бұрын

    great video

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Glad you enjoyed it

  • @tannermolitor9371

    @tannermolitor9371

    3 жыл бұрын

    @@clockatronic is there a way to convert this over to the serial print function? I tried to just get rid of the lcd stuff, but that didnt work

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Just about to go out, but you could try this if you like. Haven't tested it, but if you'd like to paste it in the place of the existing code and let me know if it works OK. Apologies if it doesn't, my arduino is buried in a heap of electronic gizmology at the back of a cold garage. float revolutions=0; int rpm=0; // max value 32,767 16 bit long startTime=0; long elapsedTime; void setup() { Serial.begin(9600); pinMode(2, INPUT_PULLUP); // set pin to input } void loop() { revolutions=0; rpm=0; startTime=millis(); attachInterrupt(digitalPinToInterrupt(2),interruptFunction,RISING); delay(1000); detachInterrupt(2); //now let's see how many counts we've had from the hall effect sensor and calc the RPM elapsedTime=millis()-startTime; //finds the time, should be very close to 1 sec if(revolutions>0) { rpm=(max(1, revolutions) * 60000) / elapsedTime; //calculates rpm } String outMsg = String("RPM :") + rpm; Serial.println(outMsg); } void interruptFunction() //interrupt service routine { revolutions++; }

  • @tannermolitor9371

    @tannermolitor9371

    3 жыл бұрын

    @@clockatronic This worked the best of any I've tried, I adjusted the interrupt time to 5000 and the "*60000" to "*18000" to get a semi accurate reading. It was originally spiting out numbers in the 10s of thousands that's why I adjusted to 18000, and the readings were very different from one to the next so that's why I adjusted to 5000. I'm not sure why 18000 worked but its at least giving me an idea, I'm really only measuring a motor that maxes out at about 375rpm . Thanks for all your help, I really appreciate you donating your time, it made my day better.

  • @c4fishfood
    @c4fishfood3 жыл бұрын

    Can you use a pair of unipolar sensors to detect direction of rotation? I have seen/read about the arrangement of using two Hall effect sensors at a specific spacing on a ring of magnets (or ring with a circular pattern of N/S), but I’m not certain if this can be done with a simple unipolar sensor or something more complex

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    I think the answer would probably be yes, but if you can give me a a specific example of a unipolar sensor then maybe it's something we could look into.

  • @oswaldocunha9455
    @oswaldocunha9455 Жыл бұрын

    Hi ! Very creative demonstration congratulations. I am trying do use an inductor combined with 3144 to create an output when much than expected current flows trough this bobin . Initial tests (with a powerful magnet ,shows that minimum lag is 1,20 mseg wich is to long for my application ,Would you have some solution to minimize this time ?

  • @madjidgacem5474
    @madjidgacem54743 ай бұрын

    Excellent video, do you think such a component can stand a car engine temperature, in case i place it inside a car distributor ?

  • @fakhrinshamsudin5713
    @fakhrinshamsudin57132 жыл бұрын

    Hi Sir, can i just use 12V supply to the hall effect sensor instead of 5v?

  • @pb6198
    @pb61982 жыл бұрын

    Hmm, very useful, but how would you do this without delays. I need to read multiple hall effect senors at a high rate

  • @Xavi-Tenis
    @Xavi-Tenis51 минут бұрын

    thanks!

  • @SlotSpoilsSlotCarTracksi-hb5ml
    @SlotSpoilsSlotCarTracksi-hb5ml2 ай бұрын

    Hello, thanks for the vid, would the sensor work if placed near a spinning 12v small motor ? thanks in advance

  • @IH1940HAY
    @IH1940HAY2 жыл бұрын

    I find dozens of wiring diagrams for connection to an ardino but none for connecting to a mach 3 BOB, is that they cannot act like a Normally Closed switch, or they just don’t work on my type system. I really need a wiring diagram for my system. Thanks.

  • @DiscoGreen
    @DiscoGreen2 жыл бұрын

    I orders 20 of these on amazon... I'm going to see if I can use a tiny rare earth magnet on my rotor in the distributer for the 3144 to detect. I want to datalog rpm but the MSD has a 12v tach wire

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl Жыл бұрын

    Thank You, for the tutorial. Is it possible to measure the presence of 220 volts using the hall effect sensor?

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Not that I know of Tom Tom. As I understand it, non-switching hall effect sensors can be used to measure DC current as on some clamp multimeters, I'm not familiar with whether this same thing can be achieved with AC.

  • @3216ben1
    @3216ben1 Жыл бұрын

    What if I want a faster refresh as 1 second isn't that great, also what if I use more than one magnet (exactly on the other side of rotating thing) What do I need to change in code for that to happen? I plan on using 4 magnets and 150 delay seems pretty smooth, not sure about the mathematics on how to correctly change numbers

  • @RahulSingh-fl6bf
    @RahulSingh-fl6bf Жыл бұрын

    Great video! Does anyone know what strength/type of magnet I should use? I plan to drill a magnet into a skateboard wheel to measure rpm

  • @fn22739
    @fn2273910 ай бұрын

    Hey man, I was going to ask if I could use the code in your video for a arduino mph speedometer im working on and upload a video on it using your code for the rpm? Thanks.

  • @clockatronic

    @clockatronic

    10 ай бұрын

    Hi mate, I don't think you need my permission, but in any case I have no objections at all, just pleased that it's being put to good use. Good luck with the video!

  • @zyroxiot9417
    @zyroxiot9417 Жыл бұрын

    👍🏼🇧🇷

  • @sammin5764
    @sammin57642 жыл бұрын

    🎖🎖🎖🎖🎖

  • @gerardogama6045
    @gerardogama60452 жыл бұрын

    Does that apply with the ss41 sensors?

  • @dreamfly555
    @dreamfly5552 жыл бұрын

    Don't you need the "volatile" modifier for the interrupt changed variable?

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Not a bad point, and looking at the Arduino documentation, we could certainly be led to that exact conclusion, but I can assure you the code worked perfectly well as shown. In a previous project (an infra-red interface to set a clock) the interrupt code only actually started to work when I actually removed the "volatile" so it then became a habit to only use it became absolutely necessary. I should add that this was several versions of the IDE previously so things may be different now - maybe there was some sort of bug in it, or maybe the volatile mod is something that was/is not well supported by the compiler who knows!

  • @dlouhyjohnny6810
    @dlouhyjohnny68109 ай бұрын

    Hi this is perfect, however i have one issue with it. Since it only takes measurement every second it doesnt rly represent perfectly the actual real time spinning speed. And if i take a measurement every 0,5s then it wouldnt be accurate. So i was thinking, do you have an idea on How we could use this maybe with another hall sensor on the opposite side of the wheel so that we can take measurements more often ? And How would the code have to be changed if we added the second sensor. Thanks for replies !

  • @dlouhyjohnny6810

    @dlouhyjohnny6810

    9 ай бұрын

    We could probably Just measure it the same way we are doing now and add both halls together But then devide by two so lets Say it measures 4000 magnet passes every minute so we would devide that by two to get 2000rpm. The benefit of this would be that we could count more often which would help quite a lot on a big wheel like a 20inch or more. Especially with 2,3,4 or even more hall sensors (But maybe theres an even better way i havent thought of so feel free to reply)

  • @clockatronic

    @clockatronic

    9 ай бұрын

    @dlouhyjohnny6810 Well sounds like you're thinking and coming up with some interesting ideas, so good work on that - and thanks for sharing your ideas. I wonder if instead an extra hall sensor, an additional magnet on the wheel which might simplify any software changes. I think the limiting factor will be the ability of the arduino to keep up with the twice-per-revolution interrupt calls, so perhaps a faster board (like the ESP-32 which can also be programmed with the Arduino IDE) might be better suited. But you're absolutely correct of course, the emphasis on this tacho is simplicity and in truth it could be improved in many ways to suit individual applications. Thanks again!

  • @gerrys6265
    @gerrys62652 жыл бұрын

    Is there a way to convert counts to rpm on a display without an arduino? Everyone uses arduinos but you can buy very small tachometers that obviously do not have an arduino inside? Thanks for the great videos.

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Yes of course. In fact such a device would be a fairly straightforward project and almost certainly perform far better than the Arduino, as the hardware logic would cover a far wider range of RPM without running into the limitations of a CPU processing speed. When I worked in the trade, hardware design was the only way that certain front-end high speed signals could be processed. At the time, using software simply wasn't an option as the computing power wasn't economically viable.

  • @gerrys6265

    @gerrys6265

    2 жыл бұрын

    @@clockatronic Thanks very much for the response. I am no electronics wiz and have been looking for a schematic or instruction on how to do this for some time....any suggestions? Cheers G

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    TBH mate, if it were me I'd do my best to avoid designing and building from scratch if I could as it could be quite a challenge to get it miniaturised and economically credible. As you say, with a bit of searching you might be able to find something on Aliexpress or one of the other Chinese "Ebay"s. But if you want to do this as a hobby project and without a micro controller then realistically it would be useful to have some knowledge of logic electronics. Google is your friend here and there are some amazing online circuit design tools to get you started, like www.circuitlab.com/ I'd be quite happy to provide a bit of assistance, but bear in mind this Clockatronic channel has been mothballed for ages because I'm concentrating on my other psychedelics channel (Minty Love) which is taking up every bit of spare time. If I ever get tired of being Minty Love, I'll revive this channel and put out a bit more content. Sorry if that's not much help Brother!

  • @chartreuse.o..3
    @chartreuse.o..3 Жыл бұрын

    Thank you for your work ! However I have some questions because I did not manage to make my system work : I need to calculate the speed of a RC car so i have to measure the rpm of one wheel.... I took your codes with a Arduino uno, and a ST022 Hall effect module, I followed the cable connections. The program is charged in the card. I put a magnet on the wheel, made it spinning while placing the sensor close to it. But nothing it coming out of it : the serial monitor returns me " RPM : 0 ". I've tried both sides of the sensor but nothing changed. I hope you can help me

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Hi Anton, sorry to hear that. I'm not familiar with that hall effect module - would you be able to post a link to it? Or if the comment containing the link gets removed by utube, perhaps a fuller description so I can take a look.

  • @chartreuse.o..3

    @chartreuse.o..3

    Жыл бұрын

    @@clockatronic thanks for your answer, I finally tested the sensor with a multimeter connected to its ground and the output and it seems that this is the sensor itself that is not working... Have a nice day

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Good work!

  • @doliwsef
    @doliwsefАй бұрын

    As someone who doesn't know much about electronics, I understood the function. However, I have a further problem. I need a 0 to 10V signal to control a diesel engine. No speed 0V 4000 revolutions 10V. Can you tell me how I can make this happen?

  • @KDawgHere
    @KDawgHere3 жыл бұрын

    Does it matter which pole is facing the sensor? Will the led light up no matter which pole is facing sensor?

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Not a bad question actually. The 3144 is a unipolar device, meaning that a single magnetic South pole is used to both latch and release it. Bipolar devices are also available - for example the 3134. Bipolar digital sensors need a South pole of a magnet to latch and North pole to release them. There's a really good article here which explains this quite well uk.rs-online.com/web/generalDisplay.html?id=ideas-and-advice/hall-effect-sensors-guide

  • @eonreeves4324
    @eonreeves432411 күн бұрын

    you could make ignition timing systems with this

  • @billstalley3638
    @billstalley36382 жыл бұрын

    Thank you great video but how does one get to see the programme, many thanks

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    By looking in the description and clicking on the link.

  • @electronicsideas1361
    @electronicsideas13613 жыл бұрын

    yes exit status 1 #include expects "FILENAME" or

  • @electronicsideas1361

    @electronicsideas1361

    3 жыл бұрын

    @@clockatronic ok I send

  • @shivaanharishun8617
    @shivaanharishun86173 жыл бұрын

    Hi Sir - Wanted to just ask, do I have to use a 3144 Hall-effect Sensor or can I use a different type as I cannot locate a 3144 hall effect sensor in my country. If I use a different type will it still work? Thank you in advance sir

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Hi Shivaan, Yes, I guess there should be a variety of alternatives. I guess the main thing is that this application would suit a digital hall effect sensor rather than an analogue one. In other words a sensor that switches either it's logic 0 and 1 suddenly, rather than one that varies linearly in response to a varying magnetic field. Both types exists. Are you sure that you can't obtain a 3144? If you have an Arduino, then one would assume that the 3144 or a rebadged identical is easy to find? But if you definitely can't find a 3144, do you have a list of possibles that you were thinking of? Happy to take a look and let you know - just post them here. Best wishes and good luck!

  • @shivaanharishun8617

    @shivaanharishun8617

    3 жыл бұрын

    @@clockatronic Hi sir . Thank you so much for your reply . I truly appreciate it. I have tried and searched extensively for that type of hall effect sensor but couldn't find it. I did however find a digital one as you said. Here is the one i found www.diyelectronics.co.za/store/other-sensors/1509-hall-effect-magnetic-sensor-module-digital.html?search_query=Hall+Effect+Sensor&results=17 . I just wanted to ask whether it can be connected in the same way you have yours connected? Also sir , i want the display to he on my computer and not on an LCD display. In what way will i need to change the sketch? Thank you again in advance. Have a good one. Much appreciation

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Shivaan, I would expect the sensor you linked would in fact work. Just connect the 'S' pin of the sensor to digital pin 2 of the Arduino, the '-' pin to GND and the middle unlabeled pin to +5V. Double-check before powering up. No guarantees - but it looks like it'd be fine to me - that link seems to show a digital hall effect module with a pull-up resistor and an on-board LED maybe. Regarding the second part of your question, to get the printout on the computer, you can do the following - add the line Serial.begin(9600); to the setup() function - add the line Serial.println(outMsg); as the last line of the loop() function Then once the program is running, start the serial monitor with "Tools", "Serial Monitor". Of course, you might have to select the correct port - COM10 or whatever "Tools", "Port". Obviously, rf you wish you can remove all the lines related to the LCD display. I haven't tested any of the above, other than a cursory check that the new code complies OK. But it should be OK. Give me a another shout if you run into problems or have any more questions. Best wishes and good luck.

  • @fredbloggs1993

    @fredbloggs1993

    3 жыл бұрын

    plenty selling on ebay

  • @ezyhobby4889
    @ezyhobby4889 Жыл бұрын

    nice video.. but i need more of it. lets say I want to maintain the RPM value of the engine. so if the RPM drop below 600 the arduino will command a servo to pull up the throttle. and release the servo if RPM reach above 600. can you help me to program that? thanks in advance

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Well it certainly sounds doable, although in practical terms it might not be a trivial exercise getting it so responds quickly enough but still doesn't overshoot/undershoot, and also maintains a fairly constant RPM without continually "hunting". Apologies, but at the moment I'm afraid I don't really have time for one-to-one assistance. I've done it before from this channel and it can be very interesting, but also extremely time consuming. Maybe one day that will change but for now I'm devoting my time to another different channel. However, I wish you luck!

  • @Slimey3DPrinting
    @Slimey3DPrinting Жыл бұрын

    Hi, i have a question, which parameter should I change in order to put the sensor output on a different pin? (For example 9)

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Good question. Unfortunately we're restricted to connecting the hall effect sensor to the Arduino's interrupt pins, and on the Uno this means either digital pins 2 or 3. If you wanted to change to 2 from 3 then as well as the wiring change just update the following lines so that 2 is replaced with 3 pinMode(2, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(2),interruptFunction,RISING); detachInterrupt(2); I tend to use the Arduino Mega 2560 Pro for most of my projects these days, not only does it have a lot more memory, it has interrupts available on pis 2, 3, 18, 19, and when not used for I2C communication pins 20 & 21. So just a whole lot more versatile. Best wishes!

  • @Slimey3DPrinting

    @Slimey3DPrinting

    Жыл бұрын

    @@clockatronic Thank you so much, I've got a Pro Micro, and i couldn't understand why only those two pins worked. I asked because pins 2 and 3 are the I2C communication pins, and i wanted the sensor on a different pin so that i could use an LCD or an OLES display. I guess I'll just go with an Arduino Uno. Thanks for the info man, keep up the good work 💪

  • @ctrmint
    @ctrmint2 жыл бұрын

    Any idea of the maximum switching frequency of the sensor? Thanks

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Good question. Based upon the rise/fall times as specified on the 3144 datasheet www.digchip.com/datasheets/parts/datasheet/029/3144-pdf.php they should be good for upwards of 100kHz, which would theoretically work out at > 6 million rpm I guess the practical limitation of the setup as covered in the video would be the Arduino, and TBH I'd be surprised it actually read the mower correctly. In fact I still have that mower and have since seen a little sticker on it stating the engine as fixed speed 3000rpm. If there was much interest I could build a simple divide by 10/100/1000 counter to extend the range of this circuit to handle regular motor vehicle and even model car motors etc. Best wishes!

  • @fredbloggs1993
    @fredbloggs19933 жыл бұрын

    Great, could that be placed against the spark plug lead of the lawxn mower to get the same effects instead of using the magnet on the flywheel?

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Yea, I can imagine that being a lot more convenient. My guess is that some sort of interfacing circuit might be needed and of course that might take a bit of research. If you have a go at this, let me know how you get on.

  • @dapilot9408
    @dapilot94083 ай бұрын

    Is it possible to use an esp32 instead of arduino uno? If yes can you post a sketch?

  • @MintyLoveDMT

    @MintyLoveDMT

    3 ай бұрын

    Yes, I imagine an ESP-32 would have a much higher measurable range than an arduino, what with having a much higher clock speed. When I next get one of my ESP32s out I'll knock up a sketch and publish it. Right now this utube channel is somewhat mothballed as I have another and online presence that is taking up all my time. But one day....

  • @michaelshakib7777
    @michaelshakib77772 ай бұрын

    I want to try and use this to detect if my generator has started. Using AC out isn't suitable for my situation so this just might work!

  • @florin3161
    @florin31613 жыл бұрын

    Hi how many max rpm can this read Thank you for your work is very good...

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Good question actually Flo. I've never really tested it, but suspect the answer is probably not a lot more than the 3000ish that the mower shows. To read much more I suspect we'd need either a faster processor, or maybe a 74 series divide by 10 counter on the input arduino input pin. And TBH, if it were me I'd probably think about using an optical sensor rather than a hall effect - so that there's no need for a spinning magnet. Why do you ask, do you have a particular application in mind?

  • @12dj6

    @12dj6

    2 жыл бұрын

    @@clockatronic you can measure the voltage on the spark plug, then there is no spinning magnet

  • @legoother5685
    @legoother56852 жыл бұрын

    serial output only displays 0 RPM even when there is a magnet that passes by, does this code need to display to an LCD to work?

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    I doubt the lack of LCD would affect the serial out, but you could try this code which has the lcd bits removed drive.google.com/file/d/1iJWHJFSLUtu50hzDlLglXX5rF6P_0tSE/view?usp=sharing

  • @legoother5685

    @legoother5685

    2 жыл бұрын

    @@clockatronic Don't know why or how, but now it works! Thank for the great tutorial, it is interesting why it does that...

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Just to confirm Brother, does the original code now work without your LCD display or the new code (as I linked in my previous comment) ? Thanks

  • @Ke3per88
    @Ke3per883 жыл бұрын

    As far as I know these little guy are accurate up to 320,000 pulses per second. ~~

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Goodness, that's rapid. Makes you wonder at way point the Uno would fail to keep pace. Best wishes!

  • @lorenzoaccetta3618
    @lorenzoaccetta36183 жыл бұрын

    Hi, I've just replicate your project and it works, but i need your help. I wanted to measure the rpm of my dirtbike but unluckily the rotor has a pair of magnets instead of one. I've tried to modify the code changing the value 60000 and putting 30000 instead on : ' rpm=(max(1,revolutions) * 60000/elapsedTime;' but it didn't work, it shows me 2000 rpm at idle. I Think the problem is that the magnets are closer to each one, they need to be at 180 degree instead. What I can do? How I can fix my problem? Thank you!

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Hi mate, I've gotta be honest what you did is exactly what I'd suggest but as it doesn't work I'm a bit stuck. And even if you manage to get it working at idle (which would be just over 1000rpm?) I have doubts whether it'd be able to handle the higher RPMs - (probably 6000 or more on your bike?) owing to the modest interrupt capabilities of the Arduino. If it was mine, I'd probably try somehow using an optical sensor (maybe something like this www.farnell.com/datasheets/2243796.pdf ) to trigger the clock input of a decade counter ( e.g a 4017 , see www.electronicshub.org/ic-4017-decade-counter/ or similar) which would divide the incoming pulses by 10 and then one Q output of that driving the input to the Arduino at a rate at which it could easily handle. Then the line would read rpm=(max(1,revolutions) * 600000/elapsedTime; I know the above would be a bit of a faff, but TBH it's the only way I could see it reliably working.

  • @Toni-xc5oh
    @Toni-xc5oh3 жыл бұрын

    hi, I tried the code by inserting the brackets as you said but it keeps giving error

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Can you post your code anywhere so I could take a look?

  • @Toni-xc5oh

    @Toni-xc5oh

    3 жыл бұрын

    @@clockatronic thanks for the timely reply, i can't reply via comments, would you give me your email address?

  • @Toni-xc5oh

    @Toni-xc5oh

    3 жыл бұрын

    @@clockatronic THANK YOU so much for your cooperation, I tried now fill out. thank you very much from Italy. good night

  • @vinayaksingh8829
    @vinayaksingh88293 жыл бұрын

    I wanted to measure rpm of 6 .motors.How to do it?

  • @MintyLoveDMT

    @MintyLoveDMT

    3 жыл бұрын

    Hi mate, interesting question, and I can see a number of possible solutions. If I had to do this with a single Arduino, I'd probably use a Mega which has 6 interrupt pins and take readings from them sequentially, say a second on each, during the loop() function. This would mean that the readings would only be updated once every 6 seconds but that's probably as good as you're going to get from a single Arduino. I don't think it would be powerful enough to take all 6 readings together. TBH, I guess it would depend on the maximum expected speed of your motor, and how many arduinos you're prepared to accept.

  • @vinayaksingh8829

    @vinayaksingh8829

    3 жыл бұрын

    @@MintyLoveDMT Actually for arduino due ...will it be able to take all the 6 motor rpm together and generate the value at the same time?

  • @MintyLoveDMT

    @MintyLoveDMT

    3 жыл бұрын

    @@vinayaksingh8829 I've no experience of the Due but I will admit it looks very interesting. Unless it supports multi threading like Java or regular C++, it's unlikely you'll be able to have them apearing together. My guess is that it will boil down to how close together you can tolerate the readings to be updated. Thanks for bringing the Due to my attention and sorry I can't answer your question.

  • @brunoborleri5255
    @brunoborleri52553 жыл бұрын

    Bruno Borleri 1 hour ago My project is an "RPM counter for a 2-speed engine". I tried your program, your project involves only one magnet so 1 lap 1 pulse, I in mine built a rotor with 6 magnets then 1 turn 6 pulses to have more precision, I do not know if this is wrong, I wanted to modify your program but I have no programming experience, if you can indicate the correct way to change ,then I wanted to remove the fractions of 100 RPM,example if I read 12570 RPM I wanted it to be incremented by 100 RPM,example 12400/12500/12600 etc.with an increase or decrease of 100 RPM, the electrical hardware and connections are the same as your project only changes the magnet that I have built with 6 magnets at 60°, thank you if you can help me in editing the program. Bruno Borleri The electrical hardware and connections are the same as yours. Thank you

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Hi Bruno, A simple program mod can be done that will effectively divide your output to give the correct readings.. Remove the line that says rpm=(max(1, revolutions) * 60000) / elapsedTime; //calculates rpm and replace it with this one ... rpm=(max(1, revolutions) * 10000) / elapsedTime; //calculates rpm with 6 inputs per rev The switching rate of the 3144 is 100kHz according to this www.ahest.net/news/a3144-and-a3134-hall-sensor.html which would give a max theoretical of 1 million rpm with your setup, I doubt your motor would be in one piece at even a fraction of that. I also expect that the Arduino can handle the interrupts at that rate but it's something you might want to keep in mind. Have you tried the setup as it stands with your six-magnet rotor? Did the RPM figures come out at something like six times what they should be? And may I ask what sort of motor it is? I'm assuming a lightweight motorcycle?

  • @brunoborleri5255

    @brunoborleri5255

    3 жыл бұрын

    @@clockatronic I have some racing bikes (speed on the track) of Italian construction that I used in the 80s as a junior category rider, the engines are 125 cubic centimeters, they are single-cylinder 2-stroke engines, have from 35 to 44 hp and run from 11000 RPM at 17000 RPM, I don't speak English but I use google translator so the translation is not perfect

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    @@brunoborleri5255 The google translate is working very well, I'd never have known you weren't writing English. Wow, 125cc and 35-44hp? Are your bikes Aprillia? Do you have any ideas on how to provide the power supply for the Arduino from your bike's electrics?

  • @brunoborleri5255

    @brunoborleri5255

    3 жыл бұрын

    @@clockatronichello, I did the test with the modification but it doesn't go well, you continue changes on the display it is probable as you said that the counting frequency with 6 magnets is too much and does not fit in it, today or tomorrow I will redo a rotor with a magnet and try again reporting sketck as you did originally and then let's see how it goes, thanks. Bruno

  • @brunoborleri5255

    @brunoborleri5255

    3 жыл бұрын

    @@clockatronic hello, my bikes are: MORBIDELLI 125 (MBA), ASPES CRITERIUM TROFEO 125, AERMACCHI ALETTA ALA D'ORO 125, ROTAX CAZZANIGA 125, they are the bikes I raced with in the 80s, I wanted to tell you that the RPM rev counter project and 'for an electronic ignition test simulator of motorcycles, I'll explain: I built a mechanical interface installed on the front of the engine starting from a manual milling machine for wood (electric induction motor 20000 RPM) on which I am going to install the electronic ignition of the motorcycle, practically instead of the internal combustion engine that turns the ignition is the electric motor on which I go to adjust the revs with a rheostat and here we need the tachometer to understand what RPM I am working at, then with the help of the stroboscopic gun I go to adjust the ignition advance, in this bike I can put the ignition under stress and also do calibration tests, before I used an induction tachometer with the coil wound on the spark plug wire but it is not accurate and then I wantedmake a small electrical panel with all the controls and the display to make it a little professional, in the future if everything works well I could also think of putting arduino on the bike powered by rechargeable lithium battery to have autonomy of about 2 hours by putting a display I would like to show you some photos but on youtube it is not possible, if you give me emails or whattsaap I can show you. Bruno

  • @tarunalukmanchannel
    @tarunalukmanchannel2 жыл бұрын

    rpm=(max(1, revolutions) * 60000) / elapsedTime; //calculates rpm no matching function for call to 'max(int, float&)' error in arduino IDE version 1.8.13

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    That's odd, it certainly compiles in 1.8.12 , maybe something has changed with 1.8.13. I'll look into it when I have time.

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    I've just updated my own Arduino ide to 1.8.16 and I still can't get it to fail. If you like paste your entire code to me at mintylove45a@gmail.com and I'll see if I can find anything amiss

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    Sorry brother I sent you the wrong email address. Now corrected to mintylove45a@gmail.com (I missed out the 'a') send to this account please!

  • @devpanch1
    @devpanch13 жыл бұрын

    Hi, I've really enjoyed your clear and easy to understand video. I've been searching for some help with a electric motorcycle project I'm working on as a mechancial engineer, but need some help on the electronics and arduino side of things. Would you be interested in some paid work? If so drop me a reply and we can connect. Thank you.

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Sounds interesting. If you'd like to send a mail to xxxxxxxx we can take it from there. Best wishes.

  • @jamnagarlos2944
    @jamnagarlos29443 жыл бұрын

    This is a 5v overide

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    eh?

  • @gojohnnygo6869
    @gojohnnygo68693 жыл бұрын

    Hey, move your toes from under the mower. You're about to loose them.

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Toes make great compost when mixed in with the grass cuttings

  • @gojohnnygo6869

    @gojohnnygo6869

    3 жыл бұрын

    @@clockatronic I don't know if your foot was really that close but from the camera angle it appears so. I appreciate the video. I especially liked the mention and example of the speed that the sensor is capable of. I believe the 10K ohm pull up resistor is only needed if no load is connected. Thanks again, Great video.

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Haha, that's OK and thanks for the info. TBH, I've more or less mothballed this channel in favour of another I started on psychedelics which is doing better. Still, one day I might do a few more Arduino videos, there does seem to be interest out there. Cheers mate catch you soon!

  • @EliSpizzichino
    @EliSpizzichino7 ай бұрын

    I'm sure you did all this to show your wife what real work really is to make a salad! On the serious side I'm wondering if the delay(1000) impacts the performance by not slowing the reading speed

  • @electronicsideas1361
    @electronicsideas13613 жыл бұрын

    COMPILE ERROR

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Are you still having trouble RS?

  • @electronicsideas1361

    @electronicsideas1361

    3 жыл бұрын

    @@clockatronic yes

  • @HassanAhmed-qn1vh
    @HassanAhmed-qn1vh3 жыл бұрын

    It doesn't measure an rpm below 60..

  • @clockatronic

    @clockatronic

    3 жыл бұрын

    Actually, that's not a bad point, how low did you need it to read, Hassan? For example, a quick look at the code would seem that the simple modification of changing the line "delay(1000);" to "delay(6000);" would make it read as low as 10rpm by extending the "sensing period" to 6 seconds. I haven't actually tested this but I'm pretty sure it'd work, let me know if you try it and if it doesn't work we can think again,

  • @DavidLee-it7zl
    @DavidLee-it7zl Жыл бұрын

    Great info. Love your work. I had to add this to the code to get it to work but got it uploaded. Thought id paste it in case you or anyone else needed help. #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) #endif pasted just above the if statement with the max function. Mine wouldn’t compile but the above fixed it. Keep up the great videos. You were super easy to understand and I immediately subscribed. Now let's see if this works.

  • @clockatronic

    @clockatronic

    Жыл бұрын

    Thanks fella, curious that you needed to define the max function, but thanks for sharing your innovative solution. Maybe if you tried #include it might help to get the max() back working who knows. Appreciate the kind words, although I've kinda mothballed this channel in favour of my psychedelics channel at the moment kzread.info . One day I might start making content for this one again as I still have much interest in the subject. Best wishes and thanks again.

  • @Soukri.a
    @Soukri.a2 жыл бұрын

    hi is there an email i can contact you to help on a project ? thank you

  • @clockatronic

    @clockatronic

    2 жыл бұрын

    mintylove45a@gmail.com

  • @arduinomaquinas
    @arduinomaquinas Жыл бұрын

    Nice, very cool❤🇧🇷😉👍 "@arduinomaquinas" thanks you 👏👏👏👏👏👏👏 subscribed