Pro Mini Extender "Advanced" concept

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Forum rules
You have entered the experimental forum, beware!!!
Post Reply
Message
Author
FanOfHue
Normal user
Posts: 96
Joined: 06 Oct 2018, 10:08

Pro Mini Extender "Advanced" concept

#1 Post by FanOfHue » 15 Jul 2019, 19:11

Just finished some final bits of work on the Atmega-328 platform (Arduino Uno, Nano, Pro mini)

* Arduino Pro Mini that runs a small rule engine using boot.txt and rules.txt "files" stored in EEPROM
* Controlling GPIO ports (or plugins) using internal rule commands or serial commands send from an ESP module engine
* Plugins could be migrated from the Nodo Classic repository
* Can run as a standalone solution on just a Pro Mini

But a serial connected ESP makes the whole solution web enabled
* ESP provides a web based editor to edit the rules that are stored local on the Arduino Pro Mini
* Support OTA for uploading new program files on the Arduino Nano (TCP serial bridge for AVRDude)

happytm
Normal user
Posts: 107
Joined: 15 Aug 2016, 17:53

Re: Pro Mini Extender "Advanced" concept

#2 Post by happytm » 16 Jul 2019, 02:09

Nice Concept specially if it allow use of analog pins & interrupt pins of Pro-mini (which is not possible with ESP).

Thanks for your efforts.

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

Re: Pro Mini Extender "Advanced" concept

#3 Post by TD-er » 16 Jul 2019, 10:57

This sounds really great.
I was also thinking about something similar, to use a small 'co processor' board to either handle time critical stuff (ESP8266 is not good at real time stuff) or help to extend some GPIO pins like serial to I2C or something like that.

Can you show more? (and Jimmy will update me via Slack as I'm not that often on the forum)

FanOfHue
Normal user
Posts: 96
Joined: 06 Oct 2018, 10:08

Re: Pro Mini Extender "Advanced" concept

#4 Post by FanOfHue » 16 Jul 2019, 17:32

TD-er wrote: 16 Jul 2019, 10:57 This sounds really great.
I was also thinking about something similar, to use a small 'co processor' board to either handle time critical stuff (ESP8266 is not good at real time stuff) or help to extend some GPIO pins like serial to I2C or something like that.

Can you show more? (and Jimmy will update me via Slack as I'm not that often on the forum)
I've used custom sketches on Atmega328 before, but my attention was drawn to the ESP Easy rule engine and some plugins that I've found in the Nodo repository.
So that lead to a small project that I've currently named "NanoCore"

I agree that running IRQ driven stuff on a simple ecosystem like Atmega seems much more predictable then the more complex ESP ecosystem.
These Arduino boards can just run for years without attention and acting as a coprocessor for ESP keeps the solution stable even when the ESP has crashed/rebooted/flashed/etc

I have it in use on several boards at the moment. It's sort of built from scratch using code from ESP and Nodo samples and the rule engine only supports some basic On <event> and timers. Enough to support my current needs to schedule some measurements and report to ESP using serial port.

I pushed existing stuff to GitHub:
https://github.com/SmartNodeRules/NanoCore

FanOfHue
Normal user
Posts: 96
Joined: 06 Oct 2018, 10:08

Re: Pro Mini Extender "Advanced" concept

#5 Post by FanOfHue » 27 Jul 2019, 11:18

TD-er wrote: 16 Jul 2019, 10:57 This sounds really great.
I was also thinking about something similar, to use a small 'co processor' board to either handle time critical stuff (ESP8266 is not good at real time stuff) or help to extend some GPIO pins like serial to I2C or something like that.

Can you show more? (and Jimmy will update me via Slack as I'm not that often on the forum)
Did you have a chance to look at the idea?

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

Re: Pro Mini Extender "Advanced" concept

#6 Post by TD-er » 28 Jul 2019, 00:01

FanOfHue wrote: 27 Jul 2019, 11:18
TD-er wrote: 16 Jul 2019, 10:57 This sounds really great.
I was also thinking about something similar, to use a small 'co processor' board to either handle time critical stuff (ESP8266 is not good at real time stuff) or help to extend some GPIO pins like serial to I2C or something like that.

Can you show more? (and Jimmy will update me via Slack as I'm not that often on the forum)
Did you have a chance to look at the idea?
Not really looked at your project. I was away a big part of this week and it was a bit too hot to really think about stuff.
But I did think about how to add >2 serial devices to ESPeasy including echo'ing data from the serial port.
As a test setup I am now running ESPeasy on an ESP32 with a GPS connected to it, just to see how well that's working (never really tested it myself) and it has been running stable for about a week already.
So for me it has become clear that in order to use more serial devices, the ESP32 is also a very good alternative, but that doesn't mean there isn't a good use case for a stand-alone slave board setup.
For example the ESP8266 (and probably the ESP32 also unless it uses a dedicated core for it) is not well suited for real-time applications like monitoring one-time events.
For such purposes a co-processor unit is very useful and also if it can do some pre-processing in the form of rules.
So there is still the need for handling data from and to a serial port.

FanOfHue
Normal user
Posts: 96
Joined: 06 Oct 2018, 10:08

Re: Pro Mini Extender "Advanced" concept

#7 Post by FanOfHue » 02 Aug 2019, 21:37

I've pushed an update to GitHub: https://github.com/SmartNodeRules/NanoCore
The core loop is a lot faster now as i've changed the "scheduler' using interrupt driven timers that will also be more accurate.

Also changed the unconditional call to a 100_per_second call which should be more than enough. One plugin can also attach to the millis IRQ handler to get fast and undelayed action when required (1000/second). The custom IR plugin shows an example on how to use this.

The loopcount now almost reaches 200k instead of 20k.

Although the 328 platform might be considered ancient technology, it's still fun to play with. If really fast polling or tight response to IRQ handling is required, i think it could still make sense to use this as a simple and cheap coprocessor unit.

But maybe i'll be the only user here that thinks this way :lol:

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

Re: Pro Mini Extender "Advanced" concept

#8 Post by TD-er » 03 Aug 2019, 01:16

FanOfHue wrote: 02 Aug 2019, 21:37 [...]
Although the 328 platform might be considered ancient technology, it's still fun to play with. If really fast polling or tight response to IRQ handling is required, i think it could still make sense to use this as a simple and cheap coprocessor unit.

But maybe i'll be the only user here that thinks this way :lol:
Nope, not at all.
I really like the idea and it may add real-time functionality to the ESPeasy environment.

Currently I have at my desk a PCB running an ESP12F and ATmega 328p.
These communicate via serial with eachother and I am working on a plugin now to read those strings generated by the ATmega.

In my garden I have a setup which has an ATmega in a separate enclosure, connected with a serial wire inbetween (prototype Weather station designed by Shardan)
So I am absolutely convinced there is a need for these kind of setups :)

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Pro Mini Extender "Advanced" concept

#9 Post by Shardan » 04 Aug 2019, 22:16

TD-er wrote: 03 Aug 2019, 01:16 In my garden I have a setup which has an ATmega in a separate enclosure, connected with a serial wire inbetween (prototype Weather station designed by Shardan)
So I am absolutely convinced there is a need for these kind of setups :)
Indeed there is :)
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests