choice of the most fit Raspberry version

Yes. I thought your link would be to a C version but that's on another part of the page. The shell is certainly slow enough ;) I also failed to write what I meant: there are very convenient Python modules for accessing the Pi's hardware, and myriad short & simple examples. (Also on that page, but it seems rather out of date generally, e.g. WiringPi has been retracted by Gordon.)

Reply to
A. Dumas
Loading thread data ...

I once made one of those using a 30m mains extension lead and some 'DB9 to mains plug' adapters. It worked fine, although I don't think it would have met H&S :-) There was an extra male mains plug that was very heavily taped up to prevent anyone plugging it in and making the whole assembly live...

Theo

Reply to
Theo

I really miss the days when you could quickly patch something together and it would 'Just Work' (tm).

--
W J G
Reply to
Folderol

TNX !

--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
 Click to see the full signature
Reply to
Soviet_Mario

On Sat, 4 Sep 2021 09:10:30 -0000 (UTC), A. Dumas declaimed the following:

SysFS, I believe, has been deprecated by the Linux OS team -- still there, but supposed to be phasing over to the "character device" mode:

formatting link

Some of the language specific utility libraries may have already converted over behind the scenes.

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

On Sat, 4 Sep 2021 07:46:24 +0100, The Natural Philosopher declaimed the following:

Not when precision levels are going to be measured -- assuming you can even find a POTS line these days. I'm pretty sure the phone company had repeaters placed at regular intervals:

