Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

Hobbies Electronics Enthusiasts Club, All elect/robotics lovers! pls come!

views
     
Chein
post Oct 30 2008, 02:26 PM

New Member
*
Junior Member
5 posts

Joined: Oct 2008


for those who just can't stop tinkering, disassembling, re-creating and inventing cool new uses for the technology in our lives


QUOTE(sshlady @ Sep 9 2008, 03:39 PM)
a part of my project is to control electrical appliances using pc.

parallel port<mcu<electrical appliances ie: lamps,fans etc

a friend did almost the same project only that he uses led to demonstrate the appliances part where he needn't to consider 240V ac supply from ac mains. here is where i got it all confused.

1)how do we isolate the high voltage from mcu and pc?
-i googled around and found this. http://www.codeproject.com/csharp/control_...&select=1286423
It says opto coupler isolate the pc from ac power supply. How about the relay?i only heard about these two components over a year ago. so, complete noob here.

2) i want to add a dimmer circuit connected to my lamp/bulb.

pc>mcu>dimmer>lamp>ac mains

i should add an opto coupler between mcu and dimmer, no?
my primary concern is safety.So i need some assurance that this will not blow up on me. *Hee*


Added on September 10, 2008, 8:44 pmhelp, anyone?
*
i'm going less technical with the explaination. What youre planning to to do is actually quite easy. On a parallel port (That LPT1), each 'ON' state supply 5v on the each of the 8 output pins.

so what you should do is pretty much use that 5v to flick a wall switch. That where the relay comes in. the 5v will drive the relay which will to turn on another circuit, in this case the AC 240 main switch for the appliance. Your friend on the other hand uses that 5v directly to light up an LED.

How to achive the ON state on the pins, is by programmatically duping the PC into believing it's talking to a printer/etc thru the parallel port.

the guide above pretty much explains that, and it comes with the DLL that simplifies the process. But you still need to be handy with VB.NET/C# to make any good use of it. write a code that call the DLL and use the HEX addressing to trigger the ON state on the pin u choose. each pin will have one relay, tht switch one circuit, that will turn ON one appliance.

The opto coupler are there to protect your PC's motherboard from back EMF coming from the parallel port. It's good to have if you love your PC, but not a nessessity to get it to work.


And finally, do you want to control the dimming from the PC as well? If yes, then thereare two approach to that, mechanical approach or by using a controller. Well go to that once you've experimented with the above guide and understands the "idea" first.


Chein
post Jan 17 2010, 03:37 AM

New Member
*
Junior Member
5 posts

Joined: Oct 2008


Folks, i'm looking to dabble with microcontrollers, not for a school project or anything, just for the heck of it..

So I would really appreciate if someone could point to which mc should i start with (part number etc), the programmer to use and where to get them (cost?). Seen quite a few mc/programmers on sale at Jln Pasar so it's quite intimidating for newbie like me to decide and choose (PIC/Atmel/etc?)

I'm pretty OK with electronic and coding so i'm not really starting from scratch, just zero experience in the mc department :|

Any kind of lead will be great smile.gif
Chein
post Jan 19 2010, 11:00 PM

New Member
*
Junior Member
5 posts

Joined: Oct 2008


QUOTE(Aurora @ Jan 17 2010, 03:58 AM)
Hi Chein, what kind of project you have in mind? I'm using PIC (aka microchip product) because there are plenty of guidelines, code examples in books and www. Some of the most used and cheapest uC is PIC16F84A and PIC16F877A.

Atmel has a slightly different architecture, and able to execute more instructions per second. But to me, it's just the same. There are plenty of guides for Atmel as well. The most used Atmega16, 32 and 168.

Atmel has slightly better advantage in terms of coding. It come with a free C compiler. While Microchip free C compiler has some limitation, otherwise user need to purchase the unrestricted C compiler. Otherwise, if you are familiar with assembly code, both also support it.

Arduino (based on Atmel uC) is getting more attention recently, because it provide a simple board that allow user to connect to their PC, program it (in C), and execute the code. Very good for beginner.
*
I have no particular project in mind, just planning to do some F&T (fiddle and tinker) smile.gif

Let say I'm looking for something that can be programmed from a PC, would Arduino be my best choice? Correct me if I'm wrong but don't think I can easily get it at Jln Pasar can I?

And if i'm not mistaken also, isn't both PIC and Atmel also must be plugged onto a programmer board that connect to a PC (via USB/serial port) in order to be programmed? Think i've seen those on sale at Jln Pasar

Honestly, i'm hoping of making purchases when i get my next paycheck. So im trying to come up with a shopping list smile.gif

 

Change to:
| Lo-Fi Version
0.0145sec    0.48    7 queries    GZIP Disabled
Time is now: 29th November 2025 - 06:26 AM