Uploaded December 2025 | Updated September 2026, 11 hours ago
Using the ATmega4809 analog comparator to measure the motor’s RPM …
↓↓↓ Complete description, time index and links below ↓↓↓
In the last video we’ve developed an active band pass filter to extract the sinusoidal fluctuation in the motor current (link below). Now we just have to measure the frequency of those oscillations to calculate the motor’s speed.
First we connect the output of our filter to an analog comparator input of our Arduino. Then we write some code to measure the frequency using an interrupt. Initially we get spurious readings at 0 RPM, but a slight adjustment fixes that.
00:00 Intro – let’s count oscillations to measure RPM
00:54 Circuit – filter output and Arduino A6 connected
01:21 Code 1 – RPM measurement comparator interrupt
10:43 Test 1 – works, but spurious readings with motor off
13:44 Code 2 – adjusting the threshold of the comparator
14:40 Test 2 – spurious readings with motor off gone
15:53 Wrap-up – next is some housekeeping, bye
Full Fly-by-Wire Electric Outboard youtube.com/playlist?list=PLwq-2MnM58FKvpYgFXgNCjlKo14L0KI16
Full Fly-by-Wire Electric Outboard (25): RPM Measurement via Motor Current (1) youtu.be/SDlMZ4LuVTg
Full Fly-by-Wire Electric Outboard (27): Housekeeping (2) youtu.be/sxmy_BU-NdY
Arduino megaAVR Analog Comparator, e.g. Nano Every ATmega4809 youtu.be/6zbvXBz7TKc
#flybywire #electricoutboard #haswing #trollingmotor #outboardmotor #outboard #robertssmorgasbord
Using the ATmega4809 analog comparator to measure the motor’s RPM …
↓↓↓ Complete description, time index and links below ↓↓↓
In the last video we’ve developed an active band pass filter to extract the sinusoidal fluctuation in the motor current (link below). Now we just have to measure the frequency of those oscillations to calculate the motor’s speed.
First we connect the output of our filter to an analog comparator input of our Arduino. Then we write some code to measure the frequency using an interrupt. Initially we get spurious readings at 0 RPM, but a slight adjustment fixes that.
00:00 Intro – let’s count oscillations to measure RPM
00:54 Circuit – filter output and Arduino A6 connected
01:21 Code 1 – RPM measurement comparator interrupt
10:43 Test 1 – works, but spurious readings with motor off
13:44 Code 2 – adjusting the threshold of the comparator
14:40 Test 2 – spurious readings with motor off gone
15:53 Wrap-up – next is some housekeeping, bye
Full Fly-by-Wire Electric Outboard youtube.com/playlist?list=PLwq-2MnM58FKvpYgFXgNCjlKo14L0KI16
Full Fly-by-Wire Electric Outboard (25): RPM Measurement via Motor Current (1) youtu.be/SDlMZ4LuVTg
Full Fly-by-Wire Electric Outboard (27): Housekeeping (2) youtu.be/sxmy_BU-NdY
Arduino megaAVR Analog Comparator, e.g. Nano Every ATmega4809 youtu.be/6zbvXBz7TKc
#flybywire #electricoutboard #haswing #trollingmotor #outboardmotor #outboard #robertssmorgasbord