formatting link
""" In the 1950s negative impedance gain devices were more popular, and a transistorized version called the E6 repeater was the final major type used in the Bell System before the low cost of digital transmission made all voice band repeaters obsolete. "" Voice grade POTS was never rated for "fidelity". It was limited to an equivalent of about 65kbps (US regulations cut that down to about 56kbps, reserving the rest of the bandwidth for signaling functions -- hence the limit on old modems (and even then, it tended to be one way, the other direction ran slower). Note that even that isn't sent as pure bits, but as tones consolidating 4 or more bits into each tone. The actual data rate being limited to around 2400 baud (not bps; with 8 bits per tone, 2400 baud supports a 19200bps rate) ["baud" -> state changes per second; on slower modems using just two tones -- high/low -- baud and bps were the same]

There are companies that still sell loop-current and ring-voltage boosters for long line POTS.

Sure -- RS-422 differential wiring (

formatting link
) is rated for up to 1200m using twisted pair vs RS-232 (
formatting link
) single-ended wiring having an accepted limit of around 15m unless special low capacitance cables are used (Note: RS-232 properly uses a voltage swing of around 12V; the UARTs on all these single board computers and microcontrollers are NOT RS-232 signals, having voltage swings of 5V or even 3.3V depending upon the processor; RS-422 is defined with a much lower voltage swing).

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

Not between local exchange and consumer, in the UK

And ADSL was fine at 5Mps at 32km

That was because the onward backbone transmission was 64kbps digital

The actual copper as anyone with ADSL can tell you is well capable of up to 20Mbps over reasonably short (sub 1km) distances

Nor really in th9s country. Not allowed.

And others. ADSL VDSL , SDSL as well as G.703 are all long distance (over 100m) protocols that can support high bit rates on twisted pair As has also been suggested 'one wire' sensors are quite suitable for low data rates on extremely rubbish cabling

Just because it never gad a port on your computer doesn't mean it doesn't exist.

Data transmission over random bits of less than ideal wire is - or was - very big business.

Thank Clapton I now have an optical fibre coming into my house....

But in the context of what the OP wants to do, it looks like 'one wire' sensors are likely to be the simplest approach, and since data rates can be well down below 1 baud, there shouldn't be any real issues

--
"In our post-modern world, climate science is not powerful because it is  
true: it is true because it is powerful." 
 Click to see the full signature
Reply to
The Natural Philosopher

On Sat, 4 Sep 2021 18:44:47 +0100, The Natural Philosopher declaimed the following:

Uses frequencies sets outside the voice-band (voice is And others. ADSL VDSL , SDSL as well as G.703 are all long distance

DSL, as mentioned, is tonal based, not digital -- groups of bits are mapped to audio tones (and another group to another set of audio tones). The actual signalling (baud) rate is less than the bps rate seen by the user.

QAM 16 uses one tone-set to encode 4-bits of data

formatting link

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

Oh, thanks for that. I only really use either Shell/Bash or C so SysFS was going to be the basis for a few shell script based projects. None of which I've actually got around to mind you.

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

On 04/09/2021 19:47, Dennis Lee Bieber wrote:

and what is 'pure digital'? analogue voltages are somehow not digital? try telling that to a gate designer...

I am merely making the point that a twisted pair is well capable of far higher data rates than you suggested.

How it does it is weaselling.

If you understood communication theory you would realise that in the end it is limited by bandwith width and signal to noise ratio - moudulation schemata are simply a way to approach that limit.

and the level of the tone may not matter, just enough to detect

*shakes head in wonderment*.

Its a bit more complex than that.

Oh dear. You REALLY need to read up on Shannon.

You are talking out of your anal orifice. ANY digital signal is in the end encoded in analogue. The maximum theoretical transmission rate is set by power level attenuation, noise and frequency bandwidth of the link. It has NOTHING to do with how you modulate it: THAT is chosen as a way of dealing with non random noise.

So what?

It has to do that because it has to coexist with baseband audio. And deal with LW, MW and SW transmissions. That are very narrow band interference at constant phase. Using frequency bins and phase modulations makes the best of dealing with that interference.

But G703.2 is baseband serial. A piece of Ethernet cable is baseband serial. Data rates per unit power and distance are similar.

The limit is governed by Shannon's law*.

Telephone Modems are limited to 56kbps because baseband audio was encoded into a TDM 64kbps digital stream for long distance switched telephony.

They do not represent anything more than a way to utilise the properties of that digital audio channel effectively and deal with telephone line noise in the baseband. They most certainly do NOT represent the limitations of the copper pairs themselves.

Given that the OP needs are satisfied with an extraordinarily slow data rate, the cable will do the job: that is not the problem. The problem is finding the simplest and cheapest technology to utilise it. One wire is probably it.

-------------------------------------------------------------------------

*Shannon's law is stated as shown below: C = B log2< (1 + S/N) where: C is the highest attainable error-free data speed in bps that can be handled by a communication channel. B is the bandwidth of the channel in hertz. S is the average signal power received over the bandwidth calculated in watts (or volts squared). N is the average interference power or noise over the bandwidth calculated in watts (or volts squared) S/N is the signal-to-noise ratio (SNR) of the communication signal to the Gaussian noise interference depicted as the linear power ratio. The function log2 signifies the base-2 logarithm. All logarithms are exponents. Assuming that x and y are two numbers, the base-2 logarithm of x is y, provided that 2y = x. Shannon?s explanation of information for communication networks helps to identify the important relationships between several network elements. Shannon?s equations helps engineers determine the amount of information that could be carried over the channels associated with an ideal system. Shannon?s is still the base for engineers and communication scientists in their never-ending quest for faster, more robust, and more energy-efficient communication systems. He showed the data compression principles mathematically and also showed how controlled error rates can be used to assure integrity when information is carried over noisy channels. Practical communications systems that can be operated close to the theoretical speed limit described by Shannon's law have not yet been devised. Some systems that employ advanced encoding and decoding are able to achieve 50 percent of the limit specified by the Shannon for a channel with fixed signal-to-noise ratio and bandwidth.
--
When plunder becomes a way of life for a group of men in a society, over  
the course of time they create for themselves a legal system that  
 Click to see the full signature
Reply to
The Natural Philosopher

On Sun, 5 Sep 2021 01:19:44 -0000 (UTC), snipped-for-privacy@telling.you.invalid (Computer Nerd Kev) declaimed the following:

I don't know what pigpio uses internally -- it tends to require a daemon module started with "sudo", and the application libraries use either sockets or pipes to talk to the daemon.

formatting link
Has a command-line "pigs" program, or can be used similar to sysfs (that is: echo commands >pipe, cat results...)

""" pigs pigs r 4 pipe I/F echo "r 4" >/dev/pigpio cat /dev/pigout """

Has fairly detailed C and Python libraries.

{The R-Pi has way too many I/O options... , some of which probably use sysfs behind the scenes if they haven't been updated to char-dev}

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

then use an RPi4, or a 3b+ if the lead time is too long for a 4.

For Analog to digital I suggest setting up a serial interface to an Arduino and use its analog to digital converters.

A serial interface can either use the hardware serial, or (my preference) just plug the arduino in directly via USB. You can even program it from the RPi 4 (I think the Arduino IDE has been builot for the RPi), or you can just use avrdude from the RPi to upload firmware to the Arduino if you don't want to move USB cables around.

In any case if you're doing development on the RPi itself, having a faster one with more RAM will be helpful.

I suggest using ssh to run programs on the RPi. Do not bother connecting a mouse and keyboard and large screen. If you use a touch screen this is fine for testing your display but you won't be able to reasonably do development that way. So, ssh and use 'DISPLAY=server:0.0' to make X11 applications display on 'server' rather than the RPi touch screen. The 'server' machine will need to be listening for TCP X11 connections and also you must use 'xhost' to add the RPi's IP address to the access list.

Anyway, that's how I'd do it. (and I do quite a bit of ssh access and running X11 programs on networked workstations to edit stuff on the RPi while it also has a touch screen I can test with)

Reply to
Big Bad Bob

Is the RPi4 in short supply?

Reply to
gareth evans

Yeah, I don't think so? Also, a 2 GB Pi 4 is now the same price as the old

1 GB Pi 3. Of course it draws more power and generate more heat, so that might be drawbacks in an industrial environment (because it or its power supply might fail earlier).
Reply to
A. Dumas

is this compatible with cables of "alarm" type (8x0,22 mm^2) ? I have two of them installed. I can no longer install further wiring, as the trench has just been refilled with earth an costipated

--
1) Resistere, resistere, resistere. 
2) Se tutti pagano le tasse, le tasse le pagano tutti 
 Click to see the full signature
Reply to
Soviet_Mario

On Wed, 8 Sep 2021 13:42:43 +0200, Soviet_Mario declaimed the following:

The cable length is the killer. Regular (single-ended/unbalanced, RS-232 style) 1) requires three wires: Tx, Rx, and GND; 2) has a /typical/ maximum run of 50 feet (~16m). True RS-232 specifies +5-15V for "0" and

-5-15V for "1" at the sender, with a minimum of +3V & -3V at the receiver. The UARTs on most SBCs (embedded Linux boards) and microcontrollers use board voltage -- 0V and +5V (or +3.3V -- depending on the board, and you may need to match those at both ends; AVR [Uno] is 5V, ARM Cortex is 3.3V).

RS-422 (double-ended/balanced) requires four wires: Tx+, Tx-, Rx+, Rx-, which should be done as two sets of twisted pair. It uses lower voltages, and uses the difference between the + and - leads to determine "0" or "1" state (which is why there isn't a mandated ground lead, though you should still have a common ground connection between the local and remote boards). It supports distances up to 1200m (depending upon signal rate -- shorter segments -- 10m -- can reach 10Mbps, 1200m is rated for just under

100kbps). Of course, you would have to wire up transceivers to convert the single-ended UART to double-ended and back. You probably want some buffer ICs anyway to handle the current load. Something like taking the UART Tx signal, and feeding it to a pair of inverters, and then feeding the output of one inverter to a third to get the logical - signal (Use a fixed width font to view the ASCII art/diagrams):

|------|>o----|>o---- Tx- Tx -----| |------|>o----------- Tx+

The first inverter on each side is the buffer to provide higher current. Use an inverter and NAND gate at the receive end

Tx- ------|>o----------| |====|&o----- Rx Tx+ -------------------|

|>o buffer/inverter |&o NAND gate

Hopefully, at the slow rates in use, the minor delay of the extra inverters won't cause synch loss -- otherwise you'll need a non-inverting buffer on the Tx+ lines to better match the delay of the inverter on the other line

USB won't manage the distance. USB2 is rated for 16feet (5m), and USB3 for just over 9feet (3m). To go longer requires "active" cables (which are basically a cable with a built-in one-port hub in the middle, fed from one end with power supply; a search found one at just under 100ft (30m) for US$50).

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

You can get dedicated uart->422 chips. They're cheap as err. chips :)

However, if you're doing that, a much better option is RS485.

If you're running 485 you can daisy chain multiple modules and run a master-slave setup. With such as the MAX3082

The folks I used to work for did this for the master control system in a plastics moulding factory, where 16 14M high silos had to be selected to feed 10 moulding machines (each of which had 2-4 'bins'). All over a single cat5e cable running at 19200 baud.

I was partly involved in the design, and one of the other guys was a topography wizard and worked out the shortest possible route that was actually achievable. This still used most of a 300M drum!

--
W J G
Reply to
Folderol

I think the problem the OP has is he's not got twisted pair - if it's this sort of stuff:

formatting link

then it's just 8 parallel cores, not even screened. Noise is going to be an issue if it's very long.

I don't know what's best in that situation - current loop? Single ended with a big driver? Running differential and hoping there's not enough differential mode noise (which there might not be, if it's outside)? You might get away with it if the data rate is low enough.

Unfortunately it means he's going to need some design to deal with the cable issues, on top of whatever he strings on the end of it. So just hooking an off the shelf Arduino/etc isn't going to do it without extra hardware.

Moral of the story is: when digging a trench bury the best cable you can afford, and twice as much as you think you need, as cable is cheap and digging is expensive...

Theo

Reply to
Theo

What is best is low data rate single wire,because the sensors are available that use it with no additional hardware. And no need for external poqwer. Software can read the sensors many times and eliminate any errors due to noise

It is a two wire protocol and is self powered. It is exactly designed for this application whereas RS232/432 et etc are not

The pi can take a '1 wire' hat

--
"And if the blind lead the blind, both shall fall into the ditch". 

Gospel of St. Mathew 15:14
Reply to
The Natural Philosopher

On 08 Sep 2021 18:13:34 +0100 (BST), Theo declaimed the following:

Or a large conduit (or pair, to separate data from power), with enough room to route a long snake and pull additional cables through from one end.

But yes... the OP buried some wires, and /then/ is trying to figure out what signals the wires will support, rather then determining the needs of various communication protocols and burying suitable wires for the applicable schemes.

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

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.