Author Topic: web controlled usb interface ?  (Read 6004 times)

0 Members and 1 Guest are viewing this topic.

Offline FlumpTopic starter

  • Frequent Contributor
  • **
  • Posts: 520
  • Country: gb
web controlled usb interface ?
« on: December 25, 2014, 03:13:26 pm »
Hi all

I would like to build a web controlled usb interface

this is the idea:-
a web page would have two button on it which are ON or OFF
when someone clicks the button it sends a signal to my computer
which sends a signal down a usb lead to activate something and make it ON or OFF

at the moment i want to develop this just for myself as a project to learn from
so i will use it to lock or unlock a small box, but i guess when it's all up and running
it 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 the
public domain i can modify for my own use ?

all ideas gratefully received ty
 

Offline benjones

  • Contributor
  • Posts: 19
Re: web controlled usb interface ?
« Reply #1 on: December 25, 2014, 11:38:05 pm »
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/relay

Here is a video on how to use an ESP8266
http://youtu.be/9QZkCQSHnko

There are also wifi and ethernet shields available for arduinos.

You could also use a RaspberryPi

What 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
 

Offline Wilksey

  • Super Contributor
  • ***
  • Posts: 1329
Re: web controlled usb interface ?
« Reply #2 on: December 26, 2014, 12:00:42 am »
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.
 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: web controlled usb interface ?
« Reply #3 on: December 26, 2014, 01:52:39 am »
Maybe use an Electric Imp, then you don't even need your PC, you can display the button using the agent's web interface.
 

Offline chickenHeadKnob

  • Super Contributor
  • ***
  • Posts: 1060
  • Country: ca
Re: web controlled usb interface ?
« Reply #4 on: December 26, 2014, 03:45:13 am »
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_LaunchPads

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

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: web controlled usb interface ?
« Reply #5 on: December 26, 2014, 07:28:12 am »
...I would like to build a web controlled usb interface
this is the idea:-
a web page would have two button on it which are ON or OFF
when someone clicks the button it sends a signal to my computer
which sends a signal down a usb lead to activate something and make it ON or OFF
...
Not 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 if upstream - 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.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline LukeW

  • Frequent Contributor
  • **
  • Posts: 686
Re: web controlled usb interface ?
« Reply #6 on: December 27, 2014, 11:34:57 am »
http://jon.oxer.com.au/talks/id/104

Jon'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.
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: web controlled usb interface ?
« Reply #7 on: December 28, 2014, 12:21:36 am »
Still don't know what the OP wants to do.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline FlumpTopic starter

  • Frequent Contributor
  • **
  • Posts: 520
  • Country: gb
Re: web controlled usb interface ?
« Reply #8 on: December 28, 2014, 10:36:30 pm »
thanks for all the links guys, i have looked at them all

TBH i think i am trying to run before i can walk

SL4P - 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 there
and try and learn about that the look at this project again .


 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: web controlled usb interface ?
« Reply #9 on: December 29, 2014, 12:31:33 am »
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/off
Downstream - 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 problem explicitly requires 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/O

Does that make more sense ?  Everything between -||- and === can be achieved in one box if that will fit your project topology.
The only physical boundary you have to consider in most cases is between thre remote and the web-server (which may require security / port-forwarding/NATting etc)


...I would like to build a web controlled usb interface
this is the idea:-
a web page would have two button on it which are ON or OFF
when someone clicks the button it sends a signal to my computer
which sends a signal down a usb lead to activate something and make it ON or OFF
You 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.
Don't ask a question if you aren't willing to listen to the answer.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf