12V Solenoid + Visual Basic

Thread Starter

chillxdd

Joined Feb 13, 2014
6
Hello, I am new here, and I am also new with electronics. I have a project where I am required to use VB to control a DIY door lock using a solenoid. Problem is I have no idea where to start wiring, though I already have the solenoid (12V). I think I have to use a relay but I'm not entirely sure. Any help will be much appreciated.
 
Last edited:

wayneh

Joined Sep 9, 2010
16,114
What sort of device will be running Visual Basic, a computer? You need an output of some kind - do you have any plan for which port you would like to use?

There are lots of data acquisition devices such as LabJack or DATAQ that would make this chore very easy via the USB port.
 

MaxHeadRoom

Joined Jul 18, 2013
19,184
If you control one of the outputs, you can interface straight to a 5v gate level FET rated for the required current level of the solenoid.
Max.
 

Thread Starter

chillxdd

Joined Feb 13, 2014
6
Sorry to sound so stupid but I actually cannot understand at all, I'm a total newbie with this.

I found a diagram but I do not understand it, if someone can please explain it to me or make it easier to understand, then I would really appreciate it. I'm sorry for the trouble. I attached it.

Out of the two, which is better to use? The 2nd one was a "safer" circuit compared to the first.
 

Attachments

Last edited:

MaxHeadRoom

Joined Jul 18, 2013
19,184
Sorry to sound so stupid but I actually cannot understand at all, I'm a total newbie with this.

.
Instead of a bipolar transistor I have used the 2N7000 for lighter loads and the IRL530 Mosfets for anything larger.
This allows connecting direct to the PP without loading it.
Max.
 
Top