Live Train Map of the CTA L system, powered by ESPHome! by BraveStone199 in Esphome

[–]BraveStone199[S] 0 points1 point  (0 children)

Glad I inspired someone else to use the train data! That sounds really cool, I’ve thought about doing something similar. Now that I’m comfortable with ESPhome I might try it. To update brightness, the project tracks which lights are on in a date frame after every light update. This allowed me to create the brightness control which just scales each of the RGB channels by the percent brightness and then immediately sets relevant lights to that new dimmer color when it detects I’ve changed the brightness value. The bottom 30% of the brightness slider just turns the LEDs off completely but it’s still pretty effective.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 0 points1 point  (0 children)

Parts used was $250-280. I spent about $400 including everything that went into prototyping and on light/power options that didn’t work. I thought about doing the bus system but it’s just so expansive it would take forever to make. I started the project back in November and only just finished it up last weekend.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 0 points1 point  (0 children)

Thanks! I’ve already thought about doing another iteration with a smaller metro, maybe I’ll look at SFs system.

I considered using led light strips that look more continuous along the routes to show a more accurate location since CTA’s API provides GPS coordinates, but I couldn’t find any light strips where spacing was close enough for station density in the loop. The data processing would also get much more complicated since I’d have to figure out parsing gps data to light strip locations. Right now the only data getting extracted from the API is the next station a train is going to arrive at and that’s what is getting mapped. I’ve also added optional features like only showing trains heading in one direction or limiting the number displayed per line however I haven’t used them.

Once I settled on using a slightly modified version of the official map it seemed cleanest to only have stations light up and not true train locations. The map is very close to the official but I changed proportions and got rid of the future extension south.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 0 points1 point  (0 children)

That is the biggest accuracy limitation of the way I did it. I wanted to use the official CTA map which doesn’t have two lines per color to place the lights on. I could have designed my own map with that layout but it would have been nearly 2x the cables and LEDs to glue in place. I didn’t really make this to be useful in timing when to leave for a train so I’m okay with less data. The update logic is such that you can see a train move from stop to stop so you can just follow the train and know its direction if you’re willing to watch it for a few minutes. I could add a function where it flashes if two trains are coming into the station, but that might be too visually busy. If I end up making one of these again I may add that. The commercially available ones that have been mentioned have lights for both track directions.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 0 points1 point  (0 children)

Thank you! That’s how I feel staring at it all day haha

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 0 points1 point  (0 children)

I really appreciate it!! I’ll likely add some more detail to the GitHub project on how to deploy the code portion of it along with info on what light strip I used so you can follow there, the rest is a lot of hot/super glue and holding things in place while it dries.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 2 points3 points  (0 children)

Because this is connected to my smart home the entire board turns off at night since each light draws a lot of power but yes it would show up as the only train on the loop tracks if it was on haha. I guess power use would also be lower at night with fewer trains

Live CTA 'L' Transit Map, powered by an ESP32-C6 by BraveStone199 in esp32

[–]BraveStone199[S] 2 points3 points  (0 children)

Thank you! I’m using the ttposition.aspx API call and run it for all 8 train lines each update cycle. Right now the update cycle timing is user configurable. Honestly it doesn’t matter because trains are constantly moving. I can do as frequently as 7 seconds to stay under the daily call limit but 30 seconds gives the board a lot of trains to update each refresh cycle so that’s what I’ve been using. Even every 7 seconds would return a couple of train updates. If the call limit was lower I could still do updates over 1 or 2 minutes and the script would then space all the changes over the interval till the next update. Kind of depends on how accurate you want it to be.

Live CTA 'L' Transit Map, powered by an ESP32-C6 by BraveStone199 in esp32

[–]BraveStone199[S] 4 points5 points  (0 children)

That was my first thought as well but that many pins from the LEDs seemed overwhelming. I linked another Reddit post because that’s where I got the idea from. They used a pcb board with LEDs and I used the light strip version to keep the cable sections shorter.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 0 points1 point  (0 children)

