Silicon ChipThe Quason VL6180X laser rangefinder module - January 2025 SILICON CHIP
  1. Contents
  2. Publisher's Letter: Two new series for the magazine
  3. Feature: The Fox Report by Barry Fox
  4. Feature: Net Work by Alan Winstanley
  5. Feature: Max’s Cool Beans by Max the Magnificent
  6. Project: High-quality Microphone Preamplifier by Phil Prosser
  7. Feature: The History of Electronics, part one by Dr David Maddison
  8. Feature: Circuit Surgery by Ian Bell
  9. Feature: Techno Talk by Max the Magnificent
  10. Feature: The Quason VL6180X laser rangefinder module by Jim Rowe
  11. Project: USB to PS/2 Keyboard & Mouse Adaptors by Tim Blythman
  12. Project: Raspberry Pi-based Clock Radio, part two by Stefan Keller-Tuberg
  13. Subscriptions
  14. Feature: Precision Electronics, part one by Andrew Levido
  15. Project: Secure Remote Mains Switch, part two by John Clarke
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Back Issues

This is only a preview of the January 2025 issue of Practical Electronics.

You can view 0 of the 80 pages in the full issue.

Articles in this series:
  • The Fox Report (July 2024)
  • The Fox Report (September 2024)
  • The Fox Report (October 2024)
  • The Fox Report (November 2024)
  • The Fox Report (December 2024)
  • The Fox Report (January 2025)
  • The Fox Report (February 2025)
  • The Fox Report (March 2025)
  • The Fox Report (April 2025)
  • The Fox Report (May 2025)
Articles in this series:
  • Win a Microchip Explorer 8 Development Kit (April 2024)
  • Net Work (May 2024)
  • Net Work (June 2024)
  • Net Work (July 2024)
  • Net Work (August 2024)
  • Net Work (September 2024)
  • Net Work (October 2024)
  • Net Work (November 2024)
  • Net Work (December 2024)
  • Net Work (January 2025)
  • Net Work (February 2025)
  • Net Work (March 2025)
  • Net Work (April 2025)
Articles in this series:
  • Max’s Cool Beans (January 2025)
  • Max’s Cool Beans (February 2025)
  • Max’s Cool Beans (March 2025)
  • Max’s Cool Beans (April 2025)
  • Max’s Cool Beans (May 2025)
  • Max’s Cool Beans (June 2025)
Articles in this series:
  • The History of Electronics, Pt1 (October 2023)
  • The History of Electronics, Pt2 (November 2023)
  • The History of Electronics, Pt3 (December 2023)
  • The History of Electronics, part one (January 2025)
  • The History of Electronics, part two (February 2025)
  • The History of Electronics, part three (March 2025)
  • The History of Electronics, part four (April 2025)
  • The History of Electronics, part five (May 2025)
  • The History of Electronics, part six (June 2025)
Articles in this series:
  • Circuit Surgery (April 2024)
  • STEWART OF READING (April 2024)
  • Circuit Surgery (May 2024)
  • Circuit Surgery (June 2024)
  • Circuit Surgery (July 2024)
  • Circuit Surgery (August 2024)
  • Circuit Surgery (September 2024)
  • Circuit Surgery (October 2024)
  • Circuit Surgery (November 2024)
  • Circuit Surgery (December 2024)
  • Circuit Surgery (January 2025)
  • Circuit Surgery (February 2025)
  • Circuit Surgery (March 2025)
  • Circuit Surgery (April 2025)
  • Circuit Surgery (May 2025)
  • Circuit Surgery (June 2025)
Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Raspberry Pi-based Clock Radio, part two":
  • Raspberry Pi Clock Radio main PCB [19101241] (AUD $12.50)
  • Raspberry Pi Clock Radio display PCB [19101242] (AUD $7.50)
  • Software for the Raspberry Pi based Clock Radio (Free)
  • Raspberry Pi Clock Radio PCB patterns (PDF download) [19101241-2] (Free)
Articles in this series:
  • Raspberry Pi Clock Radio, Pt1 (January 2024)
  • Raspberry Pi Clock Radio, Pt2 (February 2024)
  • Raspberry Pi-based Clock Radio, part two (January 2025)
