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.

New to computer control

Status
Not open for further replies.

radioimp

New Member
Hi.
I'm new to computer control of circuits, having studied basic electronics in college.
Am currently involved in a program to build a computer controlled light switch, looking to expand it to give a computer controlled house.
I know there is commercially availiable stuff out there, but I'm going for the DIY route as a way to enhance my knowledge.

Basically, I'm looking for a way to control (switch on/off) a lot of things from a computer.
However, I don't really know anything about how to do this. I can program, mainly in C#.NET and Java, but not adverse to learning C or Basic to program a microprocessor/controller, although i'd prefer not to use assembly if at all possible :)
Any advice on how to go about this, or some basic tutorials, including which port to use (Serial, Parrellel etc) would be of great help.

Thanks for any assistance that this board can offer!
--
Tom Wardill
 
On off control of a light will be fairly simple. Communicating between your computer and the light controller will probably be the most difficult part.

X-10 is a protocol that sends signals through the wiring in your house. This is ideal for controlling things that controling mains powered devices. I don't know anything about X-10 though.

If you want a separate bus you could try the CAN bus. This is an automotive bus. The protocols tend to be complicated but the bus should be able to run on normal telephone cable (or CAT-5 if that wont work). CAN is well supported by microcontroller manufacturers so you should be able to find tons of controllers. The down side is that it is fairly complicated an will be more expensive than other simpler busses.

RS485 would be another option to look into. It is a simple differential bus that can use the UART (like the serial port of the computer but with different voltages) on a microcontroller to transmit and receive.

As far as learning microcontrollers: Atmel's AVR is designed to be used with C and is one of the faster controllers on the market. They come in all price ranges (1$ to ~20$). The PIC is a popular choice its a little slower than the AVR and not as C friendly but there is a ton of info on the web about them. The 8051 is a clasic controller that is available in a ton of different varieties from a ton of differnet manufacturers. The AVR is probably your best bet though. Atmel has a development kit for ~75$ that should get you up and running. I think there is a GCC compiler for AVR as well.

You don't need to bother programming in assembly (it does help to know a little though) C will let you do whatever you want and will be similar enough to C# that you will pick it up an hour or two. When you are buying controllers just stay away from the smallest varieties as the small amount of code space and ram will make C dificult; anything with 4K of flash or above should be fine though for small programs.

Hope this helps
Brent
 
These links are ripped from Nigel's signature. I believe he's the resident PIC Guru here.
Theres also stuff on the web for 8052 s but the PIC seems to be the way to go. They can use basic and I think some form of compiled c.
 
Status
Not open for further replies.

Latest threads

Back
Top