Powered by Modern Robotics

0 $0.00

Cart

No products in the cart.
Shop

Touch Sensor

$15.95

The MRI Touch Sensor is robust and enclosed in a housing for easy mounting. Great for installing as a limit switch or bumper switch.

Out of stock

Join the waitlist to be emailed when this product becomes available

SKU: 45-2007 Categories: ,

Description

The Modern Robotics Touch Sensor is housed in a sturdy housing with mounting holes on each side so it can be incorporated into a robot regardless of the building system. It is ideal to use as a limit switch or bumper switch.  

When depressed, internal LEDs will illuminate to confirm correct operation and the digital output to the host controller will switch from logic 0 to logic 1.

Specifications

Power
5 volts DC. 20 mA max.
Standard 3 pin connector
For connection to 3 pin digital port
Signaling logic levels
Logic 0 – 0 volts, Logic 1 – 5 volts
Wiring standard
Pin 1 – black – Gnd
Pin 2 – red – +5v
Pin 3 – yellow – Logic output
Actuator
5 millimeters
Actuator depression force
150 grams
Internal LED color
Blue
Unit dimensions – LxWxH
36 x 32 x 15 millimeters
Mounting holes
24 x 24 millimeters square pattern
Unit weight
10 grams
Wire length
25 centimeters

Additional information

Weight .0330 lbs
Dimensions 4 × 3.75 × .75 in

FTC SDK

Android Studio Example Program

Download the below program for an example of how to read this Analog sensor. The FTC SDK will supply a value from 0-5 representing a voltage.

In your configuration file, name an Analog Input “light” and name a Core Device Interface Module “Device Interface Module 1”

/*
Modern Robotics Analog Example
Created 7/25/2017 by Colton Mehlhoff of Modern Robotics using FTC SDK 3.10
Reuse permitted with credit where credit is due

The Modern Robotics Core Device Interface reads analog input
using a 10 bit value meaning the Android Phone reads a value from 0 to 1023.
The FTC SDK supplies a "voltage". The SDK is scaling this value of 0-1023 to 1-5 with decimal places.

Configuration:
Analog Input on Core Device Interface "light"
Core Device Interface named "Device Interface Module 1"

Support is available by emailing support@modernroboticsinc.com
*/

package org.firstinspires.ftc.teamcode;

import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.AnalogInput;
import com.qualcomm.robotcore.hardware.DeviceInterfaceModule;


@TeleOp(name = "Analog Example", group = "MRI")
//@Disabled
public class MRI_Analog_Example extends LinearOpMode {

    //An Analog Input. In this example, we used a Light Sensor although it could be any analog sensor.
    AnalogInput MRLightSensor;

    //CDI. Using this, we can read any analog sensor on this CDI without creating an instance for each sensor.
    DeviceInterfaceModule cdi;

    @Override
    public void runOpMode() {
        telemetry.addData("Status", "Initialized");
        telemetry.update();

        //Link objects to configuration file
        MRLightSensor = hardwareMap.analogInput.get("light");
        cdi = hardwareMap.deviceInterfaceModule.get("Device Interface Module 1");

        waitForStart();

        while (opModeIsActive()) {

            //Read the light sensor using the Analog Input object
            telemetry.addData("light", MRLightSensor.getVoltage());

            //Read each Analog Port of the CDI. 0-7
            for (int i = 0; i < 8; i++) {
                telemetry.addData("Analog " + i, cdi.getAnalogInputVoltage(i));
            }
            telemetry.update();
        }
    }
}