Live data from Hacker News

Show HN: PJON v11.1 an independent, decentralized, open-source protocol

github.com

31–39 of 39 posts

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#31
I’m about to start a project where four Arduinos will be talking to each other every other minute and also to a central server ~100 times a second and haven’t really found a satisfactory way to handle the communication. Had been hoping to use ZeroMQ as I have some experience with that but it looks like there are no Arduino compatible libraries available.

However, this looks just like the thing I’ve been looking for. Serial communication and TCP and CRC checking!

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#32
Also check out the related ModuleInterface library (https://github.com/fredilarsen/ModuleInterface) that lets devices declare their contracts for settings, outputs and inputs and a master that synchronizes these between modules and to and from a web server / database.

It does data logging and storage to a database for trending and/or analysis, as well as configuration in a web page.

It uses PJON as transport, so it can run on one or multiple of the supported media, for example a SoftwareBitBang bus between worker devices, with a router that connects them via UDP to a master process on Linux. Or any other combination.

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#33
post #30

PJON is a very interesting project and I've used it in the past between a RPi and an Arduino to communicate. Atm I'm developing my own bus protocol since PJON was having some problems with the optocouplers I have (the line I need has almost a millisecond of lag and doesn't allow for a frequency beyond a couple kilohertz as it needs to get to several devices at different logic levels and has some longer lines with hig…

Ciao Zaarn, that is cool compliments, which sort of encoding you chose?

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#34
post #30

PJON is a very interesting project and I've used it in the past between a RPi and an Arduino to communicate. Atm I'm developing my own bus protocol since PJON was having some problems with the optocouplers I have (the line I need has almost a millisecond of lag and doesn't allow for a frequency beyond a couple kilohertz as it needs to get to several devices at different logic levels and has some longer lines with hig…

Ciao Zaarn, that is cool compliments, which sort of encoding you chose?

Simple NRZ for both clock and data. Data integrity is provided by parity bits in various fields and CRC32 for the payload.

I use token bus for media access control since it's fairly simple to implement and I don't need jam detection in any components.

Token passing enables a far more simpler software for simply being a passive client (ie, a sensor doesn't need to be able to control the bus, it only needs to respond while someone else is controlling the bus) and the active masters (which can cleanly pass control of the bus).

I don't mean any of this as offense to PJON either, it's an amazing protocol, the problems I have aren't solved by any product on the market.

It's also a good engineering challenge.

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#35

I’m about to start a project where four Arduinos will be talking to each other every other minute and also to a central server ~100 times a second and haven’t really found a satisfactory way to handle the communication. Had been hoping to use ZeroMQ as I have some experience with that but it looks like there are no Arduino compatible libraries available. However, this looks just like the thing I’ve been looking for.…

You could also use ROS Arduino serial library -

http://wiki.ros.org/rosserial_arduino/Tutorials

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#36
post #34

Earlier quoted context omitted.

Ciao Zaarn, that is cool compliments, which sort of encoding you chose?

Simple NRZ for both clock and data. Data integrity is provided by parity bits in various fields and CRC32 for the payload. I use token bus for media access control since it's fairly simple to implement and I don't need jam detection in any components. Token passing enables a far more simpler software for simply being a passive client (ie, a sensor doesn't need to be able to control the bus, it only needs to respond w…

Why not RTZ?

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#37

I’m about to start a project where four Arduinos will be talking to each other every other minute and also to a central server ~100 times a second and haven’t really found a satisfactory way to handle the communication. Had been hoping to use ZeroMQ as I have some experience with that but it looks like there are no Arduino compatible libraries available. However, this looks just like the thing I’ve been looking for.…

You could also use ROS Arduino serial library - http://wiki.ros.org/rosserial_arduino/Tutorials

Thanks for the suggestion! I’ll check it out.

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#38
post #34

Earlier quoted context omitted.

Simple NRZ for both clock and data. Data integrity is provided by parity bits in various fields and CRC32 for the payload. I use token bus for media access control since it's fairly simple to implement and I don't need jam detection in any components. Token passing enables a far more simpler software for simply being a passive client (ie, a sensor doesn't need to be able to control the bus, it only needs to respond w…

Why not RTZ?

NRZ is easier to do on most devices since you simply put a high on the bus to send a one and a low on the bus to send zero, esp. if you use something like an Attiny. Also means I can basically plug-and-play it into the i2c connections I have setup.

Re: Show HN: PJON v11.1 an independent, decentralized, open-source protocol

#39

I’m about to start a project where four Arduinos will be talking to each other every other minute and also to a central server ~100 times a second and haven’t really found a satisfactory way to handle the communication. Had been hoping to use ZeroMQ as I have some experience with that but it looks like there are no Arduino compatible libraries available. However, this looks just like the thing I’ve been looking for.…

You could also use MQTT, which is a lightweight messaging protocol intended for embedded devices.
Post reply on HN