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
Click For Summary

Discussion Overview

The discussion revolves around the feasibility of using an ATmega16 microcontroller to control lamps via USB or LAN connections. Participants explore various methods, programming languages, and hardware options for achieving this control, including the use of relays, transistors, and existing USB devices.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about the physical mechanism for controlling the lamp, questioning whether it involves a relay or a dimmable lamp with an intelligent interface.
  • Another suggests writing a program to control a USB widget with a relay, emphasizing the importance of safety approvals for hardware.
  • Several participants mention the availability of kits and assembled boards for PC I/O, providing a specific example of a USB interface board.
  • One participant expresses a desire to avoid using microcontrollers, seeking a straightforward method to toggle a USB or LAN port.
  • Another participant shares links to images of USB-controlled power outlets and mentions the potential for WiFi-controlled outlets as an interesting project.
  • Some participants discuss alternative methods for controlling devices, such as using Raspberry Pi kits or IOIO cards, and suggest hardwiring LEDs to USB cables.
  • A participant proposes using diodes and a transistor to control higher currents while maintaining USB control through a programming language like C#.
  • One participant seeks advice on using the ATmega16 microcontroller in a tutorial designed for a PIC microcontroller, asking for recommendations on IDEs and compilers.

Areas of Agreement / Disagreement

Participants express a variety of approaches and preferences for controlling lamps, with no consensus on a single method or solution. Some favor using microcontrollers, while others prefer simpler alternatives. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

Participants mention limitations in their search for solutions and the need for specific hardware configurations. There are unresolved questions about the compatibility of the ATmega16 with certain tutorials and the necessary programming tools.

Who May Find This Useful

This discussion may be useful for hobbyists and developers interested in home automation, microcontroller applications, and USB or LAN device control.

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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: 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: 415

Similar threads

Replies
11
Views
2K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
2
Views
1K