ESP8266 with arduino for project

Hi Guys , my project is about fault monitoring unit for three phase motors . i did the coding part using arduino alone and whenever some fault happens , the arduino “serial prints” the respective fault and displays the the fault name on LCD . simulation worked accordingly .

i was able to realize that all these data (fault alert) could be send to web platform using ESP8266 . the only worry is that coding for esp8266 is an expensive task and brainstorming from my point of view .

So , is there a way to obtain the the required code meant for ARDUINO+ESP8266 unit , by making small alterations to arduino code ( code without esp8266) , or by pasting it in between some standard codes or what ever ??

LOGIC : arduino serial prints an output . map that output to esp8266 . esp8266 to web !
plz help .

please dont worry about this code is correct or not , i just need to map the serial data into esp8266

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int a = A0;
int b = A1;
int c = A2;
int i = 0;

void setup()

{
Serial.begin(9600);
lcd.begin(16, 2);                    // set up the LCD's number of columns and rows: 
lcd.print("Phase Monitoring ");     
pinMode(a,INPUT);
pinMode(b,INPUT);
pinMode(c,INPUT);
}

void loop()

{
   double r =analogRead(A0);
   double y=analogRead(A1);
   double b =analogRead(A2);

if(r>300 && r<750)
{
   delay (6.66666666);

   if((y>300 && y<750) && (i==0))


{

       Serial.println("RYB");
       lcd.println("RYB");
       i=1;

}

if((b>300 && b<750) && (i==0))

{

Serial.println("RBY");
lcd.println("phase reversed");
i=1;

}

}

if(r==0||y==0||b==0)
{

  Serial.println("single phasing");
  lcd.println("single phasing");
  delay(9600);
}

}

Question is: If you have an ESP8266 with substantial processing power, why are you attempting to use a random type of Arduino in addition?

Depending on what esp module, the amount of pins being used are to much for some some modules? ESP8266-01 for example doesnt habe enough kind but can be used in the way subscribed above.

Thingsboard has a very clear tutorial about using an esp2866 on an arduino to have data monitored.

What you will have to do is change their part of code where they are measuring temperature and humidity with your code.

Bringamosa:
Depending on what esp module, the amount of pins being used are to much for some some modules? ESP8266-01 for example doesn't have enough kind but can be used in the way subscribed above.

Don't use an ESP-01 then. :astonished:

That's an ignorant answer.

If ts has an arduino and esp2866-01 at hand, why buy something else if this works too.

Adding an esp83666-01 might be easier to implement instead of redoing the whole circuit on another board.

Code wise it is not going to be a big difference, adding an esp8266 or using a diffrent esp and run evertything on that.

If you're set on the unspecified Arduino board + ESP-01 system, I recommend this library:

Bringamosa:
Code wise it is not going to be a big difference, adding an esp8266 or using a diffrent esp and run evertything on that.

There certainly is a difference and I have seen many people run into tremendous amounts of confusion trying to get the Arduino board + ESP8266 system set up. From your post count, it seems like you might have a bit more experience than those people so it may end up being easy for you.

Oops, I was looking at Bringamosa's post count but the original post is by vishnu5254.

There is indeed a diffrence but, not saying no difference at all.

Here is a nice guide for topic starter, going true all the procedures needed to achieve what he desires.

Paul__B:
Question is: If you have an ESP8266 with substantial processing power, why are you attempting to use a random type of Arduino in addition?

Maybe for 3 analog inputs?

dave-in-nj:
Maybe for 3 analog inputs?

By the time you add in all the signal conditioning components, how many analog inputs the ESP has will be the very least of your concerns. :roll_eyes:

There is no great solution.
The ESP8266 cannot do it all.
The arduino cannot do it all
The ESP32 A/I is less than stellar

Adding the ESP8266-01 offers a path.
Not a one chip solution, but workable and with enough support to get the job done

Paul you are not wrong.
, but we sometimes have e to to use what we got.

If the OP already has all the parts there is no reason not to use them.

A clean sheet project will require 2 chips.a micro and an ADC or some other set up.

But if we had a clean sheet... what would you like to see?

As i see it, AC voltage is 60 or 50 Hz and you would want to slice that as much as possible

It could be done with an esp-01 alone. You would need a usb-serial adaptor just for programming, and of course a 3.3V regulator/converter (which you would also have needed with the Arduino solution, since the Arduino can't supply enough current from its 3V3 pin). Add an ads1115 module to provide 4 analog inputs and an i2c backpack for your LCD (assuming you will want that, when the data is available on the web).

I still have the feeling that the esp on top of the Arduino is the easiest solution.

Lets see what the topicstarter has available

dave-in-nj:
As i see it, AC voltage is 60 or 50 Hz and you would want to slice that as much as possible

Good point, ads1115 might not be fast enough. 860 samples per second may be across all 4 channels, so 225 samples per channel per second, which for a 60Hz signal is only about 4 samples per cycle.

ads1015 is 3,300 samples per second. Only 12 bits resolution rather than 16, but still better than Arduino (10 bits). ads1015 would give 14 samples per cycle. Would that be enough?