
Show HN: PJON – Open-source Arduino multimaster communications bus system - gioscarab
https://github.com/gioblu/PJON
======
roel_v
When you say 'one wire', I assume the Arduino's on both ends need to have some
common ground?

Secondly, is there a way to passively power an Arduino and potentially layer
your PJON over it? I actually have an application where I have 2 wires between
two point, power (mains) at one side, yet I need to transfer the state of two
switches from the powered point to the other side. (it's a switch for an
electric curtain that normally needs 3 wires to operate but I have only two).
Any way I can use this for that?

~~~
gioscarab
Yes gound is necessary for every connected device.

Actually passive power on the same communication wire as 1-Wire has actually
is not part of the functionalities of PJON, could be developed and is
something I am considering to add in future.

~~~
roel_v
But quite often the ground isn't the same level at all points in an
installation, so you need to run two wires between the two Arduinos.

Not picking on you, I'm just saying that this is a very confusing item for an
electronics amateur like myself. Modbus is the same - many manufactures claim
'works with two wires' but then leave out that you need a ground, so that in
pretty much every real-world application you end up running three wires.

So as a constructive feedback, I'd like to suggest that you either make the
term very explicit or talk about '2 wire' instead of '1 wire' (I realize that
that makes it harder to 'compete' against 1-Wire (which also needs two
wires...) before people who don't really understand what's involved, but I
think that that price is paid back by the goodwill you get from being
'honest', because 'dishonesty' is what it often feels like when people claim
'one wire' systems that turn out to require two wires, even if for an EE it's
obvious what is meant by 'one wire')

~~~
jonsen
"A ground loop is the result of careless or inappropriate design or
interconnection of electrical equipment that results in there being multiple
paths to ground where this is not required, so a complete loop is formed.":

[https://en.m.wikipedia.org/wiki/Ground_loop_(electricity)](https://en.m.wikipedia.org/wiki/Ground_loop_\(electricity\))

~~~
gioscarab
Really interesting article thank you!!!!

------
IshKebab
I think you should list all the flaws of I2C and SPI and say if PJON also
suffers from them:

* How easy is mixing 3.3V & 5V? * Can I always program the address of a slave? (If not, how do you resolve address clashes?) * Can slaves initiate communication?

etc.

~~~
gioscarab
Hi there, this is really a good suggestion, why don't you open a issue on
github related to this?

To have it working with mixed 3v3 5v you have to choose main channel voltage
and consequently use converter modules.

There is not an autonomous packet id assigner, is the user inside the program
code to assign which board has which id

------
jonsen
It's 'baud', not BAUD/S.

Your signal timing is 20 microseconds which equals a signal rate of 50000
baud, or 50 kBd.

There are 12 signals in each frame holding one byte. So the byte rate is
50000/12 = 4.2kB/s.

~~~
gioscarab
You are right, I exluded from the calculation the padding bits, that in the
baud measure is not correct, I will correct the readme as soon as possible.
Thank you again

~~~
jonsen
What do you mean by 'bandwith'? I would suggest you rather used maybe 'data
throughput'?

"Channel bandwidth may be confused with useful data throughput...":

[https://en.m.wikipedia.org/wiki/Bandwidth_(computing)](https://en.m.wikipedia.org/wiki/Bandwidth_\(computing\))

~~~
gioscarab
Thank you so much, I corrected the readme as you suggested :)

------
kaoD
> Accuracy: 99.95%

What does "accuracy" mean here? Successful transmission rate?

~~~
gioscarab
Accuracy is the ratio between packets correctly received / packets received
with an error expressed in percentage.

This error obviously is detected with CRC, data trashed and NAK sent to inform
transmitter of uncorrect packet reception (all in background)

------
gioscarab
What do you think about it?

~~~
antoinealb
What does the `accuracy` measurement on your benchmarks show ? How did you
estimate max transmit distance of 50m.

I know I am pretty negative but to me once you reach this level of complexity
in your applications it is time to move on to microcontrollers with proper
networking capabilites such as CAN, Ethernet, etc.

~~~
gioscarab
I'm sorry I forgot to anwer you your firsts questions:

\- Accuracy is the ratio between packets correctly received and packets
received with an error expressed in percentage.

\- I tried physically with a 50 meters long copper wire.

~~~
jonsen
50 m might definitly lead to problems in other settings.

"Because both ends of the RS-232 circuit depend on the ground pin being zero
volts, problems will occur when connecting machinery and computers where the
voltage between the ground pin on one end, and the ground pin on the other is
not zero. This may also cause a hazardous ground loop. Use of a common ground
limits RS-232 to applications with relatively short cables. If the two devices
are far enough apart or on separate power systems, the local ground
connections at either end of the cable will have differing voltages; this
difference will reduce the noise margin of the signals. Balanced,
differential, serial connections such as USB, RS-422 and RS-485 can tolerate
larger ground voltage differences because of the differential signaling.",
cited from:

[https://en.m.wikipedia.org/wiki/RS-232](https://en.m.wikipedia.org/wiki/RS-232)

