New here.. Will need help fr time to time on my first 16f877a project XD

Status
Not open for further replies.

Excal

Newbie level 6
Joined
Sep 25, 2010
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,407
Hi everyone,

I have just joined today XD

So maybe tomoro or in a few days i'll start to build my circuit using 16f877a..

I have seen a few sample circuits and roughly will be trying to implement those hopefully without much problem..

Just that I have ran into some problems trying to interface an ir receiver to the input of the pic..

If i am not mistaken, an ir receiver module can be used like a switch right?

So does anyone have any idea how to make a simple ir circuit for receiver? Can i just use the TSOP(models recommended?) chip which i have read about in a few other threads?

I do not plan to make a transmitter though.. was thinking of just using a normal tv remote control to do it XD

At the same time i am learning how to use proteus 7 from youtube.. I heard it is a good simulator for pic or do u have any other recommendations?

Will update more once i get the designs started... =)

---------- Post added at 02:46 ---------- Previous post was at 02:42 ----------

Oh ya i was planning for something like, erm when u press the button, the system will start up and if u press again it will stop..

is it better to use it to change the input like switches connected to the pic input pin or to use it to turn the 5v powering the pic on and off?

Thanks again =)
 

If i am not mistaken, an ir receiver module can be used like a switch right?

so can a toaster.

So does anyone have any idea how to make a simple ir circuit for receiver?

yes.
 

Btw will sunlight affect the IR receiver module?

or is it better to use and rf transmitter and receiver?

In terms of economical IR is cheaper?
 

Hi,

Well you will get help here, but at the moment you are going full throttle before you seem to have done the basics.

If you search this forum and the web there is loads of stuff on IR and RF to Pic transmitters and receivers .

However you do not mention anything about the elementary things like what language are you programming in, do you have a development board or breadboard and what kind of programmer / software do you have ?

Once you have those basics then you need to learn how to start programming with the simple tutorials that comes with most languages, like how to flash a led and how to read a switch input etc.

Once you learn those basics then things will be a lot clearer and easier.

Although many of us will occassionally use snippets of other folks code to help us get past a particular problem, some folk just lift other peoples complete programs and get things working that way - perhaps ok to start with but what will you learn doing it like that.

Enjoy..
 

I am using MPLAB ide..

Usually i am using C++ to program, but last time in my robotics club, they have bought the ready made circuit board, so pretty much all i learnt was programming and not much of the hardware stuff since the board is already made and done.

so i am a bit confused XD

i wanted to do something with the remote if possible

YouTube - Remote Control & PIC 16F877

Any help will be greatly appreciated =)

My circuit will be loosely based on,

https://www.cytron.com.my/datasheet/AutonomousRobotControlBoard/AR40B_schematic.pdf

This is the circuit board that i mentioned about earlier that we used in our club. But mine should be something more simplified, I won't be having motors to drive and maybe only 1 or 2 relays.
 
Last edited:

you are going full throttle before you seem to have done the basics.

that reminds me of toddlers who want to race in the Olympics before they learn how to walk.

---------- Post added at 11:44 ---------- Previous post was at 11:43 ----------

so i am a bit confused XD

because you know so little about what is required to do what you want to do.

You can get where you want to be faster if you slow down and learn the basics.
 

yup.. i agree that's the unfortunate thing when the basics is not grounded right.. sigh..

any recommendations on what to start with to learn the basics of IR?
 

Hi,

Well cannot help you with C as I only do Assembler but just look around the forum / web any you should find some good C tutorials.

As for that ytube IR demo, basically all it is doing is receiving a number from the IR receiver and then changing the displays according to that number.
Just learning to use a simple switch and a led as I mentioned before and you can effectively do the same - its very simple if you think about it.

Adding the lcd or IR receiver is just ans extra input / output method that you can add on once you have the basics ok.

That circuit diagram is very complex, if you are using Proteus why not draw out a much simpler design you can build as a test jig.
You just need a simple psu, battery or wall pac, 5v regulator, pic chip and crystal and then add a port of leds and resistors, a couple of input switches and a couple of relay outputs.
 

Its ok.. I have learn C++ before so the programming part is not a problem hopefully.. (who knows what will happen later, maybe i'll get stumped again =.=)

I might not put the LCD.. just wanna add the feature to turn on and off my circuit using any household remote control.

That's the main thing i wanna ask actually.. bout using the IR as a switch. What components should i use actually?

Oh ya, btw u mentioned about using PSU rite? I have bought a PSu actually so if i were to use the 12v and 5v rail, will it fry my pic since psu is meant for high current applications? or it won't cuz the pic will only draw the required current needed? I have read some tutorials bout making a psu into a simple power supply for small circuits and usually a power resistor is needed, but i feel that it is not needed.

and since we usually have a voltage regulator from 12V to 5V or something similar, will it be alright if i remove the VR and just use the 5V rail from the PSU and 12V. Imagine 3 lines on the breadboard, one is 12V, 5V and GND but this time its just 3 wires from the power supply coming in (no VR at all). I feel that VR is wasting energy for the conversion, but i am not sure whether the 5v rail from the psu is stable enough..

Thanks for ur advice, WP100. I'll try to draw the simpler circuit out and post here when i am done XD
 

Hi,

Providing the PSU you have got is supplying a regulated +12v and +5v then it is fine to use, your pic / circuit just uses th current it needs, so no need for an additional 5v regulator.

You would typically use the +12v to drive your relays etc.

When using a powerful PSU then on each line, +5v and +12v it might be worth fitting a small fuse, say 250ma and 500ma respectively so if you do have a short on your circuit its not going to blow with the full force of the big psu.

You can post you circuit and have it checked before you build to be sure.

This is a good tutorial which describes and shows simple IR hardware but the code is assembler,but it should show you it idea - sure there will be some C code out there.
Nigel's PIC Tutorial Infrared Board
 

Hi guys...

Its been a week since i last posted.. abit busy here n there anyway, i have just finished the ir transmitter circuit in design (about 56kHz). Actually i wanted a 38khz device but unfortunately i only get to buy tsop 1356 which detects 56k..So i was forced to make a transmitter circuit instead of using any available tv remote out there.. XD

Will continue on my pic design next.. =)

