Questions tagged [sensors]

Use this tag for questions about selecting, connecting, using, and debugging sensors.

Filter by
Sorted by
Tagged with
18 votes
4 answers
28k views

How to get weight data from glass electronic bathroom scale sensors?

I am doing a small project with a bathroom scale but I run into some problems. I am using an Arduino Uno V3, HX711 module amp and a scale. Scale: HX711 amplifier: I disassembled the scale to get ...
1 vote
2 answers
2k views

How to combine two different sensor sketches to one complete sketch?

How to combine two different sensor sketches to one complete sketch for a complete circuit that attaches to one Arduino Uno? Sharp Dust Sensor int measurePin = A0; // Connect dust sensor to Arduino ...
10 votes
4 answers
5k views

How to move from arduino to physical prototype

I've been reading a bit about moving from Arduino to PCB and it seems a bit daunting. For now, all I really want to do is take something I've built, and make a few changes so that I can actually ...
  • 237
9 votes
3 answers
3k views

How to measure total energy usage of an arduino board

I have a project that I'm currently working on. We have built a green wall, wich consists of plants on a wall Now, we have a pump situated at the bottom that waters all the plants. There is an ...
  • 1,139
9 votes
9 answers
7k views

Best way to determine if a 5 gallon water jug is getting empty

I have an espresso machine that gets its water from one of those 5 gallon blue water bottles (I would plumb it, but our water here is WAAAAY too hard). If I ever accidentally let the bottle run out ...
  • 203
7 votes
3 answers
19k views

Multiple I2C sensors with the same address

I am trying to find the simplest way to connect multiple (preferably around 10-20) IMU sensors to one controller. There are two constraints: sampling at 60Hz and reasonably simple wiring as I want to ...
5 votes
2 answers
17k views

What is the difference between Accelerometer, Gyro, and Magnetometer Sensor?

I'm starting in the arduino world and I'm building an autonomous smart vehicle. So, after some weeks building and adjusting the vehicle, I got to a point in this project that I want to log it's ...
2 votes
0 answers
202 views

Declaring Variables in a For Loop

I am trying to use a for loop for getting readings on two parallax ping sensors and want to find the difference between both readings. But am having trouble doing so. Whenever I declare print ping(1), ...
  • 143
2 votes
2 answers
4k views

Detect movement on moving robot? PIR Sensor

I am working on a human following robot project and I am trying to achieve this with 1 Ultrasonic sensor that makes sure the robot won't crash into something and 3 PIR sensors that will detect human ...
  • 93
1 vote
1 answer
681 views

How to add Ultrasonic Sensor to the board?

I am making an RC car , have combined the Arduino UNO R3 with the AR 293d, and pluged in the HC-SR04 sensor to the SRO4 hole at the left top corner in the below graph. However, besides one sensor I ...
0 votes
2 answers
3k views

It is possible to control brightness of an LED strip (connected using a relay and having a seperate power supply ) using output from an arduino?

The circuit contains a relay interfacing with 12v power supply and LED strip. Can the brightness for this strip of LEDs be controlled using the analogWrite command? This works perfectly for a single ...
16 votes
2 answers
42k views

The use of 4.7kOhm resistor with DS18B20 temperature sensor [closed]

I was using a temperature sensor DS18B20 with Arduino. I've read that you should connect the digital input line and the 5V line with a 4.7kOhm resistor - like in the picture. Can someone explain ...
13 votes
10 answers
18k views

Sensor for underground water tank level

In a similar way to the question "best way to determine if a 5 gallon water jug is getting empty", I'm looking for a way to measure water in a container. This is so it can be connected to an Arduino ...
  • 233
10 votes
4 answers
41k views

What is the work of pulseIn?

I have code for an ultrasonic sensor which I found from a site. Here is the code: #define trigPin 12 #define echoPin 13 void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(...
  • 531
9 votes
3 answers
14k views

Grove sensors without a Grove shield

There exists a large variety of sensors in the Grove System. Usually these are accessed via a special shield (Grove base shield). Can I access these sensor directly without a shield. In particular I ...
  • 447
6 votes
2 answers
607 views

Why is that any sensor signal need to be hooked up to the interrupt pins on Andruino boards?

I have come across some Andruino Sensors like Motion, Light and all recommend to be connected to pin 2 or 3 on Andruino Uno board which are interrupt pins. This is especially true if you are looking ...
5 votes
6 answers
10k views

Using / calibrating pH sensor module

