Ideas needed please

I have an analogue voltage 0-5v that I would like to look via an iPhone and depending on the displayed voltage, I want to manually send a command to toggle a relay contact.

Some sort of widget at the remote end that could be wifi or Ethernet connected to do the measurement and issue the command. And an app for the iphone to give the display and touch to work the relay.

Writing software is not a strength but I'm confident in doing the interfacing of the analogue voltage and the relay driving.

I dont need this to work over 4G links just when I'm home over wifi in the same sort of way that I can control my Roberts DAB radio.

Any ideas for this sort of product or even what to google for. Needlessly I'm not looking to spend much money!

TIA Bob

Reply to
Bob Minchin
Loading thread data ...

An arduino, or a Pi.

Feed the 5v signal through a voltage divider (couple of resistors) into an A/D input pin, probably wise to have something (zener diode) to clamp it if there's any possibility of it exceeding the expected 5V)

and drive your relay from a transistor on a GPIO output pin ...

tiny web page that shows present value of input pin and has a toggle for output pin.

Reply to
Andy Burns

Thanks Andy.

I'm ok with interfacing the I/O to a microcomputer but you have taken me out of my experience thereafter. I've done a tiny amount of arduino programming mainly copying hacking other peoples code

So the arduino/Pi needs to connect to ethernet and host some sort of simple webpage? Is that something that exists already?

At the iphone end do I just use safari to connect to the web page, read the value and "press" the button?

Bob

Reply to
Bob Minchin

Yes, the only "arduino compatible" device I've used is the ESP8266, which has the benefit of built in wifi, obviously a Pi has wired ethernet, and new ones have wifi too (or use a dongle on older ones) so that's an easy connection for your phone's web browser to reach.

Plenty of example code with an embedded web server, doing I/O

formatting link

see also youtube

Yep, or you could write an App that "wrapped" it, so it didn't look like a web page

Reply to
Andy Burns

RPi and a PiFace digital includes all the hardware in one lump:

formatting link

The web control of it:

formatting link

Reply to
John Rumm

formatting link

Reply to
dennis

One of the Arduino ESP8266 modules which have onboard Wifi, ADC etc.

Run a 'webserver' which outputs the values read from the ADC to a webpage you can access over the wifi. You can also drive a pin to control a relay.

Chances are you can 'cobble together' the code from examples on the web.

The ESP8266 modules are only a few pounds, small, have more than enough processing power for the job. The software to develop the code is free.

There are loads of examples on the web, including Youtube.

Reply to
Brian Reay

formatting link

Reply to
dennis

Thanks John,

At first sight it does not look as if piface supports analogue input. I have no experience at all with pi either.

Reply to
Bob Minchin

sounds like a web interface to a raspberry PI would do all of that. Or maybe an arduino.

Thats yer pi/arduino

simple browser - no need for an 'app'.

Yerrs. probably the pi side is sufficiently simple, if someone hasnt done it ALREADY that you could cobble it up OK

several peole here could help and there is always comp.sys.raspberry-pi

Yup. all possible withan ethernbet connected pi/arduino

Unles you find a box premade that dies it all ist still gonna come up to around £50-60 with pSU case and so on...

formatting link

or worse

formatting link

Reply to
The Natural Philosopher

Yes, with limitations. Arduinos won't run very sophisticated code so performance may be 'lumpy'

Reply to
The Natural Philosopher

Loads of 8266 stuff here:

formatting link

Yes, he sells summaries in ebooks, but it's all there on the site. I'm playing with the SONOFF hack.

It has web server examples too, using the Arduino IDE with tye ESP8266 plugin.

Reply to
Bob Eager

Yes asserting control seems quite straightforward but relaying the analogue value a bit more involved.

Reply to
Bob Minchin

formatting link

Reply to
dennis

Have you actually used an Arduino by any chance?

Just how fast does a microprocessor have to run to read a voltage (to be read by a human) and toggle an output?

This is all given that 'Arduinos' are the heart of many a 3D printer, running an extruder, extruder motor, hot bed and 3 x 0.9 Degree movement stepper motors?

Cheers, T i m

Reply to
T i m

Another sweeping statement (or guess)?

formatting link

Arduino's go from tiny to quite big and have a varying scope of i/o abilities across the range. Some offer less i/o than a Pi and most offer less range of flexibility of programming than a RPi.

That doesn't mean of course that an Arduino couldn't be as or more powerful (software wise) in some situations.

I have (and use) nearly all the RPi models (including the one running my OMV server) and also have (and use) a fair spattering of Arduinos (including the one running my 3D printer).

Cheers, T i m

Reply to
T i m

There's also BeagleBone, the BeagleBone Black is a similar price and shape to a Pi but has much more extensive I/O on board. In particular for the OP's requirement it has seven A2D inputs. They are 0 - 1.8 volt but the 5v requirement is easily accomodated by a simple resistor network.

The BBB runs Debian (and other) Linux OS', it's just about as simple as a Pi to get up and running with.

Reply to
Chris Green

This looks nice but a bit OTT for what is wanted..

formatting link

Its a 32 bit arduino so its quite powerful.

Reply to
dennis

Last year daughter wanted some sort of temperature logging system so that she could (just for the S&G's really) monitor the temperatures in and around the hutch for her rescue rabbits.

I bought the temperature sensors (already had several Arduinos etc) and was going to log it to an SD card with a RTC for later review but a more 'instant' view might be equally useful (and possibly easier to implement). ;-)

The WiFi module should be in range on the router that overlooks the garden with the hutch etc.

I also like the idea that the serial interface is already present with that particular module (handy initially anyway).

Cheers, T i m

Reply to
T i m

True, I was thinking most of the relay and the discrete output. It does do I2c though, so you can easily interface an external A to D that talks I2C (or use some of its discrete IO to talk to a standard A2D chip).

One of the advantages of going with a popular platform is there is more pre-existing stuff you can borrow and more places to seek help etc.

The fact that you need to talk on ethernet or wifi means you need a certain level of sophistication in your solution, that has ready written and working protocol stacks for things like TCP/IP. That in turn usually implies you need some level of operating system on there as well.

Reply to
John Rumm

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.