Faster analog read for Geartooth Hall Sensor on an Arduino Mega2560 with Simulink?

1 view (last 30 days)
I want to measure the revolutions per minute of my DC motor with Simulink. I got a geartooth sensor / hall sensor to detect the leading edges of the motors gear. When i increase the baud rate of my Arduino the detected leading edges are increasing aswell, which brings me to the conclusion that my sampling rate isn't high enough to detect the gears true revolutions per second.
I have found a discussion on the arduino forums (https://forum.arduino.cc/index.php?topic=6549.0) explaining how to do it using the arduino programming environment.
Is there a way to increase the sampling rate of my Arduino's in Simulink?
In the attachments are the function i used in my Simulink model and the Simulink model itself.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!