Live data from Hacker News

How we made the PJON network protocol from scratch

pjon.org

11–20 of 34 posts

Re: How we made the PJON network protocol from scratch

#11

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 y…

Thanks, that helps.

I had to check quick at a gas station and post this.

For the most part, I took away 27kbps, and it seems the intention is software bit bang.

Sure, it’s not master/slave like LIN, and with an arbitration scheme more like CAN. But, without hardware codec, DMA buffering and interrupts, I feel it’s a lot less useful to me as my embedded projects are already pushing their limits with hardware communication.

Still, while it’s not good for me, I do see utility in a bit bang format for LED, IR, simple RF, etc. This makes sense and seems well thought out.

Re: How we made the PJON network protocol from scratch

#12

Earlier quoted context omitted.

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 y…

Thanks, that helps. I had to check quick at a gas station and post this. For the most part, I took away 27kbps, and it seems the intention is software bit bang. Sure, it’s not master/slave like LIN, and with an arbitration scheme more like CAN. But, without hardware codec, DMA buffering and interrupts, I feel it’s a lot less useful to me as my embedded projects are already pushing their limits with hardware communica…

No worries, for sure the SoftwareBitBang implementation is not designed to stream digital audio or video at high speed but it is handy for many to move few bytes from sensors in a local network that can be built very quickly and at a low cost.

Have a nice Christmas :)

Re: How we made the PJON network protocol from scratch

#13
I use PJON in combination with MYSENSORS in my smart home system. . It is the first wired protocol that works so stable and don't even need extra hardware - just one free IO pin. I have over 200 smart sensors and devices around my house. PJON was a perfect solution for all problems I was facing with wired and wireless communication for DIY smart home solutions. With some luck PJON will be officially supported by MySensors already from next release - beta test are already done. I think this will make PJON more common.

Re: How we made the PJON network protocol from scratch

#14
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

I use PJON in combination with MYSENSORS in my smart home system. It is the first wired protocol that works so stable and don't even need extra hardware - just one free IO pin. I have over 200 smart sensors and devices around my house. PJON was a perfect solution for all problems I was facing with wired and wireless communication for DIY smart home solutions. With some luck PJON will be officially supported by MySensors already from next release - beta test are already done. I think this will make PJON more common.

Re: How we made the PJON network protocol from scratch

#15
Impressive work! The first programming class I took had us implement communication using IR LEDs between Arduinos as a final project. It's a more difficult problem than it seems at first because of all the constraints. The Arudino Uno only has 2K RAM which means you need to be very conservative with buffers. Additionally, you usually want the RNG for the two nodes to be different which means you can't just use the time to seed it and need to look for other sources of entropy like reading the voltage on an open port.

Re: How we made the PJON network protocol from scratch

#17

I use PJON in combination with MYSENSORS in my smart home system. . It is the first wired protocol that works so stable and don't even need extra hardware - just one free IO pin. I have over 200 smart sensors and devices around my house. PJON was a perfect solution for all problems I was facing with wired and wireless communication for DIY smart home solutions. With some luck PJON will be officially supported by MySe…

> over 200 smart sensors and devices around my house

I need to know!

Re: How we made the PJON network protocol from scratch

#18
I had a constraint of having to use existing unshielded and untwisted wires in parallel to 220V mains wiring. Basically I'm doing DIY thermostats for floor heating and only 4 copper conductors were available. Stumbled on PJON with Softwarebitbang and it seemed to fit the bill, although they do recommend twisted and/or shielded cabling.

With no background in hardware and Arduino there was a lot of learning to do, but in the end I'm really happy that it's been working flawlessly for a few months now and one copper conductor is even unused.

Don't have an oscilloscope so no idea how "ideal" the situation is on the wire with regards to electrical interference, but for anyone interested, it's running in a star topology with wire lengths about 20 metres on, with ESP32's as the microcontrollers.

edit: thanks for PJON, gioscarab!

Re: How we made the PJON network protocol from scratch

#19
post #18

I had a constraint of having to use existing unshielded and untwisted wires in parallel to 220V mains wiring. Basically I'm doing DIY thermostats for floor heating and only 4 copper conductors were available. Stumbled on PJON with Softwarebitbang and it seemed to fit the bill, although they do recommend twisted and/or shielded cabling. With no background in hardware and Arduino there was a lot of learning to do, but…

Thank you for your feedback, happy to know it helps :)

Re: How we made the PJON network protocol from scratch

#20
It's beyond suspicious that 4 newly created users all have positive experience with PJON and only posted on this submission.

- https://news.ycombinator.com/threads?id=vt_rack

- https://news.ycombinator.com/threads?id=jdaandersj

- https://news.ycombinator.com/threads?id=gryzli133

- https://news.ycombinator.com/threads?id=BoldAndBald

I wonder if there are other similar submissions that also "creates more accounts" than usual and why that is.

Post reply on HN