Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

coding using pic 16f877a with tsop4p38(proximity sensor)

Status
Not open for further replies.
You do not need a circuit for constructing the receiver. It is included in the TSOP4p38. Please study that datasheet again.

In your post #26, you described how to connect that receiver to your MCU. Those connections look OK to me and were the ones recommended by Vishay. All you have to do is get the programming done and, of course, get your MCU connected to power and whatever output devices you intend to use.

John

View attachment 61278 as you can see...this tsop4p38 volt supply using 3v dc right???? not 5 volt right??but the pic using the 5 volt....i had constructed my power supply already ...if you say yes to this question....i just need parallel it more to get 1 more out using lm7803...:p

look at this attachment sir john View attachment 61280 is this valued as 0.001u or 0.01 u?
 
Last edited:
When I said that 14K is not a standard resistor, I was referring to 5% resistors. Resistor values follow available standards based on the tolerance. That is, there are fewer values available for 5% resistors (E24 series) than there are for 1% (E96 series).

This chart may help: https://www.logwell.com/tech/components/resistor_values.html

John


but what i can see from the circuit..all the resistor using 5 percent of tolerance...are i have to parallel it all???? or just resistor r2 only???
 
Last edited:
i have understood now about my question here... :p


i had constructed my pcb for this circuit...but it doesnt work..no output at all....this is the scematicView attachment 62605

is this circuit had got any problem.....( solved = the d1 diode ...cathode is connected to trigger pin 2 of timer555 )...tomorrow i will tested it with 9v of batt....can i use 9v batt????.....i dont want to use combined battery of AAA & AA size battery
 
Last edited:
You don't have trigger connected to anything in U1.

John

i want to know...why the input dc voltage such as 7v...will make the output ir voltage will become 6v-7v.... if the output voltage of the ir is 7volt.....can it compatible to make the receiver to respond....(please i want to know this)
i have solved the problem i had mentioned before...this the problem.... as in the picture in red line i had sketch... (reminded that the r7 value is 2k ohm and the r3 is 12k ohm.) View attachment 62913
the problem is..... the output waveform althought the output voltage is around 4.7volt . i'm using the 6v batt. and the output volt at the ir is around 4.7 volt....and i had try to see its output...and this is the record i got from digital oscilloscope...as below:

frequency:6.476khz
period:154.4us
mean: -4.68v
peak to peak:4.96v
rms: 4.69v
min: -4.88 v
max" 80.0mv...

as in the record...the frequency i should get is in 38khz to 40 khz....and the period time should in 100 ms.....what should i do.. the receiver can't detect this kind of signal... if i got make the two device interface..surely i can make the program by my self :( as in this datasheet....View attachment 62914
 
Last edited:
I am not sure I catch all of your questions.

1) Voltage output versus input: Check the datasheet. The 555 you are using is not CMOS and cannot swing its output to the power rails. Thus, the max output voltage is approximately Vcc-1.7V at 100 mA. That voltage drop increases slightly at higher currents. That is all explained under "Electrical Characteristics." For the LM555, the output voltages are described on page 4 of its datasheet.

2) Frequency: The 555 is a robust device and is relatively stable. However, the frequency of this circuit will vary with the supply voltage. (Note, there are diode voltage drops introduced, not just resistors.) What voltage do you intend to use? I did the spice model at 5V for the reasons stated in that post. Now it seems you have tried some other voltages. Pick just one voltage that you want to use. Let's get it working at that voltage. Then, if you want to change the voltage, you will have a starting point to know what will need to be adjusted.

3) The higher frequency oscillator in the asc file you attached is oscillating at 46 KHz in simulation. That is probably due to the voltage used. See #2, above. When you reference a specific frequency, is that measured on a prototype or from the simulation?

John
 
I am not sure I catch all of your questions.

