Fidget Spinner Tachometer, Revolution and Time Counter using Arduino and Hall effect sensor

preview_player
Показать описание
Another simple weekend project ...

Parts:
- Arduino Pro Mini
- I2C OLED display
- A3144 Hall effect sensor
- Neodymium magnet for spinner

Features:
- 4 values are displayed: rotation counter, RPM, max RPM and time of rotation
- results are kept on the display until new rotation starts
- interrupt is used for accurate measurement (pin 2, interrupt 0)
- my own old OLED lib is used with companion of fast software I2C library
- any pins can be used for SDA and SCL
- however regular hardware I2C can be used too, just set "USEHW 1"

Source code:
Рекомендации по теме
Комментарии
Автор

Ciao ho visto sul canale dell'architetto che commentavi il suo video sull'oled e descrivevi il tuo.
È molto interessante e sarebbe ciò che cercavo,
Si può avere il file del tuo codice??
Grazie anticipatamente

maxallievi
Автор

Hi and thank you.
Can I use NJK-5002C which is normally open instead of a3144 ?

batticha
Автор

good work! Have you tested A3144 with high-speed rotating object (e.g. 200 RPM) constantly for a minute ? just curious about how accurate it is . I'm looking for the most appropriate one for my robotic car project, thanks

metalalive
Автор

this is a very good project... except for the novice user, i cant install the libraries and therefore cannot run your code...
just a little more effort would have made this a great tutorial...

thanks for the time tho..

deletedmediatj
Автор

can u make a code just for the rotation counter and the timer with button for reset thanks

ThePawel
Автор

Great video, I have used your code in my Coil winder project. Can be seen on my channel in next couple of days. Thanks and keep up good work

Telboy-fvke
Автор

Nossa Fantástico!!!! pra quem ta começando a programar com arduino, esse código ajuda bastante, alem de ter umas funções muito

CarlosFilmagem
Автор

Hi, I have a problem when I detect the magnet I have to rotate it and bring it close again that the sensor can detect the other side and after that I can detect the original side of the magnet. So I need to constantly rotate the magnet for the sersor to be able to detect it. Can you please help me?

TheThalorn
Автор

I'm having Ardunio Nano and 0.96 OLED display 7 pin. How I can measure RPM of Hard Drive Motor? Can you guide me?

bgphysics
Автор

Thanks for the video, it is a great starting point for my project. May I know how I may refresh the Max RPM whenever a new rotation start?

wilbertyuen
Автор

Thanks for the Video, great base for further challenges .However when I try to Compile for Arduino Nano, it gives an error at "i2c_start(i2cAddr<<1 | I2C_WRITE);" ( for me this is line number 249) this line saying 'I2C_WRITE' was not declared in this scope, I am using IDE 1.8.13 any thoughts Cheers

nick-qwzh
Автор

if I use

#define USEHW 0 // 0 - use fast softi2c, 1 - use hw implementation on A4 / A5

why in compilation do I have these error messages?

Arduino:1.8.4 (Windows XP), Scheda:"Arduino/Genuino Uno"

In file included from C:\Documents and

sketch\OLED_SoftI2C.h: In member function 'uint8_t OLEDSoftI2C::printChar(uint8_t, uint8_t, uint8_t)':

OLED_SoftI2C.h:85: error: 'I2C_WRITE' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:85: error: 'i2c_start' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:86: error: 'i2c_write' was not declared in this scope

i2c_write(OLED_DAT);

^

OLED_SoftI2C.h:90: error: 'i2c_stop' was not declared in this scope

i2c_stop();

^

sketch\OLED_SoftI2C.h: In member function 'void

OLED_SoftI2C.h:131: error: 'I2C_WRITE' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:131: error: 'i2c_start' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:132: error: 'i2c_write' was not declared in this scope

i2c_write(OLED_DAT);

^

OLED_SoftI2C.h:134: error: 'i2c_stop' was not declared in this scope

i2c_stop();

^

sketch\OLED_SoftI2C.h: In member function 'void OLEDSoftI2C::writeCmd(byte)':

OLED_SoftI2C.h:146: error: 'I2C_WRITE' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:146: error: 'i2c_start' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:147: error: 'i2c_write' was not declared in this scope

i2c_write(OLED_CMD);

^

OLED_SoftI2C.h:149: error: 'i2c_stop' was not declared in this scope

i2c_stop();

^

sketch\OLED_SoftI2C.h: In member function 'void OLEDSoftI2C::init()':

OLED_SoftI2C.h:159: error: 'i2c_init' was not declared in this scope

Serial.println(i2c_init() ? F("SoftI2C initialization done") : F("SoftI2C initialization error. SDA or SCL are low"));

^

sketch\OLED_SoftI2C.h: In member function 'void OLEDSoftI2C::fillWin(int, int, int, int, int)':

OLED_SoftI2C.h:198: error: 'I2C_WRITE' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:198: error: 'i2c_start' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:199: error: 'i2c_write' was not declared in this scope

i2c_write(OLED_DAT);

^

OLED_SoftI2C.h:201: error: 'i2c_stop' was not declared in this scope

i2c_stop();

^

sketch\OLED_SoftI2C.h: In member function 'void OLEDSoftI2C::clrScr()':

OLED_SoftI2C.h:218: error: 'I2C_WRITE' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:218: error: 'i2c_start' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:219: error: 'i2c_write' was not declared in this scope

i2c_write(OLED_DAT);

^

OLED_SoftI2C.h:221: error: 'i2c_stop' was not declared in this scope

i2c_stop();

^

sketch\OLED_SoftI2C.h: In member function 'void OLEDSoftI2C::drawBitmap(const uint8_t*, uint8_t, uint8_t, uint8_t, uint8_t)':

OLED_SoftI2C.h:249: error: 'I2C_WRITE' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:249: error: 'i2c_start' was not declared in this scope

i2c_start(i2cAddr<<1 | I2C_WRITE);

^

OLED_SoftI2C.h:250: error: 'i2c_write' was not declared in this scope

i2c_write(OLED_DAT);

^

OLED_SoftI2C.h:253: error: 'i2c_stop' was not declared in this scope

i2c_stop();

^

exit status 1
'I2C_WRITE' was not declared in this scope


Thanks

consiglioiannuzzi
Автор

Thanks for this, just what I was looking for to hack my Ebike.

leeharrington
Автор

pleas can you help me with this error SoftI2CMaster.h: No such file or directory and I can not find it on libaray.

phoenix
Автор

please can you show me how to connect seonsor with arduino. If you can, I wanna see a entire connection picture.

honggree
Автор

Hi, anyone can help me? I want to add a feature to reset the counter with a button instead of when it stops spinning. Thank you.

TheLukinho
Автор

Zrobiłłem sobie kiedyś dongla IR do telefonu (ledy podłączone przeciwsobnie L-R do jacka). Użyłem go niedawno do pomiaru prędkości spinnera, bo LED-y działają jako fotodiody. Do tego latarka oraz Audacity i mamy pomiar .. Bez magnesów, które sprawiają problem z wyważeniem :P

RicoElectrico
Автор

Awesome video
Can you send me the code link again please

rosankumarsenapati
Автор

I like you video. Can you help me? I need count revoliutions. Only revoliutons :)

gytispasvenskas
Автор

pleas can you help me with this error term8x14_font.h: No such file or directory and I can not find it on libaray.

honggree
visit shbcf.ru