Arduino UNO, Adafruit 2.8 TFT, Freetronics ESP-01

The Freetronics ESP-01 module requires an ESP-01 that is not supplied. It isn’t on your website. I have shield that is 100% useless.

I have an Adafruit 2.8 inch display that I would like to use but only if the main requirements are met first.

My main need is to measure voltage from one sensor and current from two sensors and make these measurements available via a web site connected to a local Wi-Fi SID. The sensors have 0 to 5 volt outputs and the actual range is much less so using a UNO makes sense in a few ways. I don’t want to use voltage divider circuits in order to use a ESP-32 and also mess with powering it via 12 volts.

I’ve been caught before after doing lots of work to find out that the magic modules take so many pins that my project cannot succeed and the documentation is light on.

Can you supply the ESP-01. If not you should not be offering a module that depends on it?

Can I use the Adafruit TFT screen in conjunction with the ESP-01?

Is there a better way to go? I don’t mind back tracking.

Hi John,

This will likely work: https://core-electronics.com.au/wifi-module-esp8266-32601.html

Its a esp8266 just like the ESP-01 is.

Could you let me know the exact model of Adafruit display that you have?

That ESP8266 module looks like it should do the job and I like the fact that Core Electronics is selling it.

The display is a 2.8 inch TFT touch shield for Arduino and the barcode is P1651 according to the box. See attached photo for what is on the shield itself. I won’t be using the micro SD card so pin 4 won’t be needed.

The touch screen capability is not essential for this project. Either resistive or capacitive is a bonus.

On the shield it indicated that pins 8, 9 and 10 are required (4 as well if using the micro SD card). However the Adafruit documentation says that pins 11, 12 and 13 are also needed for resistive mode and that for capacitive mode SDA and SDL are needed. The documentation says that SDA is also known as A4 and SDL as A5 so I gather I need to avoid capacitive mode to be sure that I can use A4 and A5 for my purposes without erractic results.

"TFT Screen Pins

Digital #13 or ICSP SCLK - This is the hardware SPI clock pin. By default its digital #13. By cutting a jumper and

soldering another on the back, you can move this line from #13 to the ICSP clock pin. This pin is used for the TFT,

microSD and resistive touch screen data clock

Digital #12 or ICSP MISO - This is the hardware SPI master-in-slave-out pin. By default its digital #12. By cutting a

jumper and soldering another on the back, you can move this line from #12 to the ICSP MISO pin. This pin is used

for the TFT, microSD and resistive touch screen data

Digital #11 or ICSP MOSI - This is the hardware SPI master-out-slave-in pin. By default its digital #11. By cutting a

jumper and soldering another on the back, you can move this line from #11 to the ICSP MOSI pin. This pin is used

for the TFT, microSD and resistive touch screen data

Digital #10 - This is the TFT CS (chip select pin). It’s used by the Arduino to tell the TFT that it wants to

send/receive data from the TFT only

Digital #9 - This is the TFT DC (data/command select) pin. It’s used by the Arduino to tell the TFT whether it wants

to send data or commands

Resistive Touch Controller Pins

Digital #13 or ICSP SCLK - This is the hardware SPI clock pin. By default its digital #13. By cutting a jumper and

soldering another on the back, you can move this line from #13 to the ICSP clock pin. This pin is used for the TFT,

microSD and resistive touch screen data clock

Digital #12 or ICSP MISO - This is the hardware SPI master-in-slave-out pin. By default its digital #12. By cutting a

jumper and soldering another on the back, you can move this line from #12 to the ICSP MISO pin. This pin is used

for the TFT, microSD and resistive touch screen data

Digital #11 or ICSP MOSI - This is the hardware SPI master-out-slave-in pin. By default its digital #11. By cutting a

jumper and soldering another on the back, you can move this line from #11 to the ICSP MOSI pin. This pin is used

for the TFT, microSD and resistive touch screen data

Digital #8 - This is the STMPE610 Resistive Touch CS (chip select pin). It’s used by the Arduino to tell the

Resistive controller that it wants to send/receive data from the STMPE610 only

Capacitive Touch Pins

SDA - This is the I2C data pin used by the FT6206 capacitive touch controller chip. It can be shared with other

I2C devices. On UNO’s this pin is also known as Analog 4.

SCL - This is the I2C clock pin used by the FT6206 capacitive touch controller chip. It can be shared with other

I2C devices. On UNO’s this pin is also known as Analog 5."

I must be able to use 3 analogue pins (eg A0, A1 and A2) for the voltage and current sensors.

I would like to mimic the warning and power LEDs on my BMS (battery management system) controller as the BMS will be in an enclosure. The voltage at the BMS LED connection point is about 2 volts when the LED is on and zero otherwise. Provided I use resistive display mode A3, A4 and A5 are available to measure the voltage at the 2 connection points. I can then use the display rather than actual LEDs to mimic the BMS LEDs.

The Freetronic documentation for the Wi-Fi shield implies that only pins D2 and D3 are used:

  • “Configure the serial jumpers near the top right of the shield to suit the pins your Arduino will use for communication with the ESP-01 module. The module ships with jumpers in a default position as shown above to connect the module’s TX line to Arduino pin D2, and the module’s RX line to Arduino pin D3. This means your Arduino will need to transmit on D3 (to the module’s RX line) and receive on D2 from the module’s TX line.”*

