web controlled usb interface ? - Page 1
Forum section: electronics / projects

author: Flump
author_rank: Frequent Contributor
timestamp: December 25, 2014, 03:13:26 pm
content: Hi allI would like to build a web controlled usb interfacethis is the idea:-a web page would have two button on it which are ON or OFFwhen someone clicks the button it sends a signal to my computerwhich sends a signal down a usb lead to activate something and make it ON or OFFat the moment i want to develop this just for myself as a project to learn fromso i will use it to lock or unlock a small box, but i guess when it's all up and runningit could be used for many different things.I am not worried about security issues at this stage as it is just me using it,i have a web server i can host the ON / OFF page on and PWD protect it.but I have no idea how to start on this, are there things like this already out in thepublic domain i can modify for my own use ?all ideas gratefully received ty

author: benjones
author_rank: Contributor
timestamp: December 25, 2014, 11:38:05 pm
content: There was a $5 wifi module I saw on hackaday called the ESP8266. You can program the chip directly and control the GPIO pins to do what you said, or you could connect it to the serial RX TX pins on an arduino and use the arduino to control the LED/motor/relayHere is a video on how to use an ESP8266http://youtu.be/9QZkCQSHnkoThere are also wifi and ethernet shields available for arduinos.You could also use a RaspberryPiWhat you are saying has been done by lots of people and you should be able to find lots of youtube videos or blog posts to teach you how to do it.Hope that helps, good luck with your project-Ben

author: Wilksey
author_rank: Super Contributor
timestamp: December 26, 2014, 12:00:42 am
content: Depends what platform you want to use, you can use a wifi module, I started my web server days with a PIC18F and an ENC28J60 all DIP for easy prototyping, but that means you have to play with the Microchip TCP/IP Stack...fun!It's not so bad, more commercially viable than a cheap $5 module, so it really depends on your end goal, if you plan on selling them at any point I haven't found a reliable source for the ESP modules, i'm not saying there isn't one though I just cant find one in the UK. If you plan on just tinkering then use an Arduino with an off the shelf Chinese wifi module.

author: Maxlor
author_rank: Frequent Contributor
timestamp: December 26, 2014, 01:52:39 am
content: Maybe use an Electric Imp, then you don't even need your PC, you can display the button using the agent's web interface.

author: chickenHeadKnob
author_rank: Super Contributor
timestamp: December 26, 2014, 03:45:13 am
content: In the same product category as the electric Imp is Texas Instruments connected Tiva C see here:http://processors.wiki.ti.com/index.php/Tiva_C_Series_LaunchPadsI don't have one of these but they seem good value. Dave gives a video review, video #642 see:http://www.eevblog.com/2014/07/19/eevblog-642-ti-connected-launchpad/Dave goes through some frustrations here. The underling Tiva board is not what I would call a beginner board, but your mileage may vary.

author: SL4P
author_rank: Super Contributor
timestamp: December 26, 2014, 07:28:12 am
content: Quote from: Flump on December 25, 2014, 03:13:26 pmNot sure if the OP wants an external embedded device upstream - or - downstream.Downstream: He could implement a simple web-server on his PC to serve the ON/OFF button POST/SUBMIT page - then send the required on-off messages downstream over USB-serial or whatever protocol his target device requires.(e.g. Arduino to listen to the serial comms and drive a port as needed.)Or ifupstream- an Arduino or other uC to sense the local switch closures, and send a message to his PC - but then a web interface seems kinda irrelevant.Of course he could do away with the PC completely, an use a uC for the switches (and alternate web interface) driving port outputs as needed - or sending control messages (e.g. serial/BT/ZB or LAN) to a separate uC doing the output control.

author: LukeW
author_rank: Frequent Contributor
timestamp: December 27, 2014, 11:34:57 am
content: http://jon.oxer.com.au/talks/id/104Jon's video here is pitched at the really simple beginner level accessible to everybody, and it goes through a basic example of using an Arduino and some software on the PC (HTTP connectivity, LAMP-stack sort of stuff, connected to Second Life in this case but you don't have to do that) to control a physical device.

author: SL4P
author_rank: Super Contributor
timestamp: December 28, 2014, 12:21:36 am
content: Still don't know what the OP wants to do.

author: Flump
author_rank: Frequent Contributor
timestamp: December 28, 2014, 10:36:30 pm
content: thanks for all the links guys, i have looked at them allTBH i think i am trying to run before i can walkSL4P - upstream downstream , I have no idea, what that means.Arduino seems to pop up a lot on the web when I have researched this so i think i will start thereand try and learn about that the look at this project again .

author: SL4P
author_rank: Super Contributor
timestamp: December 29, 2014, 12:31:33 am
content: Hi Flump,In your project context...Upstream- Means build an (external / remote) device to support a web server & virtual buttons - which will instruct some other PC/device to turn your controlled outputs on/offDownstream- use a PC running a web serverr - to instruct some (external / remote) device to turn connected outputs on/off?Neither is a tidy solution unless your problemexplicitlyrequires two separate 'computers'...Since your requirement for 'web' access already defines the need for 'remote' control, one 'computer' would typically be enough to do everything you want.i.e. << upstream --- downstream >>USER (phone, tablet/PC, web browser)<-||->Web server<--->Output drivers<===>'real world' control I/ODoes that make more sense ? Everything between -||- and === can be achieved in one box if that will fit your project topology.The onlyphysicalboundary you have to consider in most cases is between thre remote and the web-server (which may require security / port-forwarding/NATting etc)Quote from: Flump on December 25, 2014, 03:13:26 pmYou could implement the web 'server' to hold your 'buttons page' on --(i) a dedicated computer (higher standby power) or(b) a small embedded controller (low standby power) - like an Arduino with network connectivity.Of course somewhere else - you'll need a PC/phone/tablet to display the 'web page', and to click on the 'virtual' buttons.