Use this source photo to identify the module before wiring it. The photo is saved from the checked 37-in-1 kit guide.
What it detects
Detects a physical bump.
This is the main signal to test before adding displays, motors, buzzers, or game logic.
How it works
The lever is a small mechanical switch. When something bumps the lever, the contacts change state and the Arduino can treat that as a touch or bumper input.
What you need
Starter parts
Keep the first circuit small and add displays or motors later.
White USB Type-C CableConnects or powers USB-C devices, boards, chargers, and project accessories.
Arduino Nano & Expansion BoardCompact controller and breakout board for sensors, wiring, and embedded projects.
Female to Male 10 cm Wire10 cm Jumper Wire for connecting breadboards to male-pin modules or sensors.
37-in-1 Arduino Sensors KitExplore light, sound, motion, touch, and environmental sensing with Arduino projects.
Try first
Trigger an LED when the lever is touched.
This is the quickest way to see the module reading change.
Connections
Wiring to the Arduino Nano on its expansion shield
Plug into the digital bank of headers. The pin numbers below match the sketch further down this page; change one and change the other.
Module pinGoes to
Module SShield header D2
The Nano I/O expansion shield supplied in the kit, photographed from above for the Voltaat product listing. Column positions measured from the photo; labels added by Fix It Today.
Where it plugs in
The ringed column on the shield is the one this module uses. Its three pins are ground on top, 5 V in the middle and the signal at the bottom, so a three-pin module takes one whole column.
Before you power it
On this shield both banks read G, V, S from the top: the black lead goes to G, the red to V and the signal to S. The letters are printed at the ends of the rows, so check them on your own board before you wire a whole class.
One 3-pin lead per module. Connect ground first, then power, then signal.
A module in backwards puts 5 V on the signal pin. Some shrug it off, plenty do not.
The pin map and the shield layout are on the Nano and expansion shield wiring guide.
1
Plug the module into the header listed above, black lead to ground.
2
Copy the sketch below, upload it, and open Tools > Serial Monitor at 9600 baud.
3
Change the physical condition the module senses and watch the reading or output respond.
Starter sketch
Code you can copy and upload
Set the pin constants at the top of the sketch to match the header you plugged the module into, then upload it and open Tools > Serial Monitor at 9600 baud.
collision_sensor.inoArduino C++
1const uint8_t SENSOR = 2;
2const uint8_t LED = LED_BUILTIN;
3
4void setup() {
5 pinMode(SENSOR, INPUT);
6 pinMode(LED, OUTPUT);
7 Serial.begin(9600);
8}
9
10void loop() {
11 bool hit = digitalRead(SENSOR) == LOW; // lever closed
12 digitalWrite(LED, hit);
13 Serial.println(hit ? F("bump") : F("clear"));
14 delay(100);
15}
The lever is a mechanical switch, so this is the same code shape as a button. Check which way round your module reads before you trust the LOW.
Build next
Make a bumper input for a small moving model.
Turn the raw reading into a small useful interaction.
Add the OLED display when the reading is stable.
Use an LED, buzzer, servo, or motor only after the sensor input works by itself.
Write down the value range you see so your thresholds match the real room and module.
Reference
Source guide and step-by-step builds
Use the source guide for the exact wiring diagram, and the workshop guides for a full worked build on this board.
Have an idea for what MakerAccess should stock, improve, or explain next? Share it in the survey. If you bought or used a product and want to comment on the item itself, use the product feedback form.