1) Voltage output versus input: Check the datasheet. The 555 you are using is not CMOS and cannot swing its output to the power rails. Thus, the max output voltage is approximately Vcc-1.7V at 100 mA. That voltage drop increases slightly at higher currents. That is all explained under "Electrical Characteristics." For the LM555, the output voltages are described on page 4 of its datasheet.

2) Frequency: The 555 is a robust device and is relatively stable. However, the frequency of this circuit will vary with the supply voltage. (Note, there are diode voltage drops introduced, not just resistors.) What voltage do you intend to use? I did the spice model at 5V for the reasons stated in that post. Now it seems you have tried some other voltages. Pick just one voltage that you want to use. Let's get it working at that voltage. Then, if you want to change the voltage, you will have a starting point to know what will need to be adjusted.

3) The higher frequency oscillator in the asc file you attached is oscillating at 46 KHz in simulation. That is probably due to the voltage used. See #2, above. When you reference a specific frequency, is that measured on a prototype or from the simulation?

John

i wanted to use the 9v of battery....it is more easy to plug it also....i dont want to use AAA battery....the record measurement is what i get from the digital oscilloscope...i dont know why the reading slightly big different....and the receiver does not respond due to the transmitter....i know it because i have put the oscilloscope probe at the receiver...it doest not working...the sensor is confirmly ok....but the transmitter is the problem
 
Last edited:
the output voltage is varies the input voltage.....same with frequency..the higher input voltage..the higher frequency obtained..... but now im using battery....how i'm gonna to make it constant frequency :(
 
Your 9V battery will not have much current capability nor last very long. Are you sure that is what you want to use?

John
 
Last edited:
Your 9V battery will not have much current capability nor last very long. Are you sure that is what you want to use?

John

i dont know if this is the right choice to choose....i want the transmitter sized as big as a cigarette box....so what did u suggest to me....
 
Last edited:
i got confused here....there is one resistor u ask me to parallel...but im not parallel it...my lecturer said to me that i doesnt necessary parallel it.... and my circuit is contructed serial like this View attachment 62970.... is this ok to produce the desired output for the tsop4p38 ??? and if i want to parallel it..i have to use two valued 22k resistor with 5 %.... ( is this okay???? because the rn i got is 11k)... like this image View attachment 62971....so which must i choose between this ...are there any different between this two kind of assembling....it must be affecting the time in us....maybe...i dont know if i was true
 
Assuming you can fill that size half with batteries, there are lots of choices. Consider any of the lithium chemistries, NiCd or NiMH. Lithium-based batteries are usually 3.2V (nominal) per cell; Ni-based are 1.2V per cell. Fresh batteries give higher voltages than that. Thus 2 lithium batteries with a low-drop out voltage regulator will give a pretty constant 5.0 V. Regular alkaline/carbon batteries can also be used at 1.5 V each. You could also use a regulated wall wart.

You might want to consider driving the oscillators and receiver from a regulated supply and using a transistor to power the IRED from an unregulated supply -- same battery, just no regulator. Since you are including an MCU in this project, you will probably have a regulated voltage anyway.

I have absolutely no idea what resources you have available, so the choice of battery/supply has to be yours. Remember, rechargeable batteries need chargers.

John
 
ok.... i think i will supply my transmiiter with a 12v batt....and then i will constructed a power supply circuit...which is i have....and then make it to 5v....
i want to ask earlier post...about the resistor connection that i had mention in #56 post....
 
A 2K plus 12K resistor gives 14K too. But, if your instructor told you to put the 2K right after the source, that was wrong, as it will affect the frequency of both oscillators if placed there.

Keep in mind that if you need 14K, it doesn't really matter how you get it. You can use any of a variety of parallel resistors, series resistors, combinations of parallel and series resistors, or a potentiometer without or without a fixed resistor. I recommend getting the project to work first. Then worry about the resistors you are going to use.

John
 
Just to clarify: Do you want the transmitter to run on unregulated 12V, regulated 12V, or regulated 5V produced by a 12V battery?

John
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top