NE555

Hi,
I want to get 36kHz IR frequency using NE555.
I use 100kOhms resistor and 250kOhms tunable resistor, TSOP34836, 101pF ceramic capacitor and IR diode.
Using ElectroDorid program to determine the values.
I put led diode tu see when Tsop gets IR signal. Then Tsop gets IR signal led diode shines.

This is code:

const int tsop = 2;     
const int ledPin =  13;      

int tsopState = 0;         

void setup() {
  pinMode(ledPin, OUTPUT);      
  pinMode(tsop, INPUT);     
}

void loop(){
  tsopState = digitalRead(tsop);
  if (tsopState == LOW) {     
    digitalWrite(ledPin, HIGH);  
  } 
  else {
    digitalWrite(ledPin, LOW); 
  }
}

The problem is than IR diode and Tsop standing against each other led diode don't shine, but then I put something between IR diode and Tsop and pull out led diode blinks.
I want to know what I should change that then IR diode and Tsop stands against each other without barrier led diode shine and then I put barrier led diode stop shine.

36mHz?! That's 36 millihertz. 0.036Hz.

What you want is 36kHz - kilohertz. 36000 Hz.

Try with C1 = 0.001 µF, R1 = 3.9 K? and R2 = 18 K?. That would give you 36165.4135 Hz at 54.9 % duty cycle.

Or you can sacrifice duty cycle for a better frequency match:

C1 = 0.001 µF, R1 = 10 K?, R2 = 15 K? (36075 Hz, 62.5 % duty).

(I use this calculator: http://houseofjeff.com/555-timer-oscillator-frequency-calculator/)

Also, I have to ask if you really need this. What is the purpose of this system? You only need the 36KHz carrier wave if you are modulating a data signal for transmission across space (such as for sending remote control codes). If you just want to detect the presence of an obstruction across a short distance (a few cm) then you don't need any modulation at all.

Finally, please show us your schematic. A picture is worth a thousand words, and without that picture most of those words will be "show us your schematic".

sorry, yes it is 36kHz not mHz :slight_smile:
what I want is simple about one meter signal between tsop and IR diode. Then I broke signal led diode stop shine that's it, but I don't know the simpler way to do this without NE555

You're only really interested in the presence (or not) of infrared light, not sending any data. A 36KHz carrier is used for 2 things - 1. transmitting data, and 2. increasing the range by increasing the sensitivity of the receiver and filtering for the right carrier frequency.

The simplest system will be an infrared LED powered through a current limiting resistor (just like any LED), and an infrared photodiode or phototransistor. Point the LED at the detector and it will turn on. Block the light and it will turn off. To increase distance and accuracy you might want to focus the light through a small lens at the emitter end.

Basically you're looking at a longer range photo-interrupter:

Using a video camera or webcam can help as it can see the infrared light and show you where it's all pointing.

I do like in picture but still then IR diode and tsop standing against each other led diode don't shine, but then I move IR diode or put barrer and pull out led diode blinks. So what I do wrong?

Scrap the 555 and just power the IR LED directly through a resistor like any normal LED.

whats what I do put IR diode like a normal led diode using 56ohms resistor and the same resistor I use to tsop

code:

const int tsop = 2;     
const int ledPin =  13;      
const int IR =  12;

int tsopState = 0;         

void setup() {
  pinMode(ledPin, OUTPUT);
 pinMode(IR, OUTPUT);
  pinMode(tsop, INPUT);     
}

void loop(){
  digitalWrite(IR, HIGH);
  tsopState = digitalRead(tsop);
  if (tsopState == LOW) {     
    digitalWrite(ledPin, HIGH);  
  } 
  else {
    digitalWrite(ledPin, LOW); 
  }
}

Ah right. The TSOP34836 is not just some generic photodiode, but a specific remote control receiver tuned to 36KHz with PCM decoder built in. It's not really designed for use as a photo-interrupter.

You would need to not only generate a 36KHz signal, but also use it to encode a PCM signal. The TSOP will then decode that signal and give it back to you.

You want to replace it with just a very basic cheap bog-standard IR phototransistor.

now I understand, thanks for help, now just need go to electronic shop :slight_smile: