Posted: 6/19/2016 1:54:39 PM EDT
|
There's 4 conductors, +5v, gnd, and 2 more. What do those do and how do they do it? I built a desk trinket/talking piece and it is powered from the 5v off a usb port. If I could, Id like to give it some timed functions programmed from my laptop. I want it to operate like a pump jack on a timer (damn stripper wells) |
|
That's pretty neat. Posted Via AR15.Com Mobile |
|
As noted, the center two pins are a differential pair for data. The USB communication protocol is astonishingly complex, and there's no 'direct' way to do what I think you want to do. You couldn't, for example, force one of those pins high to control a relay.
The simple solution here is the one you're already using; a mechnaical switch. The more complex solution is to use a USB to TTL converter and a relay to turn it on and off. You could do the same thing with an arduino, which is a little more complex but also more newbie friendly and flexible. |
|
Quoted:
Easiest way is to do something with an Arduino. Controlling it directly via a laptop USB port would require some hardware/firmware on the device and intimate knowledge of the USB protocol and driver programming. so i can't just somehow toggle a signal? Nope. Answered above. Posted Via AR15.Com Mobile |
|
Quoted:
As noted, the center two pins are a differential pair for data. The USB communication protocol is astonishingly complex, and there's no 'direct' way to do what I think you want to do. You couldn't, for example, force one of those pins high to control a relay. The simple solution here is the one you're already using; a mechnaical switch. The more complex solution is to use a USB to TTL converter and a relay to turn it on and off. You could do the same thing with an arduino, which is a little more complex but also more newbie friendly and flexible. Damn. Thanks for the info! Posted Via AR15.Com Mobile |
|
Here's a link that might pique your interest.
Electromagical stuff |
|
Quoted:
That's pretty neat. Posted Via AR15.Com Mobile Quoted:
That's pretty neat. Posted Via AR15.Com Mobile It's really all you need for your project. Yes, an Arduino would be cool, but that little USB relay should do the trick and comes with a C++ library. I haven't programmed in years, but I think you can download Visual C++ or something similar, and build yourself a progam and UI to control your pump. If you're going to do more of these projects though, I'd buy an Arduino dev kit, they've got to be pretty user friendly and there's a ton of stuff you can do with them. As other posters mentioned, you could build a stand alone controller using the I/O on the Arduino. |
|
Quoted:
It's really all you need for your project. Yes, an Arduino would be cool, but that little USB relay should do the trick and comes with a C++ library. I haven't programmed in years, but I think you can download Visual C++ or something similar, and build yourself a progam and UI to control your pump. If you're going to do more of these projects though, I'd buy an Arduino dev kit, they've got to be pretty user friendly and there's a ton of stuff you can do with them. As other posters mentioned, you could build a stand alone controller using the I/O on the Arduino. Quoted:
Quoted:
That's pretty neat. Posted Via AR15.Com Mobile It's really all you need for your project. Yes, an Arduino would be cool, but that little USB relay should do the trick and comes with a C++ library. I haven't programmed in years, but I think you can download Visual C++ or something similar, and build yourself a progam and UI to control your pump. If you're going to do more of these projects though, I'd buy an Arduino dev kit, they've got to be pretty user friendly and there's a ton of stuff you can do with them. As other posters mentioned, you could build a stand alone controller using the I/O on the Arduino. I'll look into them. My next office toy is going to be a drilling rig to accompany the pump and it may end up with my animation. Arduino sounds perfect for that. Posted Via AR15.Com Mobile |
Win a FREE Membership!
Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!
You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.
