choice of the most fit Raspberry version

Personally, I'd use a Raspberry Pi3 combined with an Arduno nano.

The nano has 8 x 10bit A/D converters and 13 no-fuss digital I/O. It also accepts 5V inputs (and they are better protected). This can do all your basic capture and clean-ups.

You can then pass this on to the Pi (i2c) maybe, or even simple serial.

The Pi can then to all the complex stuff, and manage touch screen I/O etc.

Both can be directly powered from a 5V supply.

--
W J G
Reply to
Folderol
Loading thread data ...

I can assure you that even cold water will deposit this. You really need a water softener.

--
Outside of a dog, a book is a man's best friend. Inside of a dog it's  
too dark to read. 

Groucho Marx
Reply to
The Natural Philosopher

On Fri, 3 Sep 2021 08:59:03 +0200, Soviet_Mario declaimed the following:

24AWG if my look-up is correct...

... same look-up gives 76.4ohms/km... or just over 3ohm at 40m That is 3% of the PT100 "100Ohm at 0degC" -- with two leads that comes to 6% which needs to be compensated... Not that I'd want to run /any/ analog signal that distance.

SPI is limited to 10m without using repeaters, so that counts out using SPI temperature sensors and/or SPI ADC -- so

formatting link
is not an option...

I2C is limited to 10m at 10kBaud if using 22ga unshielded twisted pair (UTP) (phone or Ethernet cables). So those also are not an option for the long run cables.

Off hand -- you are likely going to have to install a microcontroller at the far end of those cable runs, so the sensors connect to the microcontroller with under 10m runs.

The microcontroller would then use a plain UART over UTP (real preference would be RS-422 differential vs RS-232 single-ended; but that means twice the wires, along with transceiver/receiver logic at each end; differential is more noise immune as +S and -S are sent over two cables, at the receiver the -S is "subtracted" (invert and add) to the +S. Line noise tends to be identical on both wires -- +S+1v, -S+1v -- when inverted and added, the noise cancels out.

You'll have to run a slow baud rate -- even RS-232 is only rated for

16m at 19.2kbps; longer runs are undefined. 40m is also going to be pushing it for WiFi (and definitely not going to be usable for BlueTooth).

Ethernet is rated for 100m -- but the code needed to run Ethernet on microcontrollers (if you find an Ethernet add-on) may hamper your application size. Often the microcontroller is configured as a simple web-server, returning a page of, say, sensor readings, on each refresh.

I wouldn't want to do it myself, but putting an R-Pi (or BeagleBone Black* with IoT image installed) at the far end, with an Ethernet cable to some near end device (which doesn't need to be another R-Pi -- any computer that can SSH into the remote would work for maintenance tasks; and configuring a web-server on the remote could be used for fancier tasks -- especially if one can run node-red [no personal experience] to build a control system) may be viable. Just make sure you don't have power glitches.

  • BBB has more GPIO than an R-Pi, on board eMMC so one doesn't /have/ to run from uSD card, though that is an option [recommended too as swapping a corrupt SD card is easier than trying to rebuild the eMMC, assuming it hasn't out-right failed]. Common OS images are Console, IoT, and LXQT -- the X-window system sucks up a lot of space . For an IoT application, one doesn't need a graphical window environment. And runs essentially Debian -- not the heavily customized version of the R-Pi.
--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Il 03/09/21 17:56, Dennis Lee Bieber ha scritto:

gged

lies

, at

ave

--

g

B.

h

].

s];

