Link to home
Start Free TrialLog in
Avatar of sscottinandrews
sscottinandrews

asked on

VB.NET Program to send Voltage signal in milliseconds

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!!
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

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.
Avatar of sscottinandrews
sscottinandrews

ASKER

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!!!
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!