Questions tagged [sensors]
Use this tag for questions about selecting, connecting, using, and debugging sensors.
1,220
questions
4
votes
1
answer
242
views
How to determine when a sensor's output signal changes significantly?
Starting with an analog signal from any sensor, how do I automatically determine if there is a real signal change or a reset? Below is the sample code that better explains my goal:
value = sensorRead()...
3
votes
1
answer
1k
views
Why do we add delay when using ultrasonic sensors?
I'm a beginner in Arduino and recently i got myself an Ultrasonic sensor (HC-SR04).
I looked up tutorials on how to measure distance with the sensor and the code I'm using is:
const int trigPin = 8;
...
1
vote
0
answers
189
views
Analog UV sensor displaying incorrect values in serial monitor (GUVA-S12SD)
Using Arduino Uno and a GUVA-S12SD sensor (https://www.adafruit.com/product/1918).
Here's my circuit. 5V into sensor+, GND into sensor-, A0 to sensor out.
Here's my code:
void setup()
{
Serial....
0
votes
1
answer
1k
views
HW-477 Module having VS1838B IR Sensor: Help with Pins
Ordered Universal IR Receiver and I got HW-477 module with VS1838B IR Sensor.
Good thing is datasheet for VS1838B is available but not for HW-477.
VS1838B pins as: Ref
Signal | GND | VCC
while HW-477 ...
1
vote
0
answers
51
views
SoftwareSerial fails to receive on Nano but works with Uno [duplicate]
I have built a circuit board that includes a BLE module and an oxygen sensor that has a UART. Writing arbitrary data to the BLE works fine, but for some reason every configuration of SoftwareSerial I ...
1
vote
0
answers
69
views
How to get Bpm with 4 heart beat pulses
I'm trying to get an average from three intervals to get bpm. However, when I use the code below the bpm would slowly decrease when used with the sensor. Can anyone please check for what is wrong with ...
5
votes
5
answers
2k
views
Why use a module rather than sensor directly?
I'm trying to understand when one would use an Arduino module rather than directly a sensor.
Here's an example to contextualize my question: I need to use a Hall sensor to measure the number of ...
1
vote
0
answers
65
views
What external battery do I need?
For a school project I need to connect an Arduino with an accelerometer gyroscope sensor and 2 mini servo motors. Of course I need a battery for this. However, I don’t know what battery I need for ...
1
vote
1
answer
115
views
Why does the send pin influence the receive pin with Arduino Capacitive Sensing Library
I'm trying to figure out how the Arduino Capacitive Sensing Library https://playground.arduino.cc/Main/CapacitiveSensor/ works. It says:
When the send pin changes state, it will eventually change the ...
2
votes
0
answers
80
views
SPI problem with Bitcraze PMW3901 sensors and Arduino NANO
I am currently trying to connect four Bitcraze PMW3901 sensors to an Arduino NANO, but I seem to have issues with the SPI. When I connect two sensors using the code below, it works perfectly: I am ...
0
votes
1
answer
52
views
Circuit to get highest reading value from multiple thermistors?
I need to measure temperature of 6 battery cells. I don't care much about individual cell readings, I just want to sound a buzzer as soon as at least one of the temperatures is above a certain ...
2
votes
0
answers
116
views
Can't stop the 3 pin active buzzer
I was simply trying to program a buzzer with the ultrasonic HC SR04 and 128x64 OLED display. The buzzer is an active buzzer (3 pin) on a small board. The problem is that, once on, it never stops ...
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 ...
2
votes
1
answer
259
views
Using MAX30100 SpO2 value to turn on LED
max30100 i2c sensor gives heartrate and spo2 reading in serial and also can show values in lcd display. I want to show it's indication via LED.
If SpO2 value <94 , it will turn on Red led in ...
1
vote
3
answers
310
views
Arduino UNO voltage supply reduces when I add more sensors
I have an Arduino UNO. When I connect an MQ-9 sensor or an ESP8266MOD WiFi chip, the LCD backlight drops that it doesn't display anything, the red LEDs on the Arduino board dims, and the voltage ...
1
vote
0
answers
782
views
Fastest external High Speed ADC?
I am in a situation close to:
Hi-speed external ADC
But with 100,000 ~ 500,000 samples per second, I don't need more.
I only want to detect changes in 2 sensors, so each loop is only an "...
10
votes
4
answers
2k
views
How do you handle sensor drift?
I have a pair of potentiometers, on the Arduino, the output seems to drift, by one or 2 digits, back and forth. I would prefer they were read as one fixed value, without variation when their knobs are ...
2
votes
0
answers
30
views
i want to combine below two codes [duplicate]
*****1st code
int sensoroutput = 3; // the analog pin connected to the sensor
int sensorinput = A0;
int THRESHOLD = 100;
void setup()
{
pinMode(3, OUTPUT);
pinMode(A0, INPUT); // this ...
1
vote
1
answer
97
views
How to stop Single Analog Pin Keypad Matrix (Using Resistors) from receiving Interference from Livewire/other Sensors?
I saw a tutorial on linking a keypad using one pin, utilising several resistors:
http://razibshahdat.blogspot.com/2018/05/one-single-analog-pin-keypad-control.html
I have this keypad, a 16x2 LCD, a ...
1
vote
0
answers
91
views
Serial communication problems
When I run this script serial communication just stops after a random period of time. There is no error it just stops outputting data and does not respond to inputs in IDE. Does anyone know a fix for ...
1
vote
1
answer
565
views
esp8266 analogRead of 5.5V soil moisture sensor input using voltage divider
On an ESP8266 I try to analogRead(A0) my soil moisture sensor using a voltage divider but I get unexpected low values.
The MT3608 increases the esp's output voltage from 3.3V to 5.5V which is the ...
1
vote
0
answers
68
views
MQ-4 Sensor working fine with Beetle Bluno BLE but not with Arduino Nano 33 BLE
I have an MQ-4 sensor connected to a Beetle Bluno BLE that seems to work fine, however, when I change the board to an Arduino Nano 33 BLE, the sensor doesn't seem to work well (I get an arbitrary ...
1
vote
0
answers
103
views
Adafruit fingerprint sensor timer to exit out of enrolling
I have the following fingerprint sensor: Rugged Panel Mount Fingerprint Sensor with Bi-Color LED Ring [R503] : ID 4651 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Also ...
1
vote
0
answers
71
views
Elegoo remote code program only running once
I want this program to receive multiple signals from the elegoo ir remote and produce different tones using the passive buzzer. I have attempted to add onto the basic example provided by adding a ...
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
64
views
Touch Sensor and Potentiometer - Need some help
I'm using an Arduino Nano with a capacitive touch sensor and a potentiometer. I'm trying to get my code to differentiate between three different program states.
One is when my touch sensor is NOT ...
1
vote
0
answers
70
views
Maximum distance for sensor
I'm creating a project with some ESP32's running off PoE and I need to add some temperature/humidity sensors up to 5m away from the ESP chip
I assume there is a maximum cable distance?
What is the ...
1
vote
0
answers
107
views
How can I handle six SoftwareSerial ports for six Nova SDS011 Air Quality Sensors on Arduino MEGA?
First of all, thank you in advance.
I'm trying to connect six Nova SDS011 Air Quality Sensor (sensor specifications here) to an Arduino MEGA. I'm using the Nova Fitness Sds dust sensors library which ...
0
votes
1
answer
139
views
Arduino Nano: MAX30102 and memory problems
We are making a simple pulse oximeter device with an Arduino Nano and a MAX30102 sensor.
The problem is the SpO2 reading and processing algorithm of the MAX30102 library literally does signal ...
3
votes
0
answers
143
views
SHT30 giving wrong humidity
I have an SHT30 sensor which is feeding to my Arduino via an RS485 connection. The readings are coming in as they should be for both temperature and humidity. The problem, however, is that the ...
3
votes
1
answer
96
views
Water level switches / reed switches and Arduino Uno
How could I estimate the max number of switches that I could connect to an Arduino Uno?
I am questioning if Arduino has enough power to simultaneously operate an X number of switches with no issues.
I ...
1
vote
1
answer
200
views
Measuring the battery level powering the arduino
I would like to power my arduino nano with a 9V battery, but I would also like to measure the voltage of the battery to know its charge level.
Can I use the MAX471 Voltage Current Sensor module by ...
3
votes
2
answers
240
views
Average of 10 readings, wrong
I am reading from loadcell and calculating the average of last 10 readings. But when the load cell reads something more than 3800 g the average gets negative, how? The mass I read are not negative ...
3
votes
1
answer
114
views
Looking for an accurate and fast updating range sensor
I need to purchase a distance sensor that will be fixed in place and used to determine distance to the top of a fairly fast moving piston along the axial direction in line with the sensor. The top of ...
0
votes
2
answers
157
views
Arduino Uno - Raspberry PI - Float Sensors - Water pumps
I am experimenting with Aquaponics and since I am a software developer I found it "smart" to use arduino/raspberry in order to control the water flow and not simply use a water pump with ...
1
vote
0
answers
26
views
Clicking a mouse based on dwell time / how to code a rolling total of sensor measurements
I'm trying to write code that should result in a click of the mouse, based on dwell time. I'm getting data from a gyroscope to move the mouse around. I'm not sure what the best way is to approach this ...
4
votes
2
answers
511
views
Arduino Uno R3 stops executing code, when trying to instantiate multiple HX711 objects [closed]
This is my first time asking something on this platform, so if form or anything else is off, please feel free to point out things about how I could refine it and ask more concisely in the future.
I'm ...
0
votes
1
answer
96
views
HG-C 1100 measurement sensor
I am using two HG-C 1100 measurement sensor for measuring the width of the metal. In the top of the sensor I will be having the measurement value. The sensor is capable of measuring the dimensions ...
1
vote
0
answers
442
views
Calibrating Adafruit TCS34725 for RGB colors
I am new to Arduino. I am currently working on a project which requires color detection using the TCS34725 Adafruit sensor module.
For the project, I need to calibrate the sensor with RGB colors. ...
1
vote
0
answers
31
views
FingerPrint Scanner wont detect any input (fingerprint image)
Hi good day to all I have a project that , it will lock the solenoid using the fingerprint then I have hook up a coinslot that will count the coins inside the vault its like a secured piggybank.
...
1
vote
0
answers
34
views
How to edit this IR sensor code to COINSLOT sensor [duplicate]
The project is Like a secured PiggyBank but it will count the coins inside it.
Im using a coin sensor at default it has 5v, then goes to zer if inserted with a coin.
I have 2 codes The one was form my ...
1
vote
0
answers
58
views
Does natural outdoors wind affect the readings of an ultrasonic sensor significantly?
I am thinking of using an ultrasonic sensor outdoors, and am wondering if the presence of wind (say up to 20km/h) would significantly impact the accuracy of the readings, or would this not be a large ...
3
votes
1
answer
301
views
What kind of distance sensor are optimal to measure distances to surfaces at an angle to the sensor?
I want to try measuring the orientation of an object by measuring the distance between a "flat" surface to the surface of the rotated object. The problem I assume is that if the surface ...
1
vote
0
answers
78
views
Unable to write, or read a sensor's registers. Do I have an error in my code?
I'm trying to write to register the change some settings for a sensor I'm using (BNO055) and then read the same register to verify if the changes are successful.
However, the only value I'm able to ...
1
vote
1
answer
94
views
Writing to partially reserved registers of sensors
I'm trying to change the range of a gyroscope I'm using and there is the following guideline:
it is recommended to mask out
(logical and with zero) reserved bits of registers which are partially ...
1
vote
0
answers
30
views
How to connect multiple MPU-9250 IMU sensors to a single Arduino Uno? [duplicate]
The datasheet says the I2C bus limits itself to only two MPU-9250 sensors. How can I control multiple (>2) MPU-9250 through a single Arduino Uno? Is it possible to add another bus?
Please, help.
1
vote
1
answer
67
views
How to send a message to my phone that my Arduino system is on when turning on my Arduino
i have installed a GSM shield on the Arduino to create security alarm system using PIR SENSOR when ever there motion I will receive a call to my phone.
but i want to add also a line of code which can ...
-1
votes
1
answer
90
views
Interfacing LM35 and MQ2 with Arduino
When I interface LM35 temperature sensor and MQ-2 gas sensor with Arduino - my LM35 sensor gave incorrect values. From research I've found out that MQ-2 gas sensor dragging the AREF voltage down and ...
1
vote
0
answers
101
views
Nano 33 BLE Sense LED flashing 3/5 slow/fast after upload
I'd successfully got my Nano 33 BLE Sense to read accelerometer data and subject to there being a difference between current and last readings, to send this via the EasyTransfer library to an XBee ...
1
vote
0
answers
27
views
TRT-25 and Arduino Uno
I am reaching out for help on a project I am working on. We are trying to integrate a reaction torque sensor and I am having a hard time deciding how to go about it. Previously I assumed that like my ...