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.

Problem On Interfacing the circuit with VB

Status
Not open for further replies.

a3d

New Member
Hello.
I just found this forum minutes ago and hope someone can help me with simple question.

Ive created a panel from vb that will display an empty slot (green color) . If there is a metal on that slot, the color with turn to red. By using the hardware, how can I make this circuit interface with the vb.

My idea for the hardware: I will have metal detector for the slot. Let see if I have 8 different slots, I will also have 8 metal detector for each slot.

Example: If the sensor detect the 5 metal in 5 slot, it will display the 5 red slot on vb panel.

My question: Is my idea can be done in interfacing between the circuit and the vb? What component I can use? Is there any IC that can work with all output of sensor [metal detector ] and work with RS232 connector? Hope somebody can help me find the answer :)

Thanks.
 
A3D

I am not sure about the detector you want to use, but the VB interface is straight forward. You can use the RS232 interface from the micro-processor to the serial interface on your PC. The VB side uses a simple MSComm Control to read the value from the micro-controller and change the color of the correct section of the screen. I can post sample code if you wish, but need more details of 'detecting metal in the slot', perhaps if you could give a better idea what you are trying to achieve, then I may be able to help further.
 
hi a3d:)
As well as the RS232 option as proposed by gaspode, you could use the PC's parallel port as an interface for the detectors/VB program.
 
Last edited:
To make this clear,

here is the example: I have 8 slot ( A0-A7). when the metal runs on that slot, it detect and produce an output such as red LED. Ok now, I want the output can be read to rs232 and can be display in vb panel.

My problem: Is rs232 can read of each slot I made? If only 2 slot (A0 and A5 as example) I put a metal on it, so only 2 slot per 8 slot will be detected as red led. Can rs232 recognize the slot clearly? How to connect between the output of metal detector (red LED) and the Rs232 connector..
 
To make this clear,

here is the example: I have 8 slot ( A0-A7). when the metal runs on that slot, it detect and produce an output such as red LED. Ok now, I want the output can be read to rs232 and can be display in vb panel.

My problem: Is rs232 can read of each slot I made? If only 2 slot (A0 and A5 as example) I put a metal on it, so only 2 slot per 8 slot will be detected as red led. Can rs232 recognize the slot clearly? How to connect between the output of metal detector (red LED) and the Rs232 connector..

hi,
Does the external 'detector' circuit have RS232 capability.??
Or is the detector just switches and LED's..
 
hi,
Does the external 'detector' circuit have RS232 capability.??
Or is the detector just switches and LED's..

the metal detector is a complete circuit and doesnt have the rs232. the led is added to the circuit so it will ON when the metal is detected.
 
the metal detector is a complete circuit and doesnt have the rs232. the led is added to the circuit so it will ON when the metal is detected.

Hi,
As the detector dosn't have RS232, I would suggest that you look at using the PC's parallel port as an input from the detector.

The PC's parallel port is well documented, on the web, if you need any help I have some interface/programming details, using VB5.

Post a circuit of the detector or a link.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top