Arduino Uno Tachometer RPM using 3144 Hall Effect Sensor

  Переглядів 97,884

Clockatronic

Clockatronic

3 роки тому

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

КОМЕНТАРІ: 163
@wdwhitmer
@wdwhitmer 2 місяці тому
One of the most useful, interesting, and straightforward video. A hidden gem 💎
@clockatronic
@clockatronic 2 місяці тому
Thanks mate, appreciated!
@cmccabe3240
@cmccabe3240 3 роки тому
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 -
@longdo2078
@longdo2078 2 роки тому
excellent! It's very useful for measuring rpm
@claudeschrader6537
@claudeschrader6537 2 роки тому
Clear and easy to understand video.
@BETA3605
@BETA3605 9 місяців тому
Wonderful video. We'll done. Great application of HALL sensor
@melodicachan
@melodicachan Рік тому
la mejor explicacion que encontre, ademas fue entretenido y con ejemplos reales
@StigBSivertsen
@StigBSivertsen 2 роки тому
Awesome! I will use this to build a windlass anchor chain counter for my boat :-)
@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!! 😁
@zezeA380
@zezeA380 2 роки тому
Very nice! Very detailed and explained tutorial, easy to understand! Thank u
@clockatronic
@clockatronic 2 роки тому
Glad it was helpful!
@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.
@rolandberendonck3900
@rolandberendonck3900 8 місяців тому
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 8 місяців тому
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 8 місяців тому
@@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 😂
@XenonJohnD
@XenonJohnD 10 місяців тому
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 9 місяців тому
Great idea, thanks for sharing!
@christopherlarson9212
@christopherlarson9212 2 роки тому
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 ukposts.infovideos Best wishes, speak soon.
@occrc3333
@occrc3333 Рік тому
I want to use a similar setup for a Arduino based RC car. Great video
@Steinersgarage
@Steinersgarage 2 роки тому
I will use this knowledge for my HUD that i want to make for my car
@conversationwithgod272
@conversationwithgod272 Рік тому
Nice explanation...great effort..you are great.Thanks
@AvrCdavr
@AvrCdavr 4 дні тому
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.
@jmemusic
@jmemusic 2 роки тому
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.
@MarcoPono
@MarcoPono Рік тому
Thank you so much!
@Nordic_Goon
@Nordic_Goon 11 місяців тому
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 10 місяців тому
Great stuff Master, thanks for sharing. Delighted it's found a use in your workshop!
@FPChris
@FPChris 10 місяців тому
Awesome video. A great help
@reverendlawrence7584
@reverendlawrence7584 3 роки тому
Great video very informative thank you
@clockatronic
@clockatronic 3 роки тому
Glad it was helpful!
@variacenavsiav9945
@variacenavsiav9945 2 роки тому
Thank you for great tutorial.
@clockatronic
@clockatronic 2 роки тому
Glad you liked it
@andrewmcivor7265
@andrewmcivor7265 2 роки тому
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.
@tonyfremont
@tonyfremont 3 місяці тому
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 UKposts 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 UKposts, 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 3 місяці тому
@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 3 місяці тому
​@@clockatronicI tried posting a link to it, but UKposts removed the comment. So I sent you an email. :-)
@tonyfremont
@tonyfremont 3 місяці тому
​@@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
@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!
@waliedemarah5835
@waliedemarah5835 2 роки тому
Good work I hope it works with me.
@guillermotierhs6245
@guillermotierhs6245 Рік тому
The Best!
@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 9 місяців тому
Glad it helped
@DiscoGreen
@DiscoGreen 2 роки тому
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
@fakhrinshamsudin5713
@fakhrinshamsudin5713 2 роки тому
Hi Sir, can i just use 12V supply to the hall effect sensor instead of 5v?
@wsip82
@wsip82 Рік тому
Cool! Well done!
@clockatronic
@clockatronic 9 місяців тому
Thanks!
@mikesmobileroadshow8087
@mikesmobileroadshow8087 3 роки тому
That was dead on. Mowers run at 3000 to 3500. Great video
@jamnagarlos2944
@jamnagarlos2944 3 роки тому
What is that sound
@johntoe6127
@johntoe6127 2 роки тому
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!
@pb6198
@pb6198 2 роки тому
Hmm, very useful, but how would you do this without delays. I need to read multiple hall effect senors at a high rate
@Edmorbus
@Edmorbus Рік тому
thanks for sharing
@clockatronic
@clockatronic 9 місяців тому
My pleasure
@c4fishfood
@c4fishfood 2 роки тому
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 2 роки тому
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 11 місяців тому
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 ?
@RahulSingh-fl6bf
@RahulSingh-fl6bf 11 місяців тому
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
@IH1940HAY
@IH1940HAY 2 роки тому
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.
@dlouhyjohnny6810
@dlouhyjohnny6810 8 місяців тому
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 8 місяців тому
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 8 місяців тому
@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!
@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
@tannermolitor9371
@tannermolitor9371 3 роки тому
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.
@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.
@SlotSpoilsSlotCarTracksi-hb5ml
@SlotSpoilsSlotCarTracksi-hb5ml 25 днів тому
Hello, thanks for the vid, would the sensor work if placed near a spinning 12v small motor ? thanks in advance
@madjidgacem5474
@madjidgacem5474 2 місяці тому
Excellent video, do you think such a component can stand a car engine temperature, in case i place it inside a car distributor ?
@geoffkelland5606
@geoffkelland5606 2 роки тому
Nice!!
@clockatronic
@clockatronic Рік тому
Thank you! Cheers!
@KDawgHere
@KDawgHere 3 роки тому
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
@gerrys6265
@gerrys6265 2 роки тому
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!
@gerardogama6045
@gerardogama6045 2 роки тому
Does that apply with the ss41 sensors?
@dreamfly555
@dreamfly555 2 роки тому
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!
@electronicsideas1361
@electronicsideas1361 2 роки тому
yes exit status 1 #include expects "FILENAME" or
@electronicsideas1361
@electronicsideas1361 2 роки тому
@@clockatronic ok I send
@billstalley3638
@billstalley3638 2 роки тому
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.
@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 💪
@shivaanharishun8617
@shivaanharishun8617 3 роки тому
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
@zyroxiot9417
@zyroxiot9417 Рік тому
👍🏼🇧🇷
@fn22739
@fn22739 9 місяців тому
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 9 місяців тому
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!
@ctrmint
@ctrmint 2 роки тому
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!
@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!
@sammin5764
@sammin5764 2 роки тому
🎖🎖🎖🎖🎖
@fredbloggs1993
@fredbloggs1993 3 роки тому
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.
@florin3161
@florin3161 3 роки тому
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
@michaelshakib7777
@michaelshakib7777 24 дні тому
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!
@legoother5685
@legoother5685 2 роки тому
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
@dapilot9408
@dapilot9408 2 місяці тому
Is it possible to use an esp32 instead of arduino uno? If yes can you post a sketch?
@MintyLoveDMT
@MintyLoveDMT 2 місяці тому
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....
@Toni-xc5oh
@Toni-xc5oh 3 роки тому
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
@tarunalukmanchannel
@tarunalukmanchannel 2 роки тому
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!
@Ke3per88
@Ke3per88 2 роки тому
As far as I know these little guy are accurate up to 320,000 pulses per second. ~~
@clockatronic
@clockatronic 2 роки тому
Goodness, that's rapid. Makes you wonder at way point the Uno would fail to keep pace. Best wishes!
@vinayaksingh8829
@vinayaksingh8829 3 роки тому
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
@brunoborleri5255 3 роки тому
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
@lorenzoaccetta3618
@lorenzoaccetta3618 3 роки тому
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.
@devpanch1
@devpanch1 3 роки тому
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
@jamnagarlos2944 3 роки тому
This is a 5v overide
@clockatronic
@clockatronic 3 роки тому
eh?
@gojohnnygo6869
@gojohnnygo6869 3 роки тому
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
@EliSpizzichino 5 місяців тому
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
@electronicsideas1361 3 роки тому
COMPILE ERROR
@clockatronic
@clockatronic 2 роки тому
Are you still having trouble RS?
@electronicsideas1361
@electronicsideas1361 2 роки тому
@@clockatronic yes
@HassanAhmed-qn1vh
@HassanAhmed-qn1vh 3 роки тому
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 ukposts.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.a 2 роки тому
hi is there an email i can contact you to help on a project ? thank you
@clockatronic
@clockatronic 2 роки тому
mintylove45a@gmail.com
@arduinomaquinas
@arduinomaquinas 11 місяців тому
Nice, very cool❤🇧🇷😉👍 "@arduinomaquinas" thanks you 👏👏👏👏👏👏👏 subscribed
HALL Effect SENSORS - Linear,UniPolar,BiPolar
11:52
Saravanan AL
Переглядів 75 тис.
Arduino Tutorial: Tachometer (RPM Counter)
3:54
InterlinkKnight
Переглядів 263 тис.
NO NO NO YES! (40 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:27
PANDA BOI
Переглядів 91 млн
"Поховали поруч": у Луцьку попрощались із ДВОМА Героями 🕯🥀 #герої #втрати
00:15
Телеканал Конкурент TV - новини Луцька та Волині
Переглядів 91 тис.
Hall effect sensor tutorial - 3D printer end stops
15:27
bitluni
Переглядів 134 тис.
Using a Hall Effect Sensor to Make a Tachometer
45:25
Craig Hollinger
Переглядів 164 тис.
How to Build a LASER TACHOMETER
5:35
Elite Worm
Переглядів 37 тис.
What is Hall Effect and How Hall Effect Sensors Work
3:51
How To Mechatronics
Переглядів 1,8 млн
We should use this amazing mechanism that's inside a grasshopper leg
19:19
Hall Effect Speed Sensors Explained
10:21
Rail Academy
Переглядів 10 тис.
How to use rotary encoders
14:12
FriendlyWire
Переглядів 23 тис.
inventor aw - This Device is very helpful ,, you can make at home
6:47