Solved

# VB.NET Program to send Voltage signal in milliseconds

Posted on 2012-09-02
Medium Priority
1,728 Views
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!!
0
Question by:sscottinandrews
• 2
• 2

LVL 85

Expert Comment

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.
0

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!!!
0

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.
0

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!
0

## Featured Post

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.
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…
###### Suggested Courses
Course of the Month9 days, 12 hours left to enroll