Live data from Hacker News

How we made the PJON network protocol from scratch

pjon.org

1–10 of 34 posts

Re: How we made the PJON network protocol from scratch

#5
post #4

Giovanni, Can you highlight some "real world" use cases where PJON is/was used? I'm curious what folks have used PJON for, especially over RF (excluding Wi-Fi), such as the "video camera control" project in another comment.

Ciao jlgaddis Jack in Video Camera Control used PJON over PJDL which is a wired data link that needs only ground and a data cable to connect up to 255 devices, cables can be up to 2km long at the slowest baudrate (1.97kB/s - 15808Bd). PJDL in few words is a sort of open 1-Wire with a longer range, support for more devices and a stronger immunity to noise. See: https://github.com/gioblu/PJON/blob/master/src/strategies/So...

The core of the community uses PJON over PJDL in home automation systems, irrigation systems, feeding systems ecc. Soon Mysensors will include PJON over PJDL in their list of supported transports. PJON works also over TCP, UDP, MQTT, ESPNOW, LoRa ecc. so generally a router is built and programmed to run 2 instances of PJON for example PJDL and MQTT, to then route data to and from a process running on a real-time operative system

See: https://github.com/gioblu/PJON/blob/master/examples/routing/...

which can also run PJON thanks to the wide support of the implementation.

See: https://github.com/gioblu/PJON/wiki

Looks to be handy for many to connect devices, even on different media.

Although many also use PJON to implement mesh or peer-to-peer networks, there is a group in Australia building such a network using PJON over LoRa.

I must say I hope we will be able to start building a private network infrastructure with it, that would be awesome.

Companies and institutions are also implementing PJON within their products and services. AD24, a Czech company, recently created a mesh network over PJON to connect advertising monitors around the city of Prague. It looks there are also few companies in Germany which use PJON to create real world automation systems.

Recently contacted by the Universitat Politècnica de València (UPV) to support the development of a PJON network of temperature and humidity sensors to monitor the vault of the Cathedral of Valencia and avoid its decay, I hope this will end up done, it would be really rewarding.

Re: How we made the PJON network protocol from scratch

#6
post #4

Giovanni, Can you highlight some "real world" use cases where PJON is/was used? I'm curious what folks have used PJON for, especially over RF (excluding Wi-Fi), such as the "video camera control" project in another comment.

The main thing that originally sparked my interest in PJDL was multi master, which is clearly a massive advantage over 1-wire

Re: How we made the PJON network protocol from scratch

#7
post #4

Giovanni, Can you highlight some "real world" use cases where PJON is/was used? I'm curious what folks have used PJON for, especially over RF (excluding Wi-Fi), such as the "video camera control" project in another comment.

The main thing that originally sparked my interest in PJDL was multi master, which is clearly a massive advantage over 1-wire

Yes Jack is right, another massive advantage is that with PJDL devices can arbitrarily transmit data safely, enabling new ways of building things, for example sensors and actuators can communicate directly with each other without a master in the middle.

Re: How we made the PJON network protocol from scratch

#8
post #4

Giovanni, Can you highlight some "real world" use cases where PJON is/was used? I'm curious what folks have used PJON for, especially over RF (excluding Wi-Fi), such as the "video camera control" project in another comment.

I have used PJON, with the SWBB and DUDP strategies, for my home automation setup for at least 4 years. I do not need the kilometer range of SWBB, but have stretches of tens of meters running alongside 220V AC wires with no problems, in both star and daisy-chained topologies. The system is very stable, and I would like to point out that the alternatives I looked at before required me to buy extra hardware/shields that cost more than the Arduinos themselves to get going. With PJON it is just connecting to the pins in the most inexpensive way. This plus multimaster, the strength against interference, the long cable lengths and few topology limitations makes it a clear choice for many purposes. Plus, it is free :-)

Re: How we made the PJON network protocol from scratch

#9
So he remade CAN without requiring a specific physical layer?

This jumps around a bit between the transport and phy a bit, I guess I didn’t really get where the special sauce is. I also never saw a kbps number.

There is potential I would have use for such a thing I guess. Although LIN works pretty well over 1wire and is built in to most UARTs now.

It makes me cautious when I read these things and don’t see specific talk about what hardware module is expected to do the work. Yea, they got two wire twisted pair distance, is that using a specific transceiver? Does that hook to a USART or CCP or SPI? It sounded async because of the longer bits as start of frame, but bit banging and capture/compare kinda sucks.... IDK maybe it addresses this all and I missed it.

What I didn’t miss is he is selling a book at the end.

Re: How we made the PJON network protocol from scratch

#10

So he remade CAN without requiring a specific physical layer? This jumps around a bit between the transport and phy a bit, I guess I didn’t really get where the special sauce is. I also never saw a kbps number. There is potential I would have use for such a thing I guess. Although LIN works pretty well over 1wire and is built in to most UARTs now. It makes me cautious when I read these things and don’t see specific t…

Here you can find the implementation of PJDL used by Jack Anderson to determine the maximum range:

https://github.com/gioblu/PJON/tree/master/src/strategies/So...

All devices listed in the compatibility section are able to communicate over a twisted pair with no additional hardware, as Fred well noted, you just need one wire and connect directly the IO pins. And up to 255 devices can share the same twisted pair.

As you can read in Video Camera Control Jack just used two arduinos, 2km of wiring within his university's network and a couple of pull-down resistors. The protocol works even when the human body is used as a conductor as shows the gif present in the article.

On social compare someone made this: https://socialcompare.com/en/comparison/comparison-of-networ...

I think the comparison between PJON and LIN there is revealing. As you can see LIN handles up to 16 devices, it is master-slave and has a range of 40, with a complex front-end at a relatively high voltage.

PJON is free for use, it is all open-source. We do sell products to fund the development of the project.

Post reply on HN