reeding Attiny with ESPeasy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Peter83
New user
Posts: 6
Joined: 10 Dec 2022, 19:27

reeding Attiny with ESPeasy

#1 Post by Peter83 » 18 Dec 2022, 15:36

Hello,

i am thinking about using an Attiny 45 or 85 to reed my rainbucket and make my ESP with ESPeasy get data off it as the Wemos D1 mini is on solar/battery power and needs to be in deepsleep most of the time.

Is this posssible? If so what do i need to set up? A dummy counter?
Does anyone know where i can find good information, how to set up Attiny? Or maybe even has done this project before?

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: reeding Attiny with ESPeasy

#2 Post by TD-er » 18 Dec 2022, 16:01

Hmm using an ESP in deep sleep on battery is really tricky.
Main problems:
- ESP may not always be in the lowest deep sleep power mode (and I have no idea why not, looks like it may also be silicon revision dependent)
- Lots of boards (incl. Wemos D1 mini) have an USB to serial chip on board, always consuming power
- pull-up and -down resistors needed on an ESP to properly boot may still consume quite a bit of current in deep sleep.

Maybe it is better to have an external chip which does the counting for you and let the ESP turn on periodically to fetch this count value.
To be honest, I don't know any chip right now which could be used for this.
But if you have an example, please link it here so we can look into it to how we can implement support for it.

Peter83
New user
Posts: 6
Joined: 10 Dec 2022, 19:27

Re: reeding Attiny with ESPeasy

#3 Post by Peter83 » 19 Dec 2022, 22:16

hmm ok..
hmm. i`m too far in this projekt to rethink it all.
Its a weather station i pretty much just need in summer when solar power should be well enough. On my betteries its running for 5 days straight without deepsleep and sending once an hour. I think my set up should be well enough, when i can reducer consumtion with deep sleep. But ok its not perfect, i get it.
But to have deep sleep working i need "someone" else to count rain. so is there a chance to read an attiny with ESPeasy?

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: reeding Attiny with ESPeasy

#4 Post by TD-er » 20 Dec 2022, 01:06

Yep, you could let an ATtiny act as an I2C slave and then we can make a very simple base plugin to read data from it.

Peter83
New user
Posts: 6
Joined: 10 Dec 2022, 19:27

Re: reeding Attiny with ESPeasy

#5 Post by Peter83 » 20 Dec 2022, 20:32

thanks for your answer.

ok, so i ordered an Attiny 85-20 now.
I already have and BME280 on I2C. Do i have to put them both on same GPIO then? Or have 2 interfaces?
Or if both is wrong i probably should have the Attiny read the BME280 as well, which is probaly more difficult for me :D

Is this base plugin working over Rules? Is there any adivise on how to write it?

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: reeding Attiny with ESPeasy

#6 Post by TD-er » 20 Dec 2022, 21:16

This base plugin still has to be written... but I was already planning to do so :)
So what you need to do, is make a small program to let the ATtiny act as a slave I2C device and let it count values on a switch press.

Peter83
New user
Posts: 6
Joined: 10 Dec 2022, 19:27

Re: reeding Attiny with ESPeasy

#7 Post by Peter83 » 21 Dec 2022, 17:28

ok ill wait :)

is there any chance you are writing a GSM tool as well any time soon? (asking for a second project)

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: reeding Attiny with ESPeasy

#8 Post by TD-er » 21 Dec 2022, 18:55

Peter83 wrote: 21 Dec 2022, 17:28 ok ill wait :)

is there any chance you are writing a GSM tool as well any time soon? (asking for a second project)
Nope

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests