Hello All
New here, so please bear with me.. I have read the posting rules!
I need to design something that will report the on/off state, and maybe an analogue value remotely.
This will need to be wireless, and as in the future, I think we will be adding to this 'network', I am thinking of setting up a wireless hub, and having modules report back to a tablet via this private network.
I have tinkered with Arduino's before, and had a play with a couple of wifi shields, but that is about it.
Speed is not critical.. at all. The reporting can be leisurely.
Do you think this is a feasible approach? My main stumbling block at the moment is what to write the receiving android or windows front end software in? Anybody know of a product where you can design your own front end software?
I played with MIT app maker - which reported bluetooth values very well to my phone, but not sure of its limits.
There are MQTT client apps for Windows and Android that will send/display data without the need to do any programming. No graphing or fancy features, just the raw data on screen in real time. Not suitable for a commercial application but perhaps good enough for a hobby project.
What range are you looking for? (Bluetooth may work to 10m max., XBee may give you 100m range.)
Out in the open field (with no access to a WiFi network)?
My business is secret (no - not James Bond), but I am absolutely not allowed to disclose details as its part of my contract not to do so, and also other people might pinch the concept/idea.
Sorry to be vague on that front, but I have to be careful. I like my job!
They are pressurised air or gas tanks that have automatic release valves attached.
We want to monitor the pressure in the tank, and maybe the state of the valve (although the dropping pressure will indicate the valve open).
There are many other sensors/systems we want to monitor, but we have chosen these as a starting point.
An ESP12E or ESP32 can run a web server.
All you'd need to do is host some web pages that will display the data.
Collection of the data can be via direct wiring (the esp32 has some i/o), direct comms (i2c) or via wireless
Set it up properly and the cloud need not be involved at all, nor will you need to write apps for different devices.
mauried:
Getting 800 M + from wifi will be very difficult, unless you use a lot of access points or a tall tower with an Access Point on the top.
Boosters are cheap and relatively simple to install They can range from something that sits on a desk, to something that sits on a pole.
Ranges vary from 20m - 2500m using 2.5GHz.
Just further to my previous post, Getting info (sensor data) to a device (be it an ESP module or something similar) you can also daisy-chain RS485 capable devices.
Thank you for the advice so far. I will look into those possibilities.
Wifi is preferable, because I can simply give everyone involved an app or a web address and they can view the data.
The people involved varies from site to site.
The other option is a dedicated wireless data stream, but I am not sure if the receiver could cope with being bombarded by multiple streams of data from different pieces of equipment. I suppose if it only reads the one its interested in, it would be fine.
All a little bit out of my ability... but you can only learn it one way :o
Thinking of starting with one of these, purely because it has the level shifting onboard
Just need to get my head around designing the network and obtaining the data. Don't want to bounce through the Cloud. It seems a totally un-required step.
Use the ESP8266 core (visit this link for details)
That will give you greater control over the device. It also allows you to set aside some flash ram for SPIFFS (which is where you will store your web pages).
Use a 3.3V power supply with at least 500mA available. The ESP8266 draws a fair amount of power (135 ~ 215 mA typical while transmitting).
Adafruit feather with Huzza built in. The feather programs exactly like an Arduino, has WAY more horsepower RAM and things, includes battery charging for LiPo battey and has your WiFi chip onboard.
Well... I found an ESP8266 in the workshop.... an so far, have not even got my UNO to talk to it!
My other issue is the actual network I am going to get my modules to talk to. I am going to have to make some kind of 'Hub' that covers a decent area for the modules to connect to.
Hmm.. is that possible using a ESP8266 and boosting it somehow?
This wifi option is the best way forward with regards options for reading the data. If I use wireless RS485 or something, I am going to have to make a custom receiver screen/module to convert the received data to something viewable
Been using the code on this page (it has typos... which I think I have corrected)..
Nothing... The led on the ESP is not doing a thing (blinks briefly upon power up and that is it).
It just tries to connect for ages.
(Can you bounce the commands back to the serial screen without it messing up the commands?)
Uno TX is voltage divided into the RX on the ESP
Uno Rx is connected to TX on the ESP
Its own dedicated 3.3v supply with shared 0v with the Uno
EN pin on the ESP held high (enable). There is no Ch_pd on this board.
#include <SoftwareSerial.h>
const byte rxPin = 2; // Wire this to Tx Pin of ESP8266
const byte txPin = 3; // Wire this to Rx Pin of ESP8266
// We'll use a software serial interface to connect to ESP8266
SoftwareSerial ESP8266 (rxPin, txPin);
void setup() {
Serial.begin(115200);
ESP8266.begin(115200); // Change this to the baudrate used by ESP8266
delay(1000); // Let the module self-initialize
}
void loop() {
Serial.println("Sending an AT command...");
ESP8266.println("AT");
delay(30);
while (ESP8266.available()){
String inData = ESP8266.readStringUntil('\n');
Serial.println("Got reponse from ESP8266: " + inData);
}
}
This code I found says its got a response from the ESP. But it lies. Unplug the ESP and it still says its getting a response.
Its a shame I don't seem to be able to get my head around this.
I understand you can program the ESP8266 directly from the Arduino IDE (I have installed the boards into the manager).
Is it standard Arduino coding they accept?
Anyone have any useful web pages for me to browse, then that would be great. Trying to get my head around it.
Final question (I see the eyes rolling)... flashing the module. What does that mean/acheive?
jimLee:
Actually... I'd look realy closely at this.
Adafruit feather with Huzza built in. The feather programs exactly like an Arduino, has WAY more horsepower RAM and things, includes battery charging for LiPo battey and has your WiFi chip onboard.
-jim lee
Yes. Like the look of this module. Just ordered one, and the plug-in shield that gives it an Oled screen.
I think I am off to a bad start with some dodgy old module that arrived from China a year ago.