{f

sign

o
e

in

1294

to

use

,

ng

ith

tnx for this long and deep comparison. I'll try to go through it again to fix some ideas

h

is

h.

all correct. The fact I'd need some higher level logging (also error states) is both debug, and mainteinance, and later some statistics about the performance of the system. I mean : I have burnt 60 kg of wood in 6 hours, the ini_T of the buffer was XXX, the fin_T was YYY, So I have actually stored, all included, ZZZ MJ in the buffer with external T =

ower

absolutely right, it has to do calm polling, few calculations. But without a means of inquiring what is happening I feel lost. I am not skilled working with microcontrollers so as to understand sticking the nose inside the voltages and so.

uld

ok

d

sure, a battery was taken into account. Also the pump and the electrovalves would need uninterruptable power, so it is a free meal :D

--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
Soviet_Mario - (aka Gatto_Vizzato)
Reply to
Soviet_Mario

Il 03/09/21 18:19, Folderol ha scritto:

recommendation added to the wishlist tnx

--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
Soviet_Mario - (aka Gatto_Vizzato)
Reply to
Soviet_Mario

soluble bicarbonates. I must say technical water in the exchanger circuit is totally separated from both the bulk storage (5000 L + other 350 L), and from the drinkable circuit.

As only evaporation is to be reintegrated (but the reservoire is 1,5 m above the top of the chimney and not heated in any way, and covered, evaporation should be modest), the same volume would run in the critical exchangers

I will add some poliphosphate. From time to time, should I meet performance decline, I'd empty the circuit and rinse with dilute phosphoric acid or citric acid and remove rust and CaCO3. I don't expect FREQUENT runaways, also.

>
--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
Soviet_Mario - (aka Gatto_Vizzato)
Reply to
Soviet_Mario

On Fri, 3 Sep 2021 21:05:22 +0200, Soviet_Mario declaimed the following:

My other post, on cable length limits, will probably have some influence...

Most logging (to SD card) on microcontrollers is a simple function. The development libraries all support some sort of SD card file driver and simple read/write commands -- if it doesn't have full C printf() formatting, it will have print(str), print(int), print(float)...

That sounds more like post processing, done on a full computer after swapping out the SD card (probably want one button/GPIO to trigger "dismount"/"mount" of the card .

Whether a microcontroller or an embedded Linux board, the interfacing with hardware is going to be similar. Embedded Linux is not "real-time", but with relaxed polling periods that may not be significant. It's not like you expect to react within 100ns to some interrupt condition.

Consider:

formatting link
(this is a 5V AVR-based clone of the Arduino UNO, not to be confused with the 3.3V Metro M4 Express which has the same pin-out, but is ARM Cortex M4f processor running CircuitPython natively [and is fast enough that CircuitPython might be as fast as compiled AVR code ]) I point that out as it has a chapter using a TMP36 temperature sensor (analog output, there are 6 analog inputs on the board). It also has a chapter for the common 2line x 16char Hitachi type LCDs -- with some local push buttons and that display you could set up some local configuration facility (but if you don't have an SD card or EEPROM to record the configuration, any power glitch will reset to whatever was coded in the program). Take a look at CIRC03, CIRC07, CIRC10, CIRC14 and CIRC15 -- most of those are similar for all systems (different library calls, and if you don't have ADC on-board you'd have to find code for reading an external ADC).

SD card interface AND battery-backed real-time clock:

formatting link

formatting link
(need one per thermocouple, with resistors to set individual addresses.

I don't have time to crawl through all of

formatting link
but you should find some other tutorials that can give you ideas. I should advise that, with regards to embedded Linux boards, Adafruit is transitioning from custom libraries to using an adapter for CircuitPython libraries .

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Don't underestimate RS232 data transfer. A radio amateur friend of mine had a steerable aerial array on a 100ft tower. The aerial cables where properly (expensively) shielded. The control cable was standard 3 core mains cable running at 1200baud! That not only managed the orientation but also switching various elements in or out.

There seems to be no reason you'd want especially fast communication so the same idea should work for your project.

--
W J G
Reply to
Folderol

Since you know C, take a look at the poll() function.

pol() designed for asynchronous i/o via the filing system over many connections of any type, so its equally good at handling serial, network or USB connections.

Poll() is given a list of file descriptors as a parameter and waits for input to arrive from them. No cpu time is used while waiting. When input is received from any fd, poll() calls the appropriate function to read and process the input and, when done, waits for and processes the next input. Because poll() processes each event in arrival sequence, there's no need to understand multi-threading code, so writing code to use it is straight forward: just use a case statement to call the appropriate function to handle input from that fd.

The only difference between poll() and ppoll() is that the ppoll() can timeout if no input is received within the timeout interval. poll() needs to be sent some sort of 'stop now' message to terminate the run.

There's a reasonable description in the poll manpage, but if you have a copy of "System Progrsmming for UNIX SVR4" by David Curry (pub. O'Reilly), it or a later version contains an excellent description of how to use poll().

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

That's your passive safety backup, but I'd suggest putting a system which lives on top of that that maintains a habitable environment, and making that as simple as possible - fewer chances of things going wrong.

ESP32 has wifi, so you just join them on the same wifi network and they communicate (eg via a web interface or MQTT). I believe Home Assistant can autodiscover nodes running ESPHome.

Home Assistant recently took over/merged ESPHome, so they're two separate projects that integrate well together, written by the same people.

Home Assistant runs on the Pi and does the web GUI stuff as well as talking to all the cloud stuff (Alexa etc). It also has integrations plugins for a whole lot of third party products (Philips Hue, Tuya SmartLife, Alexa, Nest, boilers, heat pumps, electric car chargers, solar PV inverters, enormous quantities of stuff).

formatting link

ESPHome runs on the microcontroller and has a minimalist web interface ('off', 'on', '16C') and a set of drivers for lots of sensor and control hardware (like I2C temperature chips and so on). You just configure it with JSON 'I have an BMC280 sensor on pin X called Kitchen_Temp' and it makes a sensor node for that. You flash that firmware to the ESP.

Then Home Assistant autodetects the sensor node and makes a Kitchen_Temp icon in its GUI for it. And you can then set a rule to say 'if kitchen temperature below 12C send me a phone notification' or whatever.

Theo

Reply to
Theo

I've not used them, but I have my eye on these:

formatting link
the web shop doesn't work for me, but also on ebay:
formatting link

and

formatting link
(also cheaper ones with slightly fewer features)

which are addon modules with a display. The main thing I like is they're in a nice enclosure that you could mount on your wall and it look like a commercial product, rather than a homebrew thing with wires everywhere.

(In the AZ-touch case you have to mount an ESP module on the PCB as there isn't one inside, in the M5 one of the 'stack' boards has the microcontroller integrated)

I'd suggest it's not worth looking at 'industrial' products unless you're doing this in volume, or the environment is really hostile (temperature, dust etc). They are typically more hassle to work with, especially if you're not building thousands of the things. IMHO reliability is more of a problem with software misbehaving than hardware faults.

Theo

Reply to
Theo

Il 03/09/21 16:38, Dennis Lee Bieber ha scritto:

tnx ...

a dozen, not necessarily of the same type

sorry I dunno anything about this, even If I am trying to read wiki around

sb spoke about optoelectronic isolation, sb else told me it was not necessary. So I'm at a loss

the valves and the pump are high voltate, but none has big power consumption. The lowara ecocirc pump absorbs 13-60 W, the two valves far less.

yes that was an actractive feature !

it does not seem applicable, considered the dozen sensors to read. I dunno how much IO pins / sensor will be needed once I insert a ADC converter amidst

I need to find just libraries to access the IO at low level, the rest of the SW would be up to me.

--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
Soviet_Mario - (aka Gatto_Vizzato)
Reply to
Soviet_Mario

Il 03/09/21 20:20, Dennis Lee Bieber ha scritto:

sorry I don't understand :\

I am reading about FOUR WIRE RTG connection, but I dunno the scheme for the insertion of the ADC. In other words, I dunno whether is better to send the signal in compensated analog, and convert it centrally, or the other way around.

the cables are now unmodifiable as they have been "buried" in the ground. I can use two 8x0,22 mm2 poles and one 3x2,5 mm2 poles for power. This for the 2-3 DISTANT sensors. The other, closer to the control unit, will be served later with proper cables.

could this solution still be adapted to the available wirings ? I don't have a serial cable installed in the track

and I have not laid down an ethernet too ...

alas such wiring was abandoned before filling the track. I had never heard about BeagleBone Black ... I'll do some search

tnx for all, I have to study a lot before being able to just form a vague idea of this all in my mind :\

--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
Soviet_Mario - (aka Gatto_Vizzato)
Reply to
Soviet_Mario

On Sat, 4 Sep 2021 00:23:34 +0200, Soviet_Mario declaimed the following:

I think I'd agree that opto-isolation may be going too far... Relays where the 220V circuit does not connect to the switching side should be sufficient -- though you may need to put in protection diodes to block reverse EMF when the relay is de-energized (the drop in power through the switching coil can produce a voltage spike).

You'll still need to match the "powered" side of the relay to the load, while matching the switching side to the controller circuit (you may even need to use a small transistor to channel the power needed to hold the switching side).

IF used, an I2C ADC will require two lines (clock and data), and the chip may handle from 4 to 8 separate analog inputs -- you address the chip and then specify which input to read (or, perhaps, it reads all in sequence).

If using Python as the language (your speed requirements don't seem to mandate using C/C++) there are a number of GPIO bindings on the R-Pi

A SPI-based example for analog input

formatting link
uses what I think is the current preferred R-Pi Python interface
formatting link

Beneath gpiozero are things like pigpio

formatting link
which has both C and Python interfaces.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Seems like for such a slow heating application, almost anything is fast enough. He might use Python.

Reply to
A. Dumas

That works well, the first office I worked in had terminals running at 9600 baud using the lightest 3 core we could find (rated at 1A IIRC), there was only one run where we had to drop to 1200 (over half a roll IIRC) and that nearly ran at 9600 but dropped characters often enough to irritate.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

Excellent idea!

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

Not even a phone line?

In reality you can run plenty of stuff that distance, but not with a simple plug-n-play hookup

--
Labour - a bunch of rich people convincing poor people to vote for rich  
people by telling poor people that "other" rich people are the reason  
they are poor. 

Peter Thompson
Reply to
The Natural Philosopher

back in the day whole companies were wired with serial terminals. 9600 goes a long way.

--
?The urge to save humanity is almost always only a false face for the  
urge to rule it.? 
? H. L. Mencken
Reply to
The Natural Philosopher

If he uses the sysfs interface then it doesn't matter what language he prefers, so long as it has a way of writing to a file (by "fast enough" I meant fast enough in this application, it's slow compared to C libraries etc. but that makes no difference for him).

--
__          __ 
#_ < |\| |< _#
Reply to
Computer Nerd Kev

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.