I've bought this sensor module board to link to an Arduino nano: http://www.ebay.com/itm/For-Arduino-Liquid-PH-Value-Detection-detect-Sensor-Module-Monitoring-Controller/321764233326 I assumed the ...
  • 115
5 votes
3 answers
4k views

Arduino Due and BNO055 address in i2c mode

I have a project where I need to have several IMUs, the BNO055 shuttle board (I explained my project here), I manage to get the Euler angles from one BNO055 sensor, which have the address 0x29, ...
  • 61
5 votes
8 answers
13k views

Two sensors on one input

I got this question from my teacher the other day and I can't figure it out: If you have two sensors from two different outputs but want them to go into one input, what do you need, and how can you ...
  • 155
5 votes
1 answer
18k views

How to connect 5V sensors to 3.3V digital input (Due)?

I'm completely new with Arduino and microcontrollers in general. I have several 5V sensors, and need 3.3V because that's the max for the Due. Is it possible to use a resistor to connect it to the ...
4 votes
3 answers
1k views

Moving motion sensor?

Long story short, I'm trying to build some form of device that you can wear and it will detect when something moves behind you. I wanted to use PIR sensors for the motion detection, but I have no idea ...
  • 41
4 votes
1 answer
7k views

How do I listen for a sound that matches a pre-recorded sound?

I'm working on a project that uses an Arduino Uno to listen for a bell ring and then uploads to a web server the exact time the bell was rung using a WiFi Shield. I want to know how I can listen for ...
  • 41
4 votes
2 answers
11k views

Why is the constrain function used after the map function?

I am reading some sample code and they use this method of mapping data from IR sensors: sensor1 = analogRead(0); adj_1 = map(sensor1, s1_min, s1_max, 0, 255); adj_1 = constrain(adj_1, 0, 255); ...
4 votes
1 answer
7k views

Understanding Soil Moisture Sensor Values

I have soil Moisture sensor inserted into the pot soil, wet in state. (not too damp) and soil moisture sensor is connected to Arduino Mega 2560. This is the soil moisture sensor I am using: Soil ...
4 votes
1 answer
3k views

Built-in capacitive touch detection with SAMD21 development board (Arduino Zero Compatible)

I bought this SAMD21 development board which shows up as an "Arduino/Genuino Zero (Native USB Port)" when plugged in. And I've successfully got a blink sketch running on it all good so far: The ...
4 votes
6 answers
15k views

Detect and stream if a chair is occupied

I am planning to build a device able to detect and tell a server via Wi-Fi if a chair is occupied. How would you do it? And how cheap do you think the device could be?
  • 159
3 votes
1 answer
28k views

Getting BPM from the given code

I have found code that can blink an LED on Arduino according to Heart Beat. I am using AD8232 as a sensor for Heart Rate. Code for it is: // Variables int PulseSensorPurplePin = 0; // Pulse Sensor ...
3 votes
1 answer
465 views

Understanding Digital IMU 6DOF sketch

I am looking at the following code and getting confused by a few elements in it: 1) Why is there a writeto function being performed to the memory locations x053,0x31,x09 for accelerometer and 0x68,...
  • 35
3 votes
2 answers
4k views

Connect Arduino to MySQL database online problem

I'm trying to connect Arduino with MySQL database on my online server. I manage my project to work on WampServer locally on localhost, but when I try to move everything online I have problem... on ...
3 votes
4 answers
9k views

Not enough pins on Uno?

I'm making touch-sensitive, light up tic-tac-toe board. That means 9 LEDs + 9 capacitive sensors. Each LED needs 1 pin and each sensor needs 2...meaning I'd need 27 pins to properly control each ...
  • 474
3 votes
3 answers
456 views

How does the Space Replay record audio?

The Space Replay A hovering object that explores and manipulates transitional public spaces with particular acoustic properties. By constantly recording and replaying these ambient sounds, the ...
  • 3,697
2 votes
1 answer
352 views

Does a moisture sensor need warm-up time?

I am trying to use a moisture sensor to identify the moisture value of my plants. (As every one does.) The sensor was connected to VCC all the time and my battery goes empty after a short time. So I ...
2 votes
0 answers
1k views

Grove temperature sensor with Arduino Yun

I try to test Grove - Infrared Temperature Sensor on Arduino Yun with the sample code but it does not work. In the console it shows that the object temperature is out of range all the time. However, ...
2 votes
2 answers
1k views

How to write nonblocking code, for polling sensor at 100 Hz

