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.

programming a microcontroller as a eletrical switch

Status
Not open for further replies.

umarfarouk

New Member
The microcontroller wil act as the master switch and can be used to control other switches of electrical equipments.the microcontroller is also connected to a light sensor and temp sensor,so it can regulate when to on d lamps and when to on d fans. Please i need help on this project,if you have any idea please help and send to my email asap!
 
Last edited by a moderator:
Microcontroller will act as switch master, for that you need to connect the relay for switching, wherein uC will provide the signal for switch the relay...
then you need sensors to be connected like temp sensor, for that you need to connect it with ADC if you are using 8051...
And you need a light sensor for that you can use Photodiode Light Sensors, Optical detectors or something....

Now firstly you need to decide wat controller you are going to use based on the above requirement, and if anything else that you want....
 
Last edited:
Mosaic, I dont whom you are pointing for Yoda speak, but certainly pardon my english as I am not that good at it....
 
Thank you all so much. Ma special thanks to Dj. Though i need more explanations because am new. I want to use PIC16F84A. I heard its d simplest. I hope you can help me wit the codes am circuit diagram
 
I would use a 18F1230 but you may live where it's hard to get that chip. So i would say find a 16F877A which there a lot of code for it to look at and learn by

What language to program in are you wanting to use
 
Certainly umar will help you in all regards firstly you need to decide from where you want start...
And you can go for pic16f877a, it does have the ADC inbuilt....
 
I am so pleased with the help i am getting from you all... I tink d 16f877 is likely to b available here.since it has ADC.is there anyting more i should know? Before i forget,am new in programming.
 
Firstly just study the datasheet of 16f877 and get the overview of the controller...
And you need to decide the regarding the language you are going to use, is it C or basic?
 
Last edited:
Now decide the from where you want to start, try first with simple program,
switch and LED program, wherein when you press the switch and corresponding ouput should LED should glow.
I hope you are having the hardware available with you...If not then first you need to design the hardware part...
 
The hardware is not a problem,d only problem is the programming of the 16f84a.and i just have little time to incorporate the pic into the hardware then submitt. Pls Sir guide me on writing the program or you can help me write the program and send it to my email! I appretiate your time Sir!
 
umar please make sure with which pic you are going with is it 16f84a or 16f877a....
And will certainly help you in writing your program... first atleast you start and also wic compiler you are going to use...
 
Sorry i wanted to say 16f877, am familiar with the codes of 16f84a dats y i mentioned it.and i use mplab ide.but am using 16f877 because of the ADC.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top