Can anyone advise pin connections for and ESP DevKit to Open-Smart 3.5" TFT display (ST7793 driver), and which Library it refers to? There seems to be quite a lot of confusion in this area, with users complaining of 'White Screens', and being advised to modify various Library files.
I ask after already destroying one TouchScreen TFT.
Please provide a link to the screen that you are using
Hi,
This is the screen I want to use:
This screen has a row of pins on one end, and can be used with an
OpenSmart 'Air' board, which appears to be very similar to a UNO, but
with additional pin connections to allow the TFT and an SD Reader to be
plugged in - I only bought the screen, not the 'Air' board.
I have had it working on an Arduino UNO, using MCUFriend,kbv but I want
to change to the ESP32 for its WiFi connection, and not too sure which
pins I should use for the screen. A bit of research left me pretty
confused - basically different pin connections, yet using the same
software, so I just want to clarify it before I go any further.
Another issue was that I never was able to get the SD card Reader to
work - any advice would be appreciated.
Thanks for your input..
Your screen is 3.3V. The Uno is 5V. You require thirteen 3.3V level shifters.
It will only work with 3.3V logic.
The 3.3V screen will work fine with the 3.3V ESP32. Just use the default ESP32 GPIO pins specified for TTGO board.
Hi, David.
The TFT screen has been working perfectly well on a 5V Arduino UNO for
at least one year. If that was sheer luck, and it is really 3.3V then
please note form my emails that I want to use the TFT screen with an
ESP32 - which I believe operates on 3.3V. So why do you think I need
level shifters?
Regards
I don't believe you.
From your link:
- Compatibility: Because the logic level is 3.3V, it is compatible for board 3.3V, you generally need to add a level conversion circuit if you use a 5V Board compatible for Arduino.
- Operating voltage: 3.3V;
- Logic level: 3.3V;
If you really have connected to VCC=5V and to logic=5V the backlight would be so bright that it would hurt your eyes. (before burning out)
David.
David.
Its your privilege to believe what you want. The Sitronix data sheet shows absolute max voltages of 4.6 volts. The logic levels output from a UNO are somewhat less than 5V. so as I mentioned, I appear to have been lucky. (with 2 of these boards). If you wish to call me a liar for saying it has been working for almost a year, then I really don't need your input and bad manners.
David
I would add to my previous post that I was looking for information and help, so what would I achieve by not explaining what I am seeing? what would be the point of lying?.
Contrary to what you say, the backlight is not 'so bright it would hurt my eyes', nor has it burnt out, despite being in almost continuous use for almost a year.
Shortly I will have access to an OpenSmart 'Air' board, which are also sold for use with this TFT. It has a switch which selects 3.3 or 5v, although as yet I have found no information what is actually switched. I have been told that the 'Air' board does not reliably connect to a computer when it operates at 3.3V - but the question I have is whether it is actually operating at 3.3V. I will check this when I get the board - hopefully this next week.
Meantime, while I thank you for your input, if you have nothing creative to offer, or have no interest in understanding what is going on, I really don't need your input.
Regards,
An_other
I just noted that the Sitronix ST7793 is quoted for an absolute maximum VDDI voltage of 4.6 Volts. The absolute maximum Logic input and Output voltages are quoted as -0.3~VDDI+0.3 volts. I take this to mean that the maximum logic input/output will be VDDI + 0.3 Volts. If VDDI max is 4.6 volts, then the logic input could be up to 4.9 volts - even closer to the UNO levels.
I fully realise that these are "Maximum" levels, and Sitronix states that a momentary rise above these levels will degrade performance (not necessarily 'kill' it, I note) - therefore I repeat - I may have been lucky.
Regards, An_other
The logic levels are specified relative to 0V and VDD. i.e. they should be within limits of -0.3V and VDD + 0.3V.
This means that the substrate diodes do not conduct. And if the diodes do occasionally conduct there is a max current allowed.
Yes, if VDD = 4.6V you are at the extreme limit. Logic levels of -0.3V to +4.9V are permitted. 5.0V logic level will cause small substrate current.
If VDD = 5.0V you are clearly violating the chip spec. But the logic levels will not produce substrate current.
As a general rule display boards have an on-pcb 3.3V voltage regulator which sets VDD. i.e. the chip substrate operating voltage. 5.0V logic is +1.7V above the substrate. The diodes will be unhappy when logic comes directly from AVR push-pull output drivers.
However a series resistor will limit the current to a trivial amperage. This is why some Mega2560 shields use 10k resistor packs. i.e. 170uA per substrate diode.
From the datasheet the standard operating conditions that most boards use
Open-Smart clearly advise 3.3V operation e.g. via their AIR board.
I have always used 3.3V operation either with AIR board or other 3.3V platforms.
Note that your Open-Smart board does not have a 3.3V regulator. So VDD is whatever you put on the VCC pin.
As I said earlier. I would expect the backlight to take a very large current @ 5.0V. I suspect that the Uno 's 5.0V will drop considerably.
Have you measured the actual voltage or current ?
David.
I hope that I have been polite and informative.
I just looked at the pin names printed on my ST7793 board. e.g.
GND
3.3V
CS
CX->RS
...
I have an AIR board. When you switch to 3.3V the ATmega328P runs @ 16MHz and 3.3V.
Yes, the AVR datasheet does not guarantee 16MHz operation.
Several Chinese Uno boards offer switched 3.3V / 5.0V operation. They work just fine @ 16MHz.
However I would not sell a commercial product that exceeds AVR spec. What happens if 10000 units of your product fail (or become unreliable)
If you want to ask questions about the AIR board I am happy to answer.
Confession. Using MCUFRIEND_kbv the ST7793 does not always report the correct ID on faster platforms like ARM or ESP32
However it operates ok on these platforms if you "force" the ID e.g.
tft.begin(0x7793); // you tell it the ID
David.
David,
Thanks for your reply.
Your previous post was very abrupt, and as I tried to explain, I was
only describing what I had seen, and tried to account for it - hence my
statement that I felt I had been lucky, but you appeared to take
exception to that.
I agree completely with you have said, but think we have gone way off
track - I am really only interested now in sorting out the ESP32/TFT
bit, which was my original post. I would also like to add that much of
the information we have discussed here, while available online, is very
difficult to find for a beginner. I don't claim to be either an expert
or a noob, but have wasted hours searching for definitive information.
The net is full of wails from people who have not been able to find the
data they want, or have been led astray by inadvertent or misleading
information, sometimes apparently deliberately so, and have ended up
with dud kit. Since this forum exists, I simply believed I would ask the
question to save myself time and grief - otherwise, the forum is not fit
for purpose.
As I noted, I have two of these TFTS, and have used them with Arduinos,
and used your excellent work on the MCUFriend software - I just want to
move on, and the ESP32 seems the way to go. I have used ESP32s for
several projects, and am impressed.
That said, I am unable to obtain these things locally for various
reasons - about the only way I can obtain them is by mail order from
China (AliExpress or BangGood, etc). You are probably aware that
delivery can take weeks in some circumstances, and there is also a local
problem, in that the Chinese companies ship them, then pass them on to
the national postal system here - akin to dropping them down a black
hole! - it can take longer for items to be delivered locally than it
takes them to be shipped round the world!
It therefore makes sense for me to try and take some care - When the
TFTs were shipped, I had no information on their recommended use, and
unwittingly used them directly on a UNO - I later realised that was
incorrect, but they worked - what the hell! However, I can't rely on
eternal luck, and life is too short to wait months for delivery of
something, only for me to kill them in a second because I either have
no, or incorrect data.
I'm sure other people run into similar problems - its not always a case
of ignorance or stupidity, its simply a case of trying to get valid
information, and forums are usually a good way to go. Some forums (and
I'm sure everyone has seen them) are utter crap. Replies are rude,
unhelpful and sometimes downright unpleasant.
Therefore, I thank you for your last replay - I have no wish to create
an argument - I am simply explaining a situation, and hoping someone
will respond in the spirit of the question. I believe you did that
earlier, when you told me the pinouts for an ESP32 were the same as TTGO
as applied to MCUFriend - I will take a look at that (if I can find
it!), and for that - many thanks.
Regards - An_other
I may have misunderstood you.
#3 implied VCC=5V and logic=5V i.e. 5V on pin#2 of your screen.
The backlight would be running on 5V instead of 3.3V
Since the typical Vf for white LEDs is 3.0V it will have a series resistance of 6R to drop 0.3V (3.3V - 3.0V) for 50mA LED
When you connect to 5V the 6R would mean ((5.0 - 3.0) / 6R) = 333mA
In practice the current would be less than this. But it would be substantially greater than the 50mA design value.
For the reasons that I gave in #6 and #10 it is unwise to run the TFT controller with VDD=5V
You have never clarified whether pin#2=5V or pin#2=3.3V
I suspect that you have actually connected pin#2 to 3.3V on the Uno.
This exceeds the allowable current from the Uno's 3.3V wimpy regulator.
But you will probably get away with it.
Likewise, as explained in #10 the substrate diode conduction currents depend on the series resistance. i.e. when you use 5V logic with VDD=3.3V
I never called you a liar. In #6 I just said that I did not believe you.
There is a serious difference between 5V or 3.3V on the backlight.
Although the Sitronix datasheets specify VDD + 0.3V before substrate diodes conduct I suspect that the internal inputs are fairly input voltage tolerant.
There are many Arduino Sitronix boards that appear to tolerate 5V logic.
Ilitek boards certainly do not tolerate high logic voltages.
There are lots of Chinese "Arduino" display boards that are simply wrong.
Adafruit and other respected manufacturers get them right.
David.
Hi, David,
David - lets forget about annoying each other in past posts - I'm told old to worry about the past - I think we are in agreement now? - I hope.
As you guessed, I connected the 3V3 (Pin #2) on the TFT to the 3V3 pin on the Arduino - this was based on the only information I had at the time, and I agree with you that (in light of later data), it will be pushing the Arduino 3V3 regulator hard, to say the least - No excuses - I just didn't know at the time.
When I originally put this together (over a year ago now), I was also puzzled by the pin marked 'LED' (pin #8) on the TFT - again - no data available at the time, so by trial and error it ended up connected to GND - it worked - I would assume that some coarse control of the backlight brightness could be done using a series resistor to this pin (I haven't tried it - the brightness was OK for me).
I have another question regarding connection to an ESP32. As I mentioned, I want to use the ESP32 because of its WiFi capability, and have set about designing a PCB to carry the TFT display, the ESP32, and other bits. (Don't much like patching things together with bits of wire!). I found the pinouts you mentioned in the MCUFriend.Shield.h file - many thanks.
After laying out the board, due to the way I have positioned the TFT and the ESP32, I will end up with several connections crossing, which would normally mean a double-sided board. Since I like to make these boards myself (I have a 3D router, and can cut good PCBs easily with it - more easily than messing about with etching. Ordering PCBs from (usually) China, has the usual long delivery time here)), so I would like to ask your opinion on re-allocating the Pin functions in the MCUFriend.special.h file, in the interests of keeping the proposed PCB as simple as possible. I am hoping it is simply a matter of redefining the pin numbers I would like to use in the MCU file. I am aware that some pins could be considered 'unsuitable' on the ESP32, I have had to deal with that before.
I also note that the MCUFriend pin allocation for ESP32 uses the ESP 'VSPI_CS' pin. I am considering use of this defined SPI port, which is another reason I would like to re-allocate the pin functions. Could you tell me if you see any objection to this, or if the pins as allocated cannot easily be changed.? - and thanks for your help.
Best Regards, AN
You can change the data bus pins to any GPIO pin with Digital capability.
Likewise the control pins. Whenever you change wiring scheme verify with LCD_ID_readreg.ino
However if you want to use the resistive Touchscreen you must have Analog+Digital capable pins for X, Y.
I advise 5R6 or 6R8 on the LED pin. The AIR board uses 0R which means 200mA goes to the LED (and it gets warm/hot)
The AIR board has a sensible size voltage regulator i.e. it does 200mA without issue
David.
Thanks for that David,
I'll think along those lines, and see where I get to. If you are
interested, I'll post the final configuration, but it will be some time
yet (not as fast as I used to be). I think also that I will use a
separate PSU for the whole thing, rather than rely on any onboard
regulators to support plugged in boards - I have had enough trouble with
them in the past, as well as the problems you have highlighted. (lots
of trouble with running an nRF TX/RX, eventually traced to wobbly power
from a UNO - cured with a separate PSU).
Hopefully, the Air board I ordered will turn up this week - I have no
particular plans for it, I just ordered it as a diagnostic aid for the TFT.
Thanks for your advice - it has helped. Keep up the good work on the
MCUFriend.
Best Regards, An
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.