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.

Rechargeable usb reading lamp using visual basic control

Status
Not open for further replies.

ochoma

New Member
Please can any one help me with information on a usb control Gui in vb. This project will also be dimmed using visual basic. it will be it should be turned off and on using visual basic.
Please guys help this is a final year project.
 
You really have not provided enough information. USB, OK fine and well, do you plan on a USB interface device to act between your GUI and the lamp? What will the lamp be? You mention rechargable so do you plan on usibng batteries to power the lamp? You really need to provide much more information to get a good reply.

Ron
 
I really don't know how these things work and I have not done any project of my own before.
1) I want to use the GUI to act between the USB device and the lamp. That is the GUI be the basic controller of the lamp.
2) I want the lamp to use LED bulbs and should not draw to much current from the system.
3) I want the lamp to be able to store charge within the device so that it can be used for some time when unplugged from the system.
4) I also need the Visual Basic Control codes
5) I want to also dim the LED bulb using VB or my VB created exe.
6) I will also need any written information that will help me in writing the chapters of this Final year Project.

Thanks for your assistance.
 
Last edited:
If this is your final year project and you don't understand any of what you mentioned I suggest you find another simpler project.

First between the computer runnibng your software and the lamp you will need a hardware device. Lamps don't store a charge, batteries do and you have not mentioned how to interface the battery into the scheme of things. You have not come up with a drawing?

If you want to start with dimming a LED lamp then think about finding a piece of hardware that will give you an analog voltage out to drive a PWM circuit for the lamp. The AO can be controlled with a slider on your GUI. The fact that you need the codes tells us that you can't program in VB?

I suggest a project based more on what you know and understand.

Ron
 
From my vague memory of doing something similar, you can use the MSComm command to talk to an RS 232 port. I then used an FTDI chip (232 to USB converter) to do the USB 1.1 for me. But that was back in the day when all PCs had 232 ports on them.

Looking at:
https://www.ftdichip.com/FTDrivers.htm

it looks like FTDI now have a virtual comm port (VCP) that gives you access to the USB port.

You can then use a slider in VB, take the 0-255 code off the slider and transmit this as a byte over the USB. If your receiver has an FTDI chip on the other end, it can decode the USB and spit out RS232 that can then be decoded using a PIC.

Doing anything more in depth than that is beyond the scope of a forum, but this might point you in the right direction..

Good luck

Simon
 
it looks like FTDI now have a virtual comm port (VCP) that gives you access to the USB port.

You can then use a slider in VB, take the 0-255 code off the slider and transmit this as a byte over the USB. If your receiver has an FTDI chip on the other end, it can decode the USB and spit out RS232 that can then be decoded using a PIC.

Why mess with RS232 at all?

Just wanted to point out that FTDI has* a chip (the FT245R) that converts USB to parallel FIFO, which would enable the receiver to access the data directly wthout having to go through yet another protocol (RS232). All of which still seems horribly complicated when all that's being done is dimming a single lousy LED.

I tend to agree with Reload-Ron that they may have bitten off more than they can chew here. Adding this extra level of complexity would make this damn near impossible.

* Dunno why you Brits and such insist on treating entities such as this as plurals; just sounds strange to our ears over here.
 
Last edited:
Hi CZ

I assume you are American...

I agree with you that he needs a FT245 at the receiving end - thanks for the correction. As for the PC end, I found the RS 232 protocol easier to manipulate than bit bashing the parallel port, so the FT232 would be a better solution at that end.

Thanks for the heads up on the grammar correction too. Next time I post, I will be more careful. However, saying 'The US economy is bankrupt' or saying 'The US economy are bankrupt' makes no difference in conveying the meaning. :)
 
Brit vs. 'Merkin grammar

I assume you are American...

Yep.

Thanks for the heads up on the grammar correction too. Next time I post, I will be more careful. However, saying 'The US economy is bankrupt' or saying 'The US economy are bankrupt' makes no difference in conveying the meaning. :)

Really surprising response: I thought that all you over on that side <points right on map> used the plural for organizations, businesses, etc., and that this was ingrained in you from an early age. So you're saying that you can choose not to do this and it wouldn't bother you? Interesting.

To my ears it just sounds plain wrong: "Maplin sell ZX-501 interocitor processors". Maplin, after all, is a single entity, an organization (albeit comprised of many parts and people), so to my ('Merkin) ear, it should be "Maplin sells ...".

Don't worry, though, I won't mark you down or not pay attention to your otherwise very good advice on account of this language difference! (You know what they say: "Americans and the British, two peoples divided by a common language".) In other words, don't let me cramp your style.
 
Last edited:
'The US economy is bankrupt' or saying 'The US economy are bankrupt' makes no difference in conveying the meaning.

The US economy is in the toilet or the US economy is in the loo. Uh, yeah, makes no difference as the result is the same. :) Additionally to help us Yanks better communicate with our friends and allies across the pond I suggest using this wealth of information.

Given the choices as how to do what the OP ask there are likely a dozen ways to go about it. They mention using the USB port so Ill focus on that aspect. Given a choice I would go with a D to A converter USB driven. It becomes a simple off the shelf USB solution. Most of these devices include the drivers which are a pain in USB devices as well as D to A code solutions in most common languages including VB (the OP never mentioned a VB version). I would start with a device like this one. While that specific device is no longer available it has dozens of relatives out there extremely inexpensive. While the DAC functions are not calibrated adding a simple operational amplifier with a calibrated gain will get you where you want to be.

Next you have an analog voltage to convert to PWM to drive a LED (or whatever) lamp. I see PWM as a good choice. The attached circuit is a popular method in the rough of doing this. If someone wants to really nail it I would use a rail to rail comparator rather than the LM311 but for most applications the LM311 should work. That output could drive a transistor or logic level MOSFET depending on the load.

If we remove the off the shelf solution for the D to A then I suggest the OP learn how to build one in the form of a simple 4 or 8 bit.

The biggest problem I see is the OP, based on his questions for a final year project seems clueless. That is why I suggest another project based on what the OP has learned this year.

Ron
 

Attachments

  • Voltage Controlled PWM.gif
    Voltage Controlled PWM.gif
    9.6 KB · Views: 262
So, O.P. ("ochoma"), maybe if you tell us what you do know, we can suggest a more reasonable project for you to do.

I'll tell you, this is one hell of a complicated way to control the brightness of a LED. Only in a student project would one use such a convoluted method.
 
So, O.P. ("ochoma"), maybe if you tell us what you do know, we can suggest a more reasonable project for you to do.

I'll tell you, this is one hell of a complicated way to control the brightness of a LED. Only in a student project would one use such a convoluted method.

why don't u post some noob questions? U have to learn alot
 
Why don't you stop following people you have arguments with around, like you're obviously doing to me?

You're becoming a pest around here.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top