Live data from Hacker News

A Raspberry Pi-powered live train station sign

balena.io

121–130 of 146 posts

Re: A Raspberry Pi-powered live train station sign

#121
post #48

Pretty cool. When I took the train to work I made a simple stop-light with transit data. Trains ran every 10 minutes and it took me a few minutes to walk to the station. Green meant I could definitely catch the next train. Yellow meant I'd make it if I walked fast, and red meant I'd miss this train and need to wait for the next one.

Curiously, I've made almost this exact same thing. In my case it needs to account that some platforms are a couple minutes extra walk.

Given that we've both independently implemented basically exactly the same thing, I wonder how many other people would want something like this.

Re: A Raspberry Pi-powered live train station sign

#122

Very cool but I find a pi is overkill for something like this. ESP8266 or ESP32 would work just as well.

Pi Zero Ws are $10, ESP32 dev boards are $12. Why pick the more expensive one AND spend more time writing the software?

ESP32 uses less power. When you use deep-sleep, you can draw as low as 40microAmps, a sensor I've build on a ESP32 has been running for 3 months on the same battery and I expect one more out of it. The battery is a 2200mA LiPo 18650, so nothing that extraordinary either.

The Pi0W probably won't run a day on the same battery.

Re: A Raspberry Pi-powered live train station sign

#123

I'd love to see a writeup of doing something like this but without any of the balena cloud stuff.

I agree, what is the benefit of running balena here? You have Pi Zero, OLED screen (SPI library), and some code to access a 3rd party API.

For me, repeatability and ease of management - I used to be really demotivated by having to start from scratch with a Raspbian install whenever I built a project but all the prebuilt base images for different languages/OS and configuration as code due to Docker make the Pi so much nicer to use for stuff like this.

Re: A Raspberry Pi-powered live train station sign

#124
post #48

Pretty cool. When I took the train to work I made a simple stop-light with transit data. Trains ran every 10 minutes and it took me a few minutes to walk to the station. Green meant I could definitely catch the next train. Yellow meant I'd make it if I walked fast, and red meant I'd miss this train and need to wait for the next one.

I made something similar when I was in uni and had to catch a bus to get back home, but with my Pebble and a C application: next bus was one button press away and another press was all was needed to start a carefully calibrated double alarm for "start packing" and "leave" times

Re: A Raspberry Pi-powered live train station sign

#125
post #122

Earlier quoted context omitted.

Pi Zero Ws are $10, ESP32 dev boards are $12. Why pick the more expensive one AND spend more time writing the software?

ESP32 uses less power. When you use deep-sleep, you can draw as low as 40microAmps, a sensor I've build on a ESP32 has been running for 3 months on the same battery and I expect one more out of it. The battery is a 2200mA LiPo 18650, so nothing that extraordinary either. The Pi0W probably won't run a day on the same battery.

The ESP32 has deep sleep, but it uses about the same power as the pizero when running. The ESP32 is a really power hungry:

http://www.geekstips.com/wp-content/uploads/2017/10/esp32-po...

vs

https://raspi.tv/2017/how-much-power-does-pi-zero-w-use

Considering that he pi as way more ram, an SD card and a GPU, and is running 4 times as fast.

the important take away is that they have different use cases.

Re: A Raspberry Pi-powered live train station sign

#126
post #48

Pretty cool. When I took the train to work I made a simple stop-light with transit data. Trains ran every 10 minutes and it took me a few minutes to walk to the station. Green meant I could definitely catch the next train. Yellow meant I'd make it if I walked fast, and red meant I'd miss this train and need to wait for the next one.

I also found that a binary notification is all I needed. I just want to know if everything is running OK or if there are delays. So I built this a few years ago: https://unop.uk/train-disruption-indicator-with-a-blinky-tap...

:-) I use reactube everyday. It is permanently open on my desktop and also as a home screen shortcut on the phone. :+1:

Re: A Raspberry Pi-powered live train station sign

#127
post #122

Earlier quoted context omitted.

ESP32 uses less power. When you use deep-sleep, you can draw as low as 40microAmps, a sensor I've build on a ESP32 has been running for 3 months on the same battery and I expect one more out of it. The battery is a 2200mA LiPo 18650, so nothing that extraordinary either. The Pi0W probably won't run a day on the same battery.

The ESP32 has deep sleep, but it uses about the same power as the pizero when running. The ESP32 is a really power hungry: http://www.geekstips.com/wp-content/uploads/2017/10/esp32-po... vs https://raspi.tv/2017/how-much-power-does-pi-zero-w-use Considering that he pi as way more ram, an SD card and a GPU, and is running 4 times as fast. the important take away is that they have different use cases.

Though it's important to keep in mind that deep sleep can fairly long, if you use external triggers, you can go days or months in inactivity, which saves A LOT of power.

Though I do agree it depends on your use case, if you're plugged into the wall, a Pi0 might be the better option.

Re: A Raspberry Pi-powered live train station sign

#129
post #107

I'd love to see a writeup of doing something like this but without any of the balena cloud stuff.

Hey - I wrote the original code that was forked (exquisitely, I should add!) by Balena. The original code is just a Python script. I haven’t written it up into a blog yet, but everything to get you started is on my GitHub at https://github.com/chrishutchinson/train-departure-screen . Very happy to help answer any questions too

Thanks for the inspiration!
Post reply on HN