I'm using this piece of code to try to poll an IMU sensor at 100 Hz (for a AHRS sensor fusion library). void loop(void) { // nonblocking code variables static uint32_t last_ms; uint32_t ms; // ...
2 votes
1 answer
1k views

Processing Serial data

I have a PM10 sensor that I'd like to get the values from. Here's the official documentation from the sensor: I've looked as serial communication, but how do i process byte by byte of information ...
  • 187
2 votes
2 answers
836 views

Powering Atmega328P-Pu externally [closed]

Please I'm new to Arduino and I need assistance. I'm working on a project which makes use of the ultrasonic sensor to make a certain pin high if a certain distance is attained. When I used the USB ...
2 votes
1 answer
1k views

Interrupts Problem with Flow sensor

#include <Wire.h> //I2C lib #include <LCD.h> #include <LiquidCrystal_I2C.h> // LCD lib LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); const int pot_pin = A0; const ...
2 votes
1 answer
2k views

Using the Waspmote Sensor Board

Spanish company Libelium makes this pretty impressive sensor board: http://www.libelium.com/products/waspmote/sensors/ for their Waspmote series of boards. These are not meant for Arduino ...
  • 522
2 votes
1 answer
45k views

Combining code for multiple sensors in one program

I need to operate 2 different sensors (gas and temp) simultaneously. I have managed to run each one of them separately and I don't know how to manipulate the code so they could work together. My ...
  • 121
2 votes
1 answer
1k views

"tamper" circuit of a reed switch: can I connect the two wires to an INPUT and an OUTPUT pin?

While working for the automation side of my new house, I'm currently in the process of installing several reed switches on top of external doors and windows. Even if this could be used as a "...
2 votes
1 answer
209 views

TFMini Sensors with Arduino

I have three TFMini sensors I need all of them to detect. I only got one to work , pins 4,5 . My info in coding is basic . I really appreciate your help . Thanks in advance. I think the problem is ...
  • 27
2 votes
3 answers
779 views

Problems coding a 12 pin 7 segment display and grove temperature sensor with Arduino Uno

I am trying to code my 12 pin seven segment display to display the temperature from my grove temperature sensor. I am new to this and I have been struggling, so if anyone could help that would be much ...
  • 23
1 vote
1 answer
702 views

How do I select Sensor using chip 74HC138 on Wemos D1 Mini?

I have a project for my graduate degree. It's about Monitoring Temperature and Humidity using Message Queuing Telemetry Transport on Serial NodeJS. To get sensor data to Wemos D1 Mini and NodeJS had ...
1 vote
0 answers
1k views

Arduino Due and BNO055

For a physical activity monitoring project, I am developing a prototype based on an Arduino Due and several IMUs (BNO055 from Bosch). I have to collect the data from the sensors simultaneously (3 for ...
  • 61
1 vote
1 answer
61 views

Can you help me combining these sensor sketches as one in Arduino [closed]

I want to combine these three sketches into one. RAIN SENSOR: int rainPin = A0; int greenLED = 6; int redLED = 7; // you can adjust the threshold value int thresholdValue = 500; void setup(){ ...
  • 41
1 vote
1 answer
49 views

Mixed SHARP IR Sensor Readings

I'm using the GP2Y0A21YK Sharp IR Sensor in a ball and beam system where I'm trying to balance the ball in the center of the beam using the IR Sensor as a distance locator and a servo motor to tilt ...
1 vote
1 answer
1k views

IR receiver receives only 0

I am trying to decode IR codes of my Samsung tv remote But the receiver always receiving "0" Schematics: Code: #include <IRremote.h> int RECV_PIN = 11; IRrecv irrecv(...
1 vote
0 answers
2k views

MQ7 Flying Fish output format

I am new to Arduino project. I used MQ7 flying fish sensor to sense the CO. Ok now I connected everything as mentioned in various tutorials, such as Arduino CO Monitor Using MQ-7 Sensor. Also wrote ...
1 vote
2 answers
3k views

code for automatic door

I want it running as a normal automatic door so both sensors work as a separate activate. The only problem I've seen is that the servo remains active waiting for another high read and you can hear the ...
  • 21
1 vote
4 answers
3k views

Which sensor to detect light?

I have a kit of 37 sensors as described here: http://www.instructables.com/id/Arduino-37-in-1-Sensors-Kit-Explained/?ALLSTEPS https://tkkrlab.nl/wiki/Arduino_37_sensors I want to create a simple ...