Hans Scharler
Published © MIT

IR Proximity Sensors with Simulink and Arduino (Part 1)

Learn how to model the sensor and getting a reliable distance measurement using Simulink and Arduino.

AdvancedFull instructions provided8 hours15,828
IR Proximity Sensors with Simulink and Arduino (Part 1)

Things used in this project

Story

Read more

Schematics

Arduino IR Filter Circuit

Code

Sampling Breakpoints in MATLAB

MATLAB
inv_table = uint16([150 140 130 120 110 100 90 80 70 60 50 40 30 20 15]*10);
break_points = [490 495 500 550 600 650 725 800 900 1050 1250 1550 2000 2550 2750] * 1023/(5*1000);
plot(break_points, inv_table);
title('Distance table');
ylabel('Distance output (mm)');
xlabel('Sampled value');
grid on;

Credits

Hans Scharler

Hans Scharler

15 projects • 86 followers
IoT Engineer, Maker - I have a toaster that has been tweeting since 2008.

Comments