Use the photon-pixel coupling method, it is a new approach in science for reading an unlimited number of sensors in parallel. You can do it with an Arduino and a cam.
I think you have to reset pins in startup void setup() { Serial.begin(9600); //Start serial monitor pinMode(Pin_D7,OUTPUT); pinMode(Pin_D8,OUTPUT); pinMode(A0,INPUT); digitalWrite(Pin_D7, LOW); //Turn D7 Off digitalWrite(Pin_D8, LOW); //Turn D8 Off }
Too many WRONG readings for me. However, I decided this method could provide extra digital pins. To do this I eliminated the pot and it's connection to GND. I connected A0 to a 1N914 diode inline with a 1K resistor and from there to a two pin jumper. (input pins) From the other side of the jumper I connected to pin 7. I then altered the code to eliminate any Value_D7 readings below 900. Now it works to provide additional ON/OFF inputs. With this and a WS2811 module, one could sense 768 digital inputs from two pins (one analog and one digital)....for this many however there's a big big problem in that it takes a minimum of 40 Ms for each reading using a Nano (delays). This works out to (768 x 40 = 30720) 30+ seconds to read them all :( To read 16 inputs takes 0.64 seconds and I'm all right with that.
Hi! I have a question, will it work if we map the readings of both sensors first? Because when I try to mapping both sensor readings, the serial monitor shows the same result on both sensors. even though the knob on the potentio (sensor) is in a different position. I have no clue to solve this problem, do you have the solution? Thankyou! Nice vid btw!
how can i build a system and connect 15 samples of MFC (microbial fuel cell)(it is almost like a battery, they produce electric) in same time for measuring current (low between 0mA to 3A) and voltage (between 0mV to 800 mV) continuously? I have an oscilloscope, if the system help me to get the reading continuously from the oscilloscope or independently measure them, both way is good for me. Please someone help me.
Shouldn't you put a diode between the right pin of the potentiometer and the ground to avoid the analog value of the ADC to be noise when the potentiometer is turned to get a low value ? Currently if the voltage of the middle pin of the potentiometer is lower than 0.7V, the ADC will return noise values.
I had tried this way on my project, using NodeMCU read a LDR and two soil moisture sensors. However, I faced some issues on low voltage from D2, D3 and D4 PINs apply to sensor, as the result, unstable input values are obtained
Great work man. Is there a way to do something similar with rotary encoder as they each eat up 2 pins and I need to make LOUPEDECK+ it has 21 rotary encoders which would take 42 pins so I am stuck and even midi world needs tools that could have 100+ rotary encoder
The concept of this method is to manipulate the enable pin of the sensor. And a question, what would happen if i didnt put a diode? Would a resistor work aswell?
Without the diode you risk losing some of your signal and/or interference making readings unreliable, a resistor will not have the same effect as the diode would.
@@cabuu4122 sorry, i dont know th name but it is this one www.ebay.com/itm/Voltage-detection-module-Voltage-Sensor-Module-for-Arduino-NEW-/331601523974
i want to measure voltage across an led. so i put VCC pin of the voltage sensor to anode of LED and GND pin of the voltage sensor to cathode of LED. I connect the S pin of voltage sensor to D3 on Wemos. Is it correct? I just have a problem on where to connect diode to the sensor..
@@viralina8765 It works just the same as the potentiometers in this video you have 3 pins { +, -, output} The output pin can be called signal or any other. Wiring: + goes to one of your preferred digital pins (in this video it was D7/D8) , - to Ground, Output/Signal goes to A0 (A0 is the analog pin on your board).
Hi! I really like your video! can I ask you if I could use a normal LED as diode, for 10k potentiometer? which parameter should I look for to understand it on my own? thank you very much!
This is incorrect.. 100% wrong. You are able to backfeed the signal through the pot not being read to ground, eapecially if the wiper is near ground where resistance is low. This is completely inaccurate and not recommended. You also dont have a full 5v going across the pot. And without analog refrence between signal ground and tge voltage being applied to the sensor i promise you dont have full range of analog input.
Hi, thanks for your feedback. I have used this method with success on a few projects albeit without much need for accuracy. A better option of course would be to use a multiplexer or a different controller entirely.
hello , so im new at arduino and has project using WeMos D1. WeMos just has 1 analog pin and i need 2 for moisture sensor and pH probe sensor. But the thing is the pH probe sensor just has GND and IN pin. What should i do about it ? and do diode necessary ? i dont have diode..
Thank you so much, I had a problem with a project and thanks to you I've found a solution !
when using a diode there would be 0.6v voltage drop
This circuit can destruct the Arduino when the wiper of the pot reaches the ground. Possible short-circuit!
Use the photon-pixel coupling method, it is a new approach in science for reading an unlimited number of sensors in parallel. You can do it with an Arduino and a cam.
thank you sir. Simple but very important information.
I think you have to reset pins in startup
void setup() {
Serial.begin(9600); //Start serial monitor
pinMode(Pin_D7,OUTPUT);
pinMode(Pin_D8,OUTPUT);
pinMode(A0,INPUT);
digitalWrite(Pin_D7, LOW); //Turn D7 Off
digitalWrite(Pin_D8, LOW); //Turn D8 Off
}
Too many WRONG readings for me. However, I decided this method could provide extra digital pins. To do this I eliminated the pot and it's connection to GND. I connected A0 to a 1N914 diode inline with a 1K resistor and from there to a two pin jumper. (input pins) From the other side of the jumper I connected to pin 7. I then altered the code to eliminate any Value_D7 readings below 900. Now it works to provide additional ON/OFF inputs.
With this and a WS2811 module, one could sense 768 digital inputs from two pins (one analog and one digital)....for this many however there's a big big problem in that it takes a minimum of 40 Ms for each reading using a Nano (delays). This works out to (768 x 40 = 30720) 30+ seconds to read them all :( To read 16 inputs takes 0.64 seconds and I'm all right with that.
Thanks for sharing this peachville
Very nice idea! liked it
Thanks for liking
Thank you very much. It was so helpful to me . Thanks
Thanks for the feedback Johan!
Wow, what a nice video.
on NodeMCU when I use the pin GPIO13 or D7 it works fine but if I change the pin the data I get is not correct any fix???
Thank you so much. A very nice sharing. You thought this method very well. Have a nice day.
Thank you! You too!
Question here!
Can you put 2 AnalogReads for 2 analogs for a joystick?
Hi! I have a question,
will it work if we map the readings of both sensors first?
Because when I try to mapping both sensor readings, the serial monitor shows the same result on both sensors. even though the knob on the potentio (sensor) is in a different position.
I have no clue to solve this problem, do you have the solution?
Thankyou!
Nice vid btw!
very good. How to measure current with ACS712?
how can i build a system and connect 15 samples of MFC (microbial fuel cell)(it is almost like a battery, they produce electric) in same time for measuring current (low between 0mA to 3A) and voltage (between 0mV to 800 mV) continuously? I have an oscilloscope, if the system help me to get the reading continuously from the oscilloscope or independently measure them, both way is good for me. Please someone help me.
Thank you very much , it's working
Thanks for the feedback and you're welcome!
Shouldn't you put a diode between the right pin of the potentiometer and the ground to avoid the analog value of the ADC to be noise when the potentiometer is turned to get a low value ?
Currently if the voltage of the middle pin of the potentiometer is lower than 0.7V, the ADC will return noise values.
How about X,Y joystick module ? There are 5 pins: GND, 5V, Rx, Ry, SW. Rx and Ry are analog outputs.
you would have to alternate very fast as they wouldnt work simoltaniously
Super useful thanks man!
Glad it helped!
I had tried this way on my project, using NodeMCU read a LDR and two soil moisture sensors. However, I faced some issues on low voltage from D2, D3 and D4 PINs apply to sensor, as the result, unstable input values are obtained
Hi, how did you fix this issue?
Great work man. Is there a way to do something similar with rotary encoder as they each eat up 2 pins and I need to make LOUPEDECK+ it has 21 rotary encoders which would take 42 pins so I am stuck and even midi world needs tools that could have 100+ rotary encoder
The concept of this method is to manipulate the enable pin of the sensor. And a question, what would happen if i didnt put a diode? Would a resistor work aswell?
Without the diode you risk losing some of your signal and/or interference making readings unreliable, a resistor will not have the same effect as the diode would.
can i get 5v power for every sensors with this?
Where is the love react?
what?
I love you!
A great not shit video. Thumbs up.
sir, I have a question.. How to connect voltage sensor to diode? which pin on voltage sensor should i connect to diode?
Hi there, all depends what voltage sensor you are using. Do you have one in mind?
@@cabuu4122 sorry, i dont know th name but it is this one www.ebay.com/itm/Voltage-detection-module-Voltage-Sensor-Module-for-Arduino-NEW-/331601523974
i want to measure voltage across an led. so i put VCC pin of the voltage sensor to anode of LED and GND pin of the voltage sensor to cathode of LED. I connect the S pin of voltage sensor to D3 on Wemos. Is it correct? I just have a problem on where to connect diode to the sensor..
@@viralina8765 It works just the same as the potentiometers in this video you have 3 pins { +, -, output} The output pin can be called signal or any other. Wiring: + goes to one of your preferred digital pins (in this video it was D7/D8) , - to Ground, Output/Signal goes to A0 (A0 is the analog pin on your board).
@@aront6465 tq sir
Hi
but when i removing 5 v the ADC Continue read noise between 0 to 1023 . Is there a way to isolate this noise?
Is your diode connected the right way round?
why will be interference while we shutdown one of the pins when the other is on ???
Sorry I don't understand your question, please try and explain
@@cabuu4122 i mean why there is an interference in reading when we dont use the diodes ؟
Hi! I really like your video! can I ask you if I could use a normal LED as diode, for 10k potentiometer? which parameter should I look for to understand it on my own? thank you very much!
Your measuring voltage is 3.3 volts so I would choose as low forward voltage as possible.
Great tutorial! It is possible to use one analog input using esp12e with multiple sensors?
Thanks! Don't see why not, I haven't tried it but you're right, the 12e also only has 1 analog input pin, gpio 2 I believe.
If i will follow your tutorial but using esp12e. I Should use Onewire.h right?
@@waweyonor6052 sorry I'm not sure but don't see why it wouldn't work as in the tutorial as they're both based on the esp8266
@@cabuu4122 but in d1 mini, onewire.h is working right?
@@cabuu4122 Hello again sir. can i connect d1 mini for arduino board ?
This is incorrect.. 100% wrong. You are able to backfeed the signal through the pot not being read to ground, eapecially if the wiper is near ground where resistance is low. This is completely inaccurate and not recommended. You also dont have a full 5v going across the pot. And without analog refrence between signal ground and tge voltage being applied to the sensor i promise you dont have full range of analog input.
Hi, thanks for your feedback. I have used this method with success on a few projects albeit without much need for accuracy. A better option of course would be to use a multiplexer or a different controller entirely.
hello , so im new at arduino and has project using WeMos D1.
WeMos just has 1 analog pin and i need 2 for moisture sensor and pH probe sensor.
But the thing is the pH probe sensor just has GND and IN pin.
What should i do about it ? and do diode necessary ? i dont have diode..
Hi there, maybe post a link to the sensor you are using, I'd be surprised if a sensor only had an input pin...
@@cabuu4122 its in indonesia www.depoinovasi.com/produk-975-sensor-ph-tanah-support-arduino.html
@@cabuu4122 can i use relay channel ? but idk how to arrange the sensor with the relay
can i use resistor instead of diode?
If you used a resistor you would reduce the amount of signal received by the input.
Is it possible to add multiple sensors to a sonoff device?
Sorry, not sure, haven't tried!
What kind of diode do you used here?
Hi, I used a 1N4001 1A 50V diode - www.banggood.com/custlink/KD3vQGDPON
Can i use MQ sensors for this ??
If they have analog out then yes, some have digital out though so do check first