Let's Make Robots!

Help with 555 circuit.

Well, I have got the 38khz distance sensor working in picaxe form.



Now I am trying to wire-up a stand-alone unit with a 556. Now I know this is a RTF(data sheet) moment and I know the resistor/resistor*cap/2 (or whatever) equation, but the final circuit is still above my head. Are there any of you circuit guys out there that can do a little drawing for me? Maybe with a couple pots for fine adjustment? I plan on the final output going into a picaxe using the pulse-in command.

Thanks in advance.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
He seems to be the circuit guru... :)
Some smarty pants thought he knew it all and did some write up. No final circuitry there however. His pants were not smart enough for that.

I belive this http://upload.wikimedia.org/wikipedia/commons/3/3d/555_Astable_Diagram.svg circuit should be what you search. One 555 should flicker at 38kHz and other - on some other frequency. First one's output is connected to other's one reset pin. This should give the right signal.


I provided no pinouts, real scheatics nor calculations but maybe this is enough to figure rest out.

Right on man... :P

Is this what you seek?


Can you please respond so that these guys can stop polishing their crystal balls!

I guess I was not so clear. I added the two "here" links but I guess I should have been more specific.

I am trying to build a distance sensor using the 38khz 3-pin IR sensor as described in the above "here" links. I simply don't know what values of resistors and caps I should be using. In terms of the concept, I am working off of the ideas of others on the subject. I am posting below some comments from other posts which should make more clear what I am wanting to do.

OK, it seems I have generated some interest and more than a few questions with my post about IR distance measurment. I haven't found my old notebooks yet, (still packed away after the move), so I'm going from memory here.

As I explained in the previous post, the transmitter produces 40Khz bursts with a 50/50 duty cycle because that is what the Sharp GP1U52X IR receiver module expects to see. The module was used extensively in the 80's as the IR remote receiver module in many TV's & VCR's. It was also sold by numerous outlets like Radio Shack, Electronic Goldmine, All Electronics, etc, for a couple bucks. It is a 3-pin device that has ground, VCC, and output, (open collector needs a pull-up resistor).

The module consists of a detector, (pin diode I believe), PLL, and output section. Sony sold a similar module and both were available in 38Khz and 40Khz versions. Implementation is very simple and exploits a characteristic of PLL's in order to work.

Lets say, for example, that the PLL in the Sharp module requires 5 cycles of a 40Khz signal to lock and output a signal. This is a constant. The signal we are producing with our 567 circuit is also a constant with the same number of cycles produced in each burst, (let's say 1000). At zero distance, the output switches for the period of 995 pulses and would appear to be "on" 100% of the time.

As the distance increases, some of those pulses are "lost" due to refraction, absorbion, etc. It still takes the same 5 cycles to turn on the PLL but now there are fewer cycles to keep it turned on. The output remains switched for a shorter period. So, the output period is inversely proportionally to the distance measured.

If you just need simple proximity detection, you can feed the output to a simple window comparator to give you an output at any specified distance.

Or,you can use an integrating capacitor and measure the average DC developed accross it.

For more exact distance measurements, you can use a processor to measure the pulse width and compare that with your custom "look-up" table. The custom table is necessary because due to the particular LED you use, placement, driver current, etc, measurements can varry from circuit to circuit.

Hopefully I have given you enough to play with the circuit on your own.




It is possible to build ir distance sensor from 38kHz sensor. You need the sensor and IR led. Sensor's output goes to input pin and IR led's one leg goes to output leg so your controller is able to flicker it.

If the LED pulses at 38kHz (and 1kHz too if just pure 38kHz doesn't work) then the sensor is able to detect LED about 10 meters avay. If you mount them side by side then sensor sees things what are closer than some X range (lets say, 2m) and if there is no things closer then sensor sees nothing. Sounds pretty useless.. But now, lets look at the following graph:


Bingo. So if robot sees something when using 38kHz modulation then robot can increase modulation frequency until it sees nothing. Then it is possible to calculate(look up from table) distance by modulation frequency.


This sounds like something very complicated. But it doesn't have to be. It is possible to use just one modulation frequency. Then it is possible to say if there is an object closer than 20 cm or some other random distance.


And, the width of beam equals led's beam width. More than one sensor can be used but then they should be in shrinktubes or something so random ir light from other sensors couldn't shine at/in them.

Select ratingPoorOkayGoodGreatAwesome


found this as well, though it's only for the 555, you can figure out the connections.



Have yoiu considered using a PICAXE 08M to generate the pulses? Should be much smalller, and pretty straighforward. 

I've been doing my initial tests with the pulses generated from a picaxe. The 555/556 thing is so I can make an easy/cheap stand alone unit.