Can ATmega16 be used for controlling lamps via USB or LAN cable?

  • Thread starter Thread starter AliGh
  • Start date Start date
  • Tags Tags
    Control Program
AI Thread Summary
The discussion revolves around creating a program to control a lamp using a USB or LAN connection, primarily using C#. Participants explore various methods for physically controlling the lamp, including using relays, USB widgets, and potentially microcontrollers. Suggestions include searching for USB-controlled power outlets and considering WiFi-controlled options for added functionality. There is a debate on the practicality of using microcontrollers versus simpler solutions, with some expressing skepticism about the necessity of complex setups for controlling a single lamp. Participants also discuss the possibility of using diodes and transistors to manage current and suggest resources for programming USB interfaces in C#. The conversation highlights the need for appropriate hardware and software solutions, including recommendations for IDEs and compilers for programming with ATmega16 microcontrollers.
AliGh
Messages
64
Reaction score
1
A friend asked me to write him a program that contorls a lamp with USB or LAN cable
I've seen people using printer cables with Matlab to control an LED matrix ..
I use c# as programming language if there is any way or any command that i can use to control it with windows form application or console application ..
 
Technology news on Phys.org
AliGh said:
A friend asked me to write him a program that contorls a lamp with USB or LAN cable
I've seen people using printer cables with Matlab to control an LED matrix ..
I use c# as programming language if there is any way or any command that i can use to control it with windows form application or console application ..

How are you going to physically control the lamp? Do you have a lamp that has a relay inside it that can be controlled via USB or something? Or do you have a dim-able lamp with some intelligent interface?
 
berkeman said:
How are you going to physically control the lamp? Do you have a lamp that has a relay inside it that can be controlled via USB or something? Or do you have a dim-able lamp with some intelligent interface?
He said he just needed a program for one lamp ... He might use transistor to control a higher current
 
AliGh said:
He said he just needed a program for one lamp ... He might use transistor to control a higher current

Well, you can write your program to control a USB widget that has a relay in it that has the safety approvals and male and female AC Mains outlets on it. That would be one way to control a lamp.

You might try Googling Computer Controlled Lamp to see what-all is available hardware-wise... :smile:
 
  • Like
Likes AliGh
There are a multitude of kits and assembled boards available for PC I/O and usually with software included .

This is a nice simple one :

http://www.maplin.co.uk/p/velleman-k8055-usb-interface-board-kit-n67bh
 
  • Like
Likes AliGh
I don't want to use micro controllers or something like that
All i want to do is to set one port of my USB or LAN to 1 or 0 whenever i want to
I've looked in many websites i couldn't find an easy solution
 
AliGh said:
I don't want to use micro controllers or something like that
All i want to do is to set one port of my USB or LAN to 1 or 0 whenever i want to
I've looked in many websites i couldn't find an easy solution

I used Google Images to search USB Controlled Power Outlet, and got lots of good hits. Click into a few of the images to see what-all is available. I even see a WiFi controlled outlet, which would make for a fun project... :smile:

https://www.google.com/search?site=..._ODW7E#tbm=isch&q=usb+controlled+power+outlet

.
 
  • Like
Likes AliGh
berkeman said:
I used Google Images to search USB Controlled Power Outlet, and got lots of good hits. Click into a few of the images to see what-all is available. I even see a WiFi controlled outlet, which would make for a fun project... :smile:

https://www.google.com/search?site=..._ODW7E#tbm=isch&q=usb+controlled+power+outlet

.
Thanks ..
The more I am thinking about it the more idiotic my friends idea sounds ... I can easily controll 10 or 15 electric devices with a micro controller why should i bother myself turning one on and off with my usb o_O
 
some USB sticks have LED indicators showing when the stick being written or read so by simply having it plugged into to your USB port and writing to it you will turn on the indicator.

Other possibilities are to use a Raspberry PI kit where you can wire an LED to a breadboard and then control it via the PI.

A third possibility is to buy a IOIO card that can be plugged into an Android device and programmed via Android SDK+Processing or the standard Android IDE to activate the LED connected to the IOIO card.

There is also probably a way to directly hardwire an LED to a USB cable and via the USB power feature light it up but I think you'll need some additional components.

http://www.instructables.com/id/How-to-light-a-LED-or-regular-light-with-USB/

http://www.instructables.com/id/The-USB-powered-LED-CD-lamp/
 
  • Like
Likes AliGh
  • #10
jedishrfu said:
some USB sticks have LED indicators showing when the stick being written or read so by simply having it plugged into to your USB port and writing to it you will turn on the indicator.

Other possibilities are to use a Raspberry PI kit where you can wire an LED to a breadboard and then control it via the PI.

A third possibility is to buy a IOIO card that can be plugged into an Android device and programmed via Android SDK+Processing or the standard Android IDE to activate the LED connected to the IOIO card.

There is also probably a way to directly hardwire an LED to a USB cable and via the USB power feature light it up but I think you'll need some additional components.

http://www.instructables.com/id/How-to-light-a-LED-or-regular-light-with-USB/

http://www.instructables.com/id/The-USB-powered-LED-CD-lamp/

The first method seems possible and convenient .. I can use 2 diodes to get a positive current from any of two commanding ports which is 1 and then control the higher current with a transistor
Now how can i keep using a usp port with a programming language like c# ?
 
Last edited:
  • #12

Attachments

  • WP_20150812_001.jpg
    WP_20150812_001.jpg
    41.9 KB · Views: 393
Back
Top