Hi guys, so currently i'm on a project where i'm suppose to add multiple sensors together and create a form of alert through LED light up and vibration motor. As such, when any of these sensors have sense a "critical" value as defined in arduino IDE, the LED will light up accordingly and vibration motor will vibrate accordingly as well.
And as such the sensors that are used for my project are :
DS18B20 Temperature sensor module (with breakout)
DFRobot SEN0219 carbon dioxide sensor
Adafruit ultimate GPS sensor
DIY Sweat sensor
TCS3200 colour sensor
RGB LED
coin vibration motor
8 ) arduino nano
The setup for all the sensor, LED and vibration are as based on the following websites (*exclude Vcc and ground setup):
Temperature sensor: it has only three pins (+, - , and out), therefore Vcc to +, GND to -, and one jumper wire for output signal
The Vcc and GND to power all components are as follows:
Lipo battery 7.4V, 850 mAh to pololu step down regulator 5V, 2.5A to: Colour sensor, Sweat sensor, GPS sensor, Temperature sensor, RGB LED and vibration motor
arduino nano 5v pin and gnd to carbon dioxide sensor
Lipo battery 7.4V, 850 mAh to arduino nano Vin and GND
image attached shows the connections through the breadboard. **note: setup and coding works as intended.
so basically with the setup and coding inplace, this is where problem comes about. when i power up the devices as seen from the listed connection mentioned earlier. and then i open up the serial monitor, i notice that when i touch the DIY sweat sensor (which is the red and black wire as seen in the picture) the value of sweat increase, but however, the carbon dioxide value ALSO increase together with the sweat sensor. this can be seen in the attached image. This happens also when i remove my hand from the wires. the carbon dioxide value also decrease.
This do not happens all the time. sometimes i would try restarting arduino IDE and replug the usb connection and lipo battery. and then it goes back to normal, where the touch of sweat sensor do not affect the carbon dioxide sensor value. but after it becomes normal, i would then "activate" all of the sensors, then the value of sweat sensor AGAIN affect the carbon sensor value.
so can anyone tell me what is this happening? i dun really understand because voltage supply to carbon sensor and sweat sensor are different, and the code had also define carbon pin and sweat pin differently, where carbon is given as A0 sweat (GSR) is given as A1 in arduino IDE. My friend actually pinpointed that this could be due to voltage glitch which im not really sure what he meant.
IN addition, can anyone help to resolve this issue?
The example of normal values when sweat sensor is touch is also shown. it can be notice that the carbon sensor values do not clash with sweat sensor, where their values are independent (after several attempts of resetting and restarting of arduino IDE and microcontroller)
First think I would do is check that every sensor is getting its supply at the right voltage (ie that
all the supplies and the supply wiring are working/intact). Measure the voltage at the sensor between
its local ground and supply pins - is the voltage too low? If so investigate that first.
Then look at (with a multimeter) the signal voltages of the sensors in question when you touch the sweat
sensor - is there a genuine voltage change that shouldn't be happening ? If so then investigate that
before worrying about the Arduino code at all.
Then check the Arduino input pins are getting the same voltages you saw at the sensor.
Basically check each thing indivually before attempting to debug the complete system - only when
everything individually is know to be performing OK is it worth proceeding.
You may find there's an issue with ground currents, or using flimsy signal wires to carry significant power,
or faulty breadboard pin, or unwanted oscillations, who knows.
If the hardware is fine, then its time to look at the software.