I am trying to make a circuit that can detect infrared.
on the left hand side I made a simple series circuit that turns on an Infrared LED. On the right hand side I made a potential divider circuit with an infrared receiver and 2000 ohm resistor (I think), so if infrared is high, the infrared receiver resistance goes down, current in the whole circuit goes up and the resistor p.d goes up so the infrared reciever p.d must go down.
However I placed a flame near the reciever and the voltage values do not seem to change much, so I am wondering if I did this correctly or not.
int VoltMeterPin = 5;
int PositiveTerminal = 6;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(PositiveTerminal, OUTPUT);
digitalWrite(PositiveTerminal, HIGH);
//pinMode(VoltMeterPin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int raw_value = analogRead(VoltMeterPin);
float voltage_reading = (raw_value/1023.0) * 5.0;
Serial.print("Raw Value: ");
Serial.print(raw_value);
Serial.print(" Voltage: ");
Serial.print(voltage_reading, 3);
Serial.println("V");
delay(200);
}
I rewired it now and the readings have changed to around 4.995V. However when I place a flame near the receiver the voltage doesn't change noticeably, I am kind of thinking that maybe this receiver only accepts infrared of a certain wavelength and if that is the case, the infrared LED may be too far away or does not have enough p.d as there is only a faint glow coming from the LED when I use my camera to check if it's on. I am not too sure as I got the reciever from a kit off of ali express and it doesn't say what make the Reciever is.
Did you read the pinned post re 'How to get the most from the forum'?
One thing we need (already mentioned) is a photo(s) of a hand drawn diagram of where every wire goes, with labels if needed and data sheet links to any non common parts (we don't need UNO for instance)
Photographs of the project suffer from several problems. Most people do not capture an image such that both ends of all wires are visibe. Also the pin numbers must be visible. If the angle is wrong it is easy to confuse wires. For those reasons and more hand drawn as you look at them not a copy of a published schematic, but your actual wires is super important if you do not want to waste our time.
A flame is a pretty broad band of IR radiation with various intensities over a range of 1 - 15 µm. The detector in your kit is probably not sensitive to any of the stronger peaks. Some commercial detectors operate in the 4.3 µm range. The detector in your kit is probably better suited for IR in the 1.1 µm range and there is not much of that in your flame.
You didn't explain which IR sensor you used, but just to clarify: what type of infrared source are you trying to detect?
If it's simply "heat" (e.g., a flame), you can't do it with a regular infrared receiver, at least not that way; you'll need a "Flame Sensor Module" like the KY-026.
If you're thinking of an infrared signal from a remote control, keep in mind that a "carrier" frequency is used (e.g 38 kHz, used to avoid detecting other infrared sources), so you'll need to "filter" and "decode" the signal to analyze it.
Here is a better (I think) capture of my problem. I added a circuit diagram and what not.
I think I have been able to solve most of the problem, after doing some research apparently the Short end of the reciever should connect to 5V volts instead and the long end connects to GND. So in the 4th picture of the circuit itself, to the top of the resistor is the negative end of the IR reciever thats connected to the Positive terminal wire at the bottom of the right half of the picture.
After rewiring the potential divider circuit to account for this, it is a bit more responsive now, i.e when there is a line of sight to the IR emitter P.D is around 4.7V - 4.8V, when I block it with something black, It goes to 5V. However, what I am still stuck on is why is this drop in p.d so small? I think it could be the resistor I am using (Which I do not know the resistance value of so you could try work it out if you want because I find it difficult to read off of those stupid colours). I think it may be too high? Or I did read that the current produced by photodiodes is very small so you may need to amplify it but I am not too sure how much of that applies to the IR sensor.
Also here is the code.
int VoltMeterPin = 5;
int PositiveTerminal = 6;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(PositiveTerminal, OUTPUT);
digitalWrite(PositiveTerminal, HIGH);
//pinMode(VoltMeterPin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int raw_value = analogRead(A5);
float voltage_reading = (raw_value/1023.0) * 5.0;
Serial.print("Raw Value: ");
Serial.print(raw_value);
Serial.print(" Voltage: ");
Serial.print(voltage_reading, 3);
Serial.println("V");
delay(200);
}