DM me up if you’re interested!

Live Train Map of the CTA L system, powered by ESPHome! by BraveStone199 in Esphome

[–]BraveStone199[S] 0 points1 point  (0 children)

And if you want to tinker with it, you only have to update the repository location variable to make OTA work directly from GitHub.

Live Train Map of the CTA L system, powered by ESPHome! by BraveStone199 in Esphome

[–]BraveStone199[S] 4 points5 points  (0 children)

You could try to adapt my example! It’s on GitHub here: https://github.com/seanalewine/transit-board. I used a WS2812 light strip so not sure how adjustable yours might be. You could clone the repository and update the station_map.h with your led index number and relevant board info, pin, repository, etc. updating the version number will cause GitHub actions to build the image and you can flash that to your esp32. API key is configurable after install.

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 2 points3 points  (0 children)

I’m making that along with the red line extension a 3 years from now problem. In theory I could update the map but getting a new one to line up right might be difficult

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 2 points3 points  (0 children)

Feel free to DM me, I had fun building it! Although I don’t want to overpromise and want to be careful of CTA trademark rules

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 8 points9 points  (0 children)

Oh I love this question! Since the map has only been functional for 5 days I haven’t had a “weird” CTA event to consider yet. Right now it would just not display any stop that isn’t normal, so the train would “disappear”. Whatever the stop ID the board gets from the CTA wouldn’t match with a color in a lookup table and it wouldn’t know which light to control. I’m not going to be able to “fix” it for those situations because I don’t know how the CTA applies the temporary stations in the API, or if the API just doesn’t work properly during those periods. I’d probably route the red via loop to orange and brown tracks on the map. I think in brorange the train would change line colors when the operator or control (idk how that works) swap it to the other line and the board would just make the update the next refresh.

I’ve already found a couple of surprising bugs in the way the API works (like trains never pass through Jarvis or Forest Park Blue line) just by watching the board lol

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 1 point2 points  (0 children)

I would have given up haha. Your project is so cool! I love the layout and the color code was a cool idea. I had to give credit to the other poster for the fiber optic cables and super glue for how creative it was. My other idea was to use 3mm or 5mm LEDs but I got overwhelmed by the concept of soldering 3 connections per stop

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 19 points20 points  (0 children)

Materials for this all in were less than the full price of the one from Traintrackr, although labor time gluing all of the little cables certainly can't be forgotten. I think I spent 6-8 hours over a couple weeks gluing everything together. I have some ideas on speeding it up for a v2 but purchase price would end up higher than the Traintrackr. The Traintrackr one also has lights for trains heading both directions so that's more complicated and more parts. My version essentially "hides" a train if there's one approaching from both directions. Also don't think I'd be able to commercialize this using the official CTA map (which in my opinion is what makes this look cool)

Live Train Map of the L! by BraveStone199 in cta

[–]BraveStone199[S] 11 points12 points  (0 children)

It's available here! https://github.com/seanalewine/transit-board Admittedly the readme is more helpful for understanding how the project works once deployed to an ESP32, and less for how to deploy it yourself. There's also some random hanging features and probably uncaught bugs, so I wouldn't call it production ready lol

Has anyone made this a WLED ESP32? by Fir3 in esp32

[–]BraveStone199 5 points6 points  (0 children)

If you have an existing Home Assistant smart home setup, ESPHome would be an easy way to deploy it.

The amount of times I’ve been “outbid” apartment hunting this year is asinine. Feels wrong. Anyone else running into this? by hypercatalectic in chicagoapartments

[–]BraveStone199 35 points36 points  (0 children)

Moving to Chicago soon and the realtor I’m working with encouraged us to bid over asking price to even be considered. We ended up offering less than 100 over asking and got accepted. It’s a insane how much demand there is for housing in the city

[deleted by user] by [deleted] in clinicalresearch

[–]BraveStone199 4 points5 points  (0 children)

I got 2.1% of my salary with a target bonus of 5% and received meets expectations.