So it seems that the Wi-Fi shield should coexist with the display shield in resistive mode and my usage of pins A0 to A5. However I’ve been caught before with conflicts so figure I should check before construction rather than risk rebuilding later.

Regards

John

From what I’m reading it looks like it should work for your purpose. If you find that you need more Analog pins you could always change your board to an Arduino Mega, but if you are changing the board at all I would probably go for a board with WIFI built in just to remove some of your variables. Different board aside, I think your screen shield and Wifi shield should work. Will there be enough clearance with the ESP8266 installed?

Thanks again for your valuable advice Stephen.

I did check whether the display shield would fit once the ESP8266 module was plugged in. I would need to add an extra set of header pins. I dug out a Freetronics Mega I no longer use and needed extra headers with it as well to clear the ethernet port. It uses digital pin 10 for the ethernet port so is in conflict with the display unit in resistive mode. However the fact that it has more analogue pins means that it is OK to use it with the display in capacitive mode.

I like your advice on choosing a different board. This Arduino sub-project is part of a much larger project involving a 5.6 KW array of solar panels, 12 KWh of battery storage and 4 heat pump hot water services with over 1000 litres of hot water capacity (38 KWh of effective storage) used for hydronic heating. It is not a cheap project and should not be jeopardised by a crappy Arduino module done on the cheap.

I’m after an Arduino module that will be OK for 3 decades. I won’t be soldering wires in 10 years time and I doubt that replacement parts (todays Arduinos and shields) will be available then. That means I must build at least one spare Arduino module now to swap in when a failure occurs down the track.

I’ve checked out several Arduinos on the Core Electronics web site. It looks as though the only option (given my 5 volt inputs and no desire to add voltage dividers) is the Arduino UNO Wi-Fi. I couldn’t find a Mega with Wi-Fi as well as 5 volt input support but it looks as though the UNO Wi-Fi will do the job simply and perfectly. If you reckon that is OK I’ll order one for the initial module.

FYI I’m using a Raspberry Pi and Z-Way software for my main project and have purchased most of the control components (and test units) from my preferred supplier - Core Electronics. I have also had a look at several Core Electronics tutorials and found them useful and impartial.

Regards

John

1 Like

John,

The Arduino Uno WIFI is probably your best choice. You could fit your display shield on it with no problems, and you won’t need to worry about competing pins or clearances with the WIFI baked right in. On a project like yours that needs to stand the test of time, every additional connection is another potential failure point (however unlikely). The simplest solution is often the best solution :grinning:

The Arduino Mega does take 5V just the same as the UNO as far as I’m aware, but I’m not sure there is a Mega with Wifi included.

Yes, Murphy’s Law does apply.

I’ve opted to go with ethernet rather than Wi-Fi to eliminate issues I’ve had before with Wi-Fi near an inverter and solar charge controllers plus competition from neighbours. Fixed wiring is far more reliable. The other issue that has bothered me is having to compile in Wi-Fi access details to the Arduino. Long term that has to be a really bad thing to do.

I have delved more into the way my current transducers work and realise that I need to measure both the Vref and the output of these sensors to calculate the current accurately. My tests show that the Vref of the sensor is not actually half the nominal 5 volt input and therefore has to be measured in order to calculate the current.

My recent findings show that I need 4 analogue inputs for my 2 current sensors plus one for my voltage sensor (nicely isolated) and another 2 to mimic the BMS (battery management system) warning and power LEDs. That is a total of 7 and means stepping up to the Mega Arduino.

I’ll use a Freetronics EtherMega that has been retired. It supports loads of analogue and digital pins and has plenty of capacity to program complex stuff (it handled 3000 lines of code before it was retired). It has Ethernet built in and according to your logic this is a good thing.

The EtherMega uses digital pin 10 for the ethernet and this is in conflict with what the 2.8 inch display needs is resistive mode. The display may or may not work in capacitive mode. Adafruit documentation indicates that the display may work either way or that the display is for only one mode. I despise having to reverse engineer this stuff.

I will dispense with the display shield as it is a potential source of problems and I have better things to do than find out how it won’t work.

All of the measurements via the Mega will be exposed via HTTP to the Z-Way system as well as a logging system to MySQL on my main Linux box. There is plenty of scope to display data without using the tiny Arduino display which is out in the garage and out of sight anyway.

Thanks again for your input.

Regards

John

Sounds like a great idea! The way I see it, WiFi is just another opportunity for something to go wrong long term, so Ethernet should be a great choice. Maybe you could look into a simpler display like this:

You could display any info necessary for running your heater and cycle through data displayed with the push buttons. Its also very clear on the product description which pins are used. It wouldn’t be as pretty, but since it only uses a handful of pins you can rest easy that it will work as promised.

I’ve got a drawer full of 2 X 16 and 4 X 20 displays. The 2 X 16 displays work and one of these has buttons like the one you suggest. However one of the buttons was damaged button so I’m not keen on using it or getting a replacement.

It is good to get your feedback on keeping things as simple as possible.

I’ll now simplify things further skipping the display altogether. The Z-Way home automation software obtains readings via HTTP and displays them. I have an old notebook set up near the batteries etc so I can bring up Z-Way and see all readings - not just a sub-set - on a big screen.

If I get keen on analysing information I’ll also use the HTTP mechanism via another computer and record it to a MySQL database with the records timestamp taking care of the time and date of the set of readings. Analysis reports can then be generated from the database.

Regards

John

1 Like