Page 1 of 1

LCD Keypad Shield

Posted: 27 Sep 2020, 18:57
by rieders
Hello

I have several questions for the Espeasy community.
I would like to take a flow measurement for a canister to be filled.
For this I got myself a solenoid valve and a flow meter.
I still have an LCD Keypad Shield with me, which would be perfect.
When the first canister is filled, I would like to receive a notification by email and then fill the next canister.
So I need a button to reset the measurement.
I would also be happy if you could still adjust the liters.
Here are the parts I have.
https://www.amazon.de/SainSmart-Keypad- ... B00760RLRM

https://www.amazon.de/HALJIA-YF-S401-0- ... 175&sr=8-1

https://www.amazon.de/Magnetventil-Wass ... NrPXRydWU=


I would be happy if it somehow works via ESPEASY.


Best regards
André

Re: LCD Keypad Shield

Posted: 27 Sep 2020, 22:21
by TD-er
Well the flow meter and the valve shouldn't be a problem (as long as you can switch the 12V valve with something as low powered as a GPIO pin of the ESP, so use some transistors and maybe an optocoupler)

But I don't see what chip is used on the keypad used along the LCD you linked.
The LCD is probably going to work, but I don't know what chip is used to read the keys.

Re: LCD Keypad Shield

Posted: 28 Sep 2020, 07:43
by rieders
Hello TD-er

Many thanks for the answer. I would like to switch the valve with a solid-state relay.
I found something else for the LCD screen.
The keys are queried with A0.
Different resistors go to GND are installed for each button.
Down 580
Up 230
Left 900
Right 0
Select 1200

Could the analog input of the ESP be used for evaluation?

https://create.arduino.cc/projecthub/el ... les-e02d95

Many thanks for the help

André

Re: LCD Keypad Shield

Posted: 28 Sep 2020, 09:04
by TD-er
You could use the ADC for that but I think it will be rather complex in rules and quite slow.
The rules usually act on events, but the ADC plugin doesn't send out events.

You could try to poll using the (rather new) msec timer, but I guess that would give quite a significant load on the ESP as rules parsing takes some time and doing it several times a second is quite a hit on the ESP.
If you don't poll with high frequency, then you need to keep a button pressed for quite some time to make sure it is polled.

This means that either the ADC plugin must be adapted to send out events when the value is between some set values, or if the value changed N steps.
Or you could use a different keypad that's already supported in a plugin.

Re: LCD Keypad Shield

Posted: 28 Sep 2020, 10:42
by rieders
Thanks for the information.

I'd rather use the buttons right away. I will also install an LCD I2C module to save connections.
I'm trying to build it today and then send a few pictures.

Many thanks for the help.

greetings
André

Re: LCD Keypad Shield

Posted: 01 Oct 2020, 09:15
by rieders
Hello

I rebuilt the LCD screen and placed the buttons on the A outputs.

Unfortunately I still have 2 problems.
1. If I have connected the flow sensor to the ESP, it does not boot.
The sensor is connected to the GPIO o.
". Problem.
When I switch the solid state relay it opens, but when I switch the relay off, the relay does not close.
When I briefly pull the cable off the valve and keep it closed until I turn it on again.


greetings
André

Re: LCD Keypad Shield

Posted: 01 Oct 2020, 10:04
by martinus
rieders wrote: 01 Oct 2020, 09:15 When I switch the solid state relay it opens, but when I switch the relay off, the relay does not close.
Just wondering: i guess most Solid State relays use a triac circuit to switch AC loads only. Looks like you are switching a 12V DC load.

Re: LCD Keypad Shield

Posted: 01 Oct 2020, 13:01
by TD-er
Don't connect a sensor to GPIO-0.
See the documentation: https://espeasy.readthedocs.io/en/lates ... on-esp8266

In short, some pins (GPIO 0, 2 & 15) need to be at a very specific state during boot, or else it will enter the flash mode at boot.

(And also what Martinus said :) )