VB.NET Program to send Voltage signal in milliseconds

Posted on 2012-09-02
Medium Priority
Last Modified: 2012-09-03
I am currently needing to write a VB.NET program that will do the following:
-- I need it to send a 4mA signal at 80 milliseconds
-- I need it to send a 20 mA signal at 180 milliseconds

I would like to do this in VB.NET as it is language I am most familiar with, which isn't saying a whole lot :).

I am thinking if it is possible to just send the different voltage amounts out the USB port, which has up to 500mA of power?

I hope that is enough information. I am just seeking the best way to do this, it doesn't have to be USB or a program, but just need a way to send those two signal voltages at that speed.

Thank you for you help and thoughts!!
Question by:sscottinandrews
  • 2
  • 2
LVL 85

Expert Comment

by:David Johnson, CD, MVP
ID: 38360558
what about multiples of 4 * 9 send out 24mA ?? (every 36 cycles) and for how long is this pulse?
my thinking is that you need a simple circuit with current limiting resistors to limit the current.. USB doesn't have fluctuating current it just supplies a voltage with a MAXIMUM current of 500mA. So you need to have 2 ports that you can toggle on and off and then use an op-amp or transistor that once voltage is applied to its base will allow current to flow.

Author Comment

ID: 38361290
Sorry most of that makes sense; however, I wasn't quite clear. I have a device that has a position of top and of bottom. It is controlled by a laser. The laser in order to know where top is to send it a signal of 20mA within 180 ms, then position it at bottom and send it a 4mA signal at 80ms. So it is set device at top send signal, set device at bottom and send signal.

So going out each port into a capacitor makes sense, just how? Or is what I just described still doable?

Thank you!!!
LVL 85

Accepted Solution

David Johnson, CD, MVP earned 1000 total points
ID: 38361809
not a capacitor a capacitor will smooth the transition. it is like a miniature battery.. one uses a capacitor to block dc or to smooth ripple. depending upon whether or not it is in series or parallel. You need to study basic electronics and learn ohm's law..  programming a port to be on for 80ms or another port to be on for 180ms is pretty trivial and depending upon which port is ON your current limiting device will output the signal. The serial port is the easiest to program as you can use the DTR/DCE lines.  Anything more requires designing a device driver which is well beyond what can be taught here.

Author Comment

ID: 38362165
I actually believe the best approach to be Arduino board as I can program it to send the signals I need by tracking the state of the button. Thank you ve3ofa for your comments, and yes I didn't actually mean a capacitor earlier as it would certainly not do what I want. As for ohm's law, I am pretty sure I memorized that in Physics years ago in college, but I am pretty sure I can get away with not needing it for this project. Although it would make a lot easier.

Again, I do appreciate the advice, I technically only wanted to know how t write the VB.NET code to do the sending of the signals, the "trivial part".

Thanks again!

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question