Update May 2020 We are still shipping worldwide. Although are not open for collection.   Orders may take a few days to ship during this period.
Click on the image to View Larger Image

Distance Sensor Add-On

  Out of Stock
SKU 28

This is a nifty little distance/proximity and ambient light sensor that basically lets you make Marty the Robot see how far away things are, react to the environment and avoid obstacles! You can add the sensor to Marty and then use the sensor readings in Scratch, Python, JavaScript or any other language supporting Marty.

Out of Stock — This item is not in stock, and so is not available for purchase.
Product Categories:
Add-on Home & Maker Components
  Works only with Martys from January 2018 onwards. More info…

The Basics

This is a Distance Sensor add-on that you can use with Marty the Robot to give the robot the ability to sense proximity to objects in front of it.

We’re including a simple 3D printed mount for the sensor as well as a nut and bolt so you can attach this sensor to Marty, poking out just under his chin.

The distance sensor also comes bundled with a cable that lets you plug it straight into Marty’s control board.

You can use the sensor readings in Scratch and also Python straight away! It’s also easy to use this add-on alongside our Raspberry Pi Camera Mount add-on.

Simple to use in Scratch or Python!

How to install

You can mount the sensor on Marty through the slots in his chin with the provided mount. Make sure your Marty is turned off before you plug in the sensor. Take care to line the pins up correctly as shown below, matching the names printed on each PCB for each wire. We recommend you don’t plug or unplug the sensor, nor have loose screws and a screwdriver poking around when Marty is on as this could break the sensor or your control board!

Installing the add-on in Marty's head
Connecting the add-on to Rick, Marty's control board
This Board has only been supported by Rick versions v1.1.1 or later (roughly for Martys received after January 2018). Sadly for older Ricks their software is unable to talk to the sensor. See here for how to check which version you have.

However! You can still use this sensor in an old Marty if you plug it in to a Raspberry Pi instead of Marty using some jumper wires, and do a little more programming to talk to the sensor over I2C.

Getting Technical…

This is a nifty little Breakout Board for the VCNL4200 distance/proximity and ambient light sensor.
Click here to see technical specs and more info!

The VCNL4200 from Vishay is a successor to the VCNL4010 sensor you may have encountered with Adafruit or SparkFun.

The sensor has a remarkably broad measurement range of around up to 1.5m away to as close as 2cm! (59” to 1” for those from the 17th century). As the sensor employs an IRED (Infra-red Emitting Diode) and IR detector photocell to determine distance, mileage may vary based on the ambient conditions. This makes it fantastic for a wide variety of robotics applications, such as self-driving RC cars as well as for many Martys manoeuvring amid a maze…

The sensor is somewhat quirky in that it needs a 5V supply to help power the IR Laser Diode, but the logic level on the I2C bus is 3.3V and is not 5V tolerant. There’s a small LDO regulator on this board that handles supplying 3.3V to the sensor, so you only need to provide 5V. As always, see the datasheet for more details!

The I2C pins SDA and SCL are broken out on the board, as well as the Interrupt pin INT (see the datasheet below for further details. There’s a single hole sized to fit a M2.5 machine screw in the centre of the board. You can download the 3D Printing STL files for the mount that fits Marty here.

You will be fine hooking this up to a Raspberry Pi or Rick but take care if you’re connecting it to anything else, like an Arduino or Micro:bit, as 5V on the logic lines might easily fry the IC!

VCNL4200 Module Datasheet
I2C Address
5V input, logic 3V3 (not 5V tolerant)
Product Schematic
26mm × 13.5mm × 13mm (with connector)
Cable & Connector
Approx 22cm long, JST XH 5 pin (10mil spaced) on board to 2 × 3 female pin header

You might also like

Rick - Control Board

Rick - Control Board

  19 Units in Stock
  More Info
Raspberry Pi 3 Model B+

Raspberry Pi 3 Model B+

  Out of Stock
SKU 21
  More Info
Marty the Robot - Kit

Marty the Robot - Kit

  Out of Stock
  More Info