Articles in this series:
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, part six (June 2025)
Items relevant to "Secure Remote Mains Switch, part two":
  • Secure Remote Mains Switch receiver PCB [10109211] (AUD $7.50)
  • Secure Remote Mains Switch transmitter PCB [10109212] (AUD $2.50)
  • PIC16F1459-I/P programmed for the Secure Remote Mains Switch receiver (1010921R.HEX) (Programmed Microcontroller, AUD $10.00)
  • PIC16LF15323-I/SL programmed for the Secure Remote Mains Switch transmitter (1010921A.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware and ASM source code for the Secure Remote Mains Switch [1010921A/R] (Software, Free)
  • Secure Remote Mains Switch PCB patterns (PDF download) [10109211/2] (Free)
  • Front panel label and drilling diagrams for the Secure Remote Mains Switch (Panel Artwork, Free)
Articles in this series:
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Mains Switch, part two (January 2025)
VL6180X Electronic Laser modules Rangefinder Using Electronic Modules with Jim Rowe Quason VL6180X - Laser rangefinder - Light level sensor This module should be of particular interest if you want to build robotic devices. It uses infrared (IR) light to accurately sense the proximity of objects from 0mm to well over 100mm. It’s based on a technology known as FlightSense, patented by ST Microelectronics. T he Quason VL6180X range-­ sensing module comes on a tiny 17.8 × 20.3mm PCB with a handful of SMD components on it. As you can see from the photos, it includes three SOT-23-3 devices and one 12-lead SMD IC, itself only 4.8 × 2.8 × 1mm. The secret is all inside that innocent-­ looking 12-lead IC in the centre of the PCB. There’s a lot more in that tiny package than you might expect. It’s a complete optical ranging system with a tiny IR (infrared) laser, two optical sensors (one for IR, the other for ambient light sensing), plus a microcontroller unit (MCU) with internal memory. This IC is the heart of the VL6180X sensing module – the rest of the components are there just to support it. Inside the VL6180X It’s made by European semiconductor manufacturer ST Microelectronics and uses its patented FlightSense technology. Unlike optical sensors that attempt to detect distance by measuring the proportion of light sent to an object that is reflected back from it, ST’s technology accurately measures the time the light takes to travel to the nearest object and reflect back to its sensor, which ST calls the ‘time of flight’. In short, it’s a kind of light-based radar or ‘LIDAR’. Fig.1 shows what’s inside the VL6180X and should help in understanding how it works. Near the bottom is the MCU with its ROM (read-only memory) and RAM (random-­access memory) below it, while above it is Practical Electronics | January | 2025 the ambient light sensing section. The IR laser driver section is shown in the centre, with the range detection section just above the MCU. To make a ranging measurement, the MCU first sends a command pulse to the IR laser driver to send out a short IR light pulse at a wavelength of 850nm. Then, it measures the time until the ranging detection section reports that a reflected IR pulse has been received. The MCU can then calculate the current distance to the object that reflected the IR pulse, by taking into account the speed of light in air and the time taken for the out-and-back journey. The speed of light in air is close to 299,702,458m/s (metres per second), which equates to 299.702m per mi- crosecond or 0.2997m per nanosecond. So light takes close to 3.336ns to travel one metre or 0.3336ns to travel 100mm. If the out-and-back journey of the light takes, say, 0.6672ns, the total path length is 200mm, so the distance between the sensor and the object must be 100mm. The key to this method of determining distance is precise measurements of very short time delays. To measure over a range of 1-100mm with 1mm resolution, the chip must have a timer capable of measuring the difference between emission and reception from just 7ps (picoseconds) to 667ps with 7ps resolution or better. One picosecond is one trillionth (10−12) of a second! These capabilities are thanks to modern semiconductor manufacturing Fig.1: the block diagram for the VL6180X rangefinder IC. The internals appear quite simple, with a separate section for the light sensing, IR emitter and ranging. However, very precise timing is required to make calculations down to the millimetre resolution, so the actual circuitry is more complicated than you might think. 39 Electronic modules Here the module is shown at nearly three times actual size for clarity. techniques that can make tiny transistors with predictable properties. In addition to this ‘time of flight’ range measurement, the VL6180X can also measure the ambient light level using the sensor and ambient light sensing (ALS) section shown at the top of Fig.1. This appears to be a ‘bonus’ feature as it does not factor into the distance measurements It can measure light levels between 0.002 lux and 20,971 lux, with what is described as a ‘photopic’ response. That means it responds to light wavelengths in the visible range of 400700nm (with a peak at around 550nm) as seen by the human eye at ‘well-lit’ lighting levels. The MCU in the VL6180X can take these measurements either once or repetitively and can also interleave range and ALS measurements. It accepts commands and makes the measurement data available via the I2C port (pins 5 Fig.2: the top of the VL6180X IC features three tiny holes that are critical for its functionality. These apertures are required for sensing and emission, with the largest being only 0.58mm in diameter. There is also an even smaller ‘vent’ hole. It’s important to note that the light sensor has a very narrow ‘cone’ and measures objects up to 150-200mm away. 40 and 6) at lower right in Fig.1. You are probably wondering how all these impressive things can be done by the very small and innocent-­ looking chip visible in the centre of the module PCB. Although they are not easy to see with the naked eye, there are actually three apertures on the top of the device, located on its centre line as shown in Fig.2 (which shows the top of the VL6180X at six times its actual size). The largest aperture (0.58mm diameter) near the centre is for the ALS sensor, while the smaller 0.5mm diameter one near the far end is for the IR ranging laser emissions. The even smaller 0.3mm diameter aperture near the ALS at the pin 1 end is for the IR ranging return sensor. A fourth and very tiny ‘vent’ hole is at lower centre, midway between pins 3 and 4. The VL6180X is designed to operate from a supply of 2.8V ±0.2V, with an average operating current of 1.7mA in ranging mode or 300µA in ALS mode. The current it draws in standby mode is less than 1µA. And the I2C interface can operate at up to 400kHz, with a 7-bit address of 0x29 (41 decimal). The full module Fig.3 shows the complete circuit of the Quason module, with the all-­ important VL6180X device (IC1) visible at lower left. At top centre is REG1, an XC6206 LDO voltage regulator used to step down the 5V input supply (at pin 7 of CON1) to the 2.8V Useful links • www.aliexpress.com • www.st.com/content/st_com/ en.html • www.arduinolibraries.info/ libraries/vl6180-x • github.com/adafruit/Adafruit_ VL6180X needed by IC1. The 2.8V from REG1 is also made available at pin 6 of CON1, for possible use by external circuitry. Both the GPIO0 and GPIO1 pins of IC1 are pulled up to 2.8V via 47kW resistors. The GPIO1 pin is then taken directly to pin 4 of CON1, while the GPIO0 pin is connected to pin 3 of CON1 via diode D1. This allows IC1 to be held in standby mode by pulling pin 3 of CON1 to ground. That is why this pin of CON1 is labelled “SHDN” (for “shutdown”). Mosfets Q1 and Q2, connected between the SCL and SDA pins of IC1 and the corresponding pins 2 and 1 of CON1, provide logic-level conversion. This way, the 2.8V signal swings at pins 5 and 6 of IC1 are converted into 5V swings at pins 2 and 1 of CON1, and vice versa. This allows the module to be connected to external circuitry running from a 5V supply, like an Arduino or similar MCU. The way this kind of ‘passive’ level shifter works is quite clever. Q1 & Q2 are N-channel devices, so they switch on when their gate voltage (“G”) is significantly higher than the source voltage (“S”). At idle, the source is Fig.3: the circuit diagram for the Quason module which utilises the VL6180X IC. Q1 and Q2 are used for logic-level conversion. Practical Electronics | January | 2025 VL6180X Laser Rangefinder pulled to +2.8V via one 10kW resistor, while the drain is pulled to +5V via another. With the gate and source both at +2.8V, the Mosfet is off, so no current flows. If IC1 pulls its end low, the gatesource voltage becomes +2.8V, so the Mosfet switches on and the corresponding pin on CON1 also goes low. Alternatively, if the pin on CON1 is externally pulled low (eg, by an MCU), the Mosfet is initially off. Still, its parasitic ‘body diode’ (visible in Fig.3) allows the corresponding pin on IC1 to be pulled down to about +0.7V. The gate-source voltage of that Mosfet is then 2.8V − 0.7V = 2.1V, high enough for the Mosfet to switch on, pulling the pin on IC1 down to 0V. So when one side goes low, the other does too, but if both sides are allowed to be pulled high by the pullup resistors, they remain high at different voltage levels. Connecting it to an Arduino As you can see from Fig.4, connecting the module to an Arduino Uno or compatible is very straightforward. The module’s VIN pin connects to the Arduino’s 5V pin, its GND pin connects to one of the Arduino’s GND pins, and its SCL and SDA pins connect to the same pins on the Arduino. You will also need an Arduino li- Fig.4: the Quason module can be easily connected to an Arduino Uno (or similar), with just four leads. brary to get the two communicating, plus a sketch to use the library to make measurements. A couple of these libraries are listed on the Arduino website at www.arduinolibraries.info/ libraries/vl6180-x – in both cases, they provide links to the library ZIP files on GitHub. When you download and unzip either of these libraries, they generously provide example sketches to get you going. I downloaded one of these libraries, added it to my list of libraries in the Arduino IDE and then loaded one of its example sketches. It was only a few minutes before I could wave my hand up and down above the VL6180X and see its distance varying in the ranging data on the Arduino IDE’s Serial Monitor. It was as simple as that! So it’s pleasingly easy to get the Quason VL6180X IR range sensing module going with an Arduino. This, plus its low cost, suggests that it would be very suitable for DIY robotics. You might even be able to use a couple of the modules to make a digital Theremin! Where to get it As you can see from this enlarged photo, the Quason VL6180X is miniature, measuring just 17.8 x 20.3mm. Practical Electronics | January | 2025 We obtained the module in the photos from the Quason Official Store, one of the vendors on Ali­ Express (see www.aliexpress.com/ item/1005001572022389.html), for £2 including shipping. But there are several other vendors on AliExpress offering it for similar prices, such as SuperModule Store, DIY-Victor Store and HARYE Store. It is also available from numerous eBay suppliers starting at around £4, including shipping. You could also look on Amazon, which is rapidly becoming another eBay now that they have listings from third-party sellers. We found a similar (but not identical) module in the online shop https://coolcomponents.co.uk for £8.99, which will presumably be quicker to obtain than those coming from overseas. PE 41