-
Jul 21st, 2017, 06:25 AM
#1
Thread Starter
Lively Member
LED Light Controlling on PC!
Hi dears
How can I control turning on/off my LED light connected to PC (by VB 6.0), I want to turn on/off automatically in different times.
-
Jul 21st, 2017, 08:20 AM
#2
Re: LED Light Controlling on PC!
Looks like it's plugged into a USB port. So, you'd need to know what port it's plugged into and turn the power to it on/off.
-tg
-
Jul 21st, 2017, 05:25 PM
#3
Re: LED Light Controlling on PC!
This is probably a lost cause.
Even though many hub chipsets support per port power switching most laptops are likely to have cheaped out to save on cost and space and omitted the outboard MOSFETs to do the actual switching, and instead hard wire ports to a 5v rail.
Even when that isn't true, most newer laptops have newer hub chipsets designed to manage the use of ports for USB-sourced external device charging. As a result power management hardware and software probably has control, making it very difficult or impossible to switch the power on and off from an application.
-
Aug 7th, 2017, 12:51 PM
#4
Addicted Member
Re: LED Light Controlling on PC!
Yep. It's a tricky one this. Have tried it some time ago and this is what I have found:
Use a USB stick in the same usb port. Windows will pick it up and give it a drive letter.
You can then eject the drive letter.
BUT
Plug a light in the same usb port, and windows does not give a drive letter as it's not a drive.
...it does not work. There must be another way to do it...
-
Aug 7th, 2017, 05:59 PM
#5
Thread Starter
Lively Member
Re: LED Light Controlling on PC!
Thank you for your trick ...
-
Aug 9th, 2017, 07:26 PM
#6
Re: LED Light Controlling on PC!
Originally Posted by Inside
Yep. It's a tricky one this. Have tried it some time ago and this is what I have found:
Use a USB stick in the same usb port. Windows will pick it up and give it a drive letter.
You can then eject the drive letter.
BUT
Plug a light in the same usb port, and windows does not give a drive letter as it's not a drive.
...it does not work. There must be another way to do it...
That's because USB LED lights have no brains in them. There's no chip in those lamps that communicate with the PC. They're not a USB HID. The only circuitry in those lamps are the LED, and either an LM317 constant current source or just a simple series wired current limiting resistor. These components are connected to the USB +5V and Common pin. The data pins aren't connected to anything. As far as the PC's OS is concerned there's nothing plugged into the port the LED is using.
All is not lost though. If you have elementary electronics skills you can use a USB/RS232 converter and control the LED using VB's MSCommControl. Most USB/RS232 converters employ the Prolific UART chipset. Prolific also offers a direct USB/TTL (CP2102) chip/module. Clones can be had on ebay for <$3.00.
http://www.ebay.com/itm/130683943875
With one of these puppies you could even write code in the MSCommControl to (PWM) the LED which would provide dimming control.
On my electronics forum (ElectronicsPoint) we had a recent discussion on what keeps RS232 alive and well at this late date. Your LED project is a good example of why it's still popular. Same for embedded programming.
Cheers!
Chris
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing??
-
Aug 10th, 2017, 01:05 AM
#7
Addicted Member
Re: LED Light Controlling on PC!
Originally Posted by CDRIVE
All is not lost though. ...
Chris
Thanks.
It's through these little pieces of info that let others grow their minds and ideas.
-
Aug 10th, 2017, 11:33 AM
#8
Thread Starter
Lively Member
Re: LED Light Controlling on PC!
Originally Posted by CDRIVE
That's because USB LED lights have no brains in them. There's no chip in those lamps that communicate with the PC. They're not a USB HID. The only circuitry in those lamps are the LED, and either an LM317 constant current source or just a simple series wired current limiting resistor. These components are connected to the USB +5V and Common pin. The data pins aren't connected to anything. As far as the PC's OS is concerned there's nothing plugged into the port the LED is using.
All is not lost though. If you have elementary electronics skills you can use a USB/RS232 converter and control the LED using VB's MSCommControl. Most USB/RS232 converters employ the Prolific UART chipset. Prolific also offers a direct USB/TTL (CP2102) chip/module. Clones can be had on ebay for <$3.00.
http://www.ebay.com/itm/130683943875
With one of these puppies you could even write code in the MSCommControl to (PWM) the LED which would provide dimming control.
On my electronics forum (ElectronicsPoint) we had a recent discussion on what keeps RS232 alive and well at this late date. Your LED project is a good example of why it's still popular. Same for embedded programming.
Cheers!
Chris
Thank you CDRIVE I got it . . .
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|