This is only a preview of the February 2021 issue of Silicon Chip. You can view 0 of the 112 pages in the full issue. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "":
Items relevant to "Follow-up: Quantum-dot Cellular Automata":
Items relevant to "Battery Multi Logger":
Items relevant to "Arduino-based Adjustable Power Supply":
Items relevant to "Electronic Wind Chimes":
Items relevant to "LCD clock and thermometer":
Items relevant to "DIY laser rangefinder":
Items relevant to "WiFi Snooping with a Raspberry Pi":
Items relevant to "Making Android Apps with App Inventor":
Items relevant to "Making a Compact Virtual Electronics Workbench":
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
DIY laser rangefinder
I bought a TFMini lidar module intending to build a radar-like device, but
then I realised that at work we spend
a lot of time measuring the length of
ERW pipes with measuring tapes. ERW
(electrically resistant weld) pipes are
300mm plus in diameter and up to 12m
long. They are used in our power plant
for ash slurry transportation.
It’s difficult to measure ERW pipes
accurately. So I decided to create a device to accurately measure the length
of pipe sections (to within 1cm) using the TFMini TOF (time-of-flight)
laser module.
Two varieties are available: the
TFMini-S (US$35) and TFMini Plus
(US$45); both have a serial interface.
But the TFMini Plus has a wider measurement range (10-1200cm compared
to 30-1200cm), can take 1000 measurements per second instead of 100
and is rated to operate from -20°C to
+60°C rather than 0-60°C.
Just placing the TFMini at one end
of the pipe and directing it towards the
edge plate will give accurate length
reading. To increase the precision, I
average a few readings.
70
Silicon Chip
Both the TFMini-S and TFMini Plus
have a viewing angle of 3.4°. Therefore, for long pipes, the aim is crucial to get a correct reading. To aid in
this, I have incorporated a visible laser pointer with a push-on button (S2).
It’s lined up with the TFMini module
so you can see to where it measures.
The TFMini works on reflection of
invisible laser light from the surface
of the object. In case the object does
not reflect back or completely absorb
or diffuse the incoming laser light, the
reading will be erroneous. Such surfaces include water or slanted and highly
reflective glass windows. For all other
kinds of objects, the light gets reflected, and the measurement is correct.
It’s accurate even with moving objects.
Besides the TFMini module and laser pointer, my circuit uses an ESP32
microcontroller module, a 128x64
pixel OLED screen, two regulators,
two capacitors and a battery.
The OLED screen is an I2C device so
it’s wired to the ESP32’s D21 and D22
I/O pins (just about any pins on the
ESP32 can be used for I2C). As mentioned earlier, the TFMini uses serial,
so it’s wired to the second UART on
the ESP32.
Australia’s electronics magazine
A 3.3V low-dropout linear regulator
(REG1) provides 3.3V to run the ESP32
and OLED display. The TFMini and
the laser diode are supplied with 5V
generated from a small boost module
that runs off a single Li-ion or LiPo cell,
with S1 provided for power switching.
For use at my workplace, the device
has to be portable so that my team can
use it out in the field. That is why I
ended up using a single LiPo cell and
a boost module. It can also run from
two 1.5V cells in series.
The only real trick to assembling
the unit is making sure that the TFMini and laser pointer are aimed at the
same spot. To do this, set up a small
object just under 12m away from your
testing location, aim the TFMini at it
until you get a sensible reading, adjust the laser pointer so that the dot is
centred on that object and then fix the
laser pointer in place.
The ESP32 is programmed using the
Arduino IDE. You can download the
sketch and all the required libraries
from siliconchip.com.au/Shop/6/5753
The libraries used are tfmini.h, Adafruit_GFX.h and Adafruit_SSD1306.h.
Bera Somnath,
Vindhyanagar, India. ($80)
siliconchip.com.au
|