The Diode D1N4002 will be replaced by the ir led of course (can't seem to find the led symbol in pspice)

Questions:
Is the circuit ok? I have simulated it with pspice but if there is any improvements needed do tell.. May i know where is best place to put the push button? Right at the 5v dc source?

Attached:

 

Hi.. Just wanna ask another question..

Is it better to attach a fuse before connecting the 5V from the pc psu to the pins of the pic?
 

Hi,

A fuse being a safety device is always welcome, though few bother with them in many of todays circuts, so when things do short they usually blow everything .

Just fit one in your main +5v line - current ..? - just a simple pic and leds try 100ma or 250ma.

You say you are using the PCs +5v, whats happened to your power suply unit..?

Re your previous post /diagram R6 and R7 values seem wrong 1,000,000 K ..?
 

I think just for safety i have used the 12 V connected to a voltage regulator with the usual caps and diodes, just in case the 5V rail from the psu supplys to much current or is unstable.. I am afraid i'll fry my pic then.. better to fry the voltage regulator first XD

My power supply unit = my pc power supply unit.. The ATX kind ones.. hehe

R6 and R7 is put too very very high cuz pspice didn't allow me to float the pins.. I googled and read somewhere that to float it just put a very very high resistance connected to it.. XD

Attached is the latest circuit diagram for the 56k IR remote.. Do u think the switch (PUCH) is placed correctly? Its supposed to be a push button which once pressed will enable the 555 to release a short burst of the infrared signals.. I am not too sure bout it cuz whener i simulate with proteus, regardless whether the switch is toggle on or off, the led continues to blink lol

Another question would be a bout capacitors.. Its ok rite if i replace the non polarity caps with polarized electrolytic caps?

Thanks again.. =)

 

Hi,

Well the 555 can run on 5 or 12v if you change your led resistors - a fuse is still a good idea even with a regulator.

C3 and C6 should be standard electrolytic caps, the rest should be polyester or ceramic .

Your switch input is wired incorrectly - see here for correct example 555 and 556 Timer Circuits
 

Correct me if i am wrong.. erm the reset pin is active low.. so when the push button is toggle open, the reset pin should be grounded which means that the chip is in a state of reset rite?

and then once i press the push button, the circuit will be connected to the 5v Vcc and give a high on the 555 reset pin which means when i press, i give a burst of ir signals rite?

the circuit in the web link connects the reset pin to vcc and will the chip will be resetted when the button is press.. however in my case to transmit a short burst of ir such as a remote control (when u press only it starts emitting) shouldn't i actually ground the reset pin and bring it to high when the clock is needed?

Thanks for further clarifications.. i am still a bit baffled..



Or maybe should i just connect a tact switch between the 5 V supply and the 555 timer? Only when i press there will be power? And the reset pin is put to high.. Will it be better?

---------- Post added at 19:23 ---------- Previous post was at 18:47 ----------

Image attached with switch position changed.

 

Hi,

As that tutorial states -
Reset input: when less than about 0.7V ('active low') this makes the output low (0V), overriding other inputs. When not required it should be connected to +Vs. It has an input impedance of about 10kohm.

So that means when the Reset pin is held at 0v then it resets the 555 and its output stays Low.
When the Reset Pin is taken High then the 555 can run as normal.

All you need is the Reset pin connecting via a 10k resistor to Positive and a switch to 0v as it shows in the tutorials diagrams.
 

When not required means the pin is not used i suppose. I simulated with the connection which is to connect the reset pin via a 10k resistor to positive, and a switch to 0v.. the led is still flashing and only stops when the button is pressed (sinked to low). I actually need it to function the other way round.. flash only when its pressed. So maybe its more feasible if i connect it to the 5v supply? that way it will cut the vcc supply to the 555 timer when not needed..
 

Hi,

Easily done, just connect the Reset pin to 0v with the resistor and to positive with the switch.

The resistor holds the Reset Low until you press the Switch which pulls it High and you are running.

While 10k to ground will work in your simulator you when you actually build the circuit you might have to fit a lower value say 2k2 or 1k.
 
Reactions: Excal

    Excal

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…