Map Trackr Layers

Our first geographic boards were designed to show rain data, but it became clear that our customers wanted to display more than just rain, so we developed a new generation of ‘map trackrs’, which can show more than rain.

These new map trackrs have the advantage of individually dimmable LEDs (64 brightness levels per LED, rather than just on/off) which lets us display much more detailed information.

The geographic maps lend themselves to environmental/weather data, so we’ve added wind and cloud cover in addition to the original rain layer.

To change the layer your board displays, login to your dashboard, click your device, and then click ‘Map Layers’

This will then show you a modal with the avalibale layers for your map type.

In addition to the new layers, we also added the ability to animate the data. This cycles through the most recent 6 frames of data, ending on the most recent frame.

We update rain data every 15 minutes, so the rain animation shows 75 minutes of data.

We update wind and cloud data every 3 hours, so this animation shows 18 hours of data.

We’ll be adding more data layers in the future, what else do you want to see on your trackrs?

PCB Manufacturing

The history of Traintrackr can briefly be described as ‘tinkering with PCBs until I found something other people wanted to buy’. I designed around 100 PCBs before I came up with the first MBTA subway design, most of which were shown to people around me at the Cambridge Hackspace. It was a good way to improve my PCB designing skills, and a great way to receive feedback along the way. The MBTA PCB got people’s attention, you could see it in their faces once they realized what the blinking LEDs meant, and it was the start of Traintrackr.

Back at school in the late 90s we used a milling machine to fab our own single sided PCBs, it was a bit fiddly, but we managed to get some boards out of it. At the Cambridge Hackspace we had a CNC and the bits to mill PCBs, but despite a few attempts I never managed to successfully get up and running. Despite designing and manufacturing boards professionally over many years, I had never made one for fun. It was at this point that I learnt how easy manufacturing in China was, so decided to give it a go.

The first PCB I made for myself, and the first part of my wireless sensor network. Features: atmega328p, rfm12b, LiPo charging circuit, prototype space.

I started using Dirty PCBs, they offer good prices and all of my early boards were fabbed there. At the time you could get 10 x (50mm x 50mm) boards for $14 including delivery. Amazing considering that the densely populated boards I was designing would be basically impossible to make myself. Despite the name the quality was great, and they all worked perfectly.

Some companies only want to deal with single designs and charge extra if you want to panelize various boards into 1 mini panel, Dirty PCBs don’t mind and will happily fab anything you send them. This can be useful if, like me, you want to build 15 mini PCBs and combine them into 2 x (100mm x 100mm) boards.

15 PCBs Panelized into 2 x (100mm x 100mm) boards. Panelizing saved me quite a lot of money.

When it came to the MBTA board I moved to JLC PCB, partly because they were cheaper, but also because they had recently started their assembly service.

We assembled the prototypes ourselves, using solder paste and a solder stencil, applying all the components by hand before putting it in the oven to bake. We had a few false starts where the circuit breaker tripped, once we sorted those issues out the boards came out really well.

Our first MBTA board in the reflow oven

However, there was way too much manual labor involved, so we moved on to the JLC assembly service.

We couldn’t quite believe the price of the assembly service at first, as they are significantly cheaper than any other assembly service, especially at low volume. The caveat here is that although they have 30k components to hand, that doesn’t cover some of the basics like USB connectors, the ESP8266 chip we use, or many other non standard components you might need. They also sell themselves as a prototype service, so although the quality has been mostly good, sometimes a few boards have come back with minor issues (a component the wrong way around, a scratched board etc), they also only do 30 boards at a time.

One big issue we found with them was on our Large London Underground product, we use 333 of the WS2812B-MINI LEDs on this design and each board had 2 or 3 failures which we had to fix manually. Some research showed that those LEDs are particularly sensitive to moisture when going through the reflow oven, and we assume JLC hadn’t been storing them appropriately.

For our first MBTA board we used their prototype service, hand soldering the ESP8266 and USB connector ourselves. This worked well, and the price was almost the same as buying the boards, buying all the components, and assembling it all ourselves. Despite still having to assemble a couple of components ourselves, the price was truly amazing.

Getting your boards made

There are several stages in getting your data ready for assembly. You’ll need your GERBER file (showing the physical layout of the board), bill of materials (BOM), and your placement file, showing where on the board all the components go, including their orientation. These can all be exported from your PCB design software, although the BOM has to be adjusted quite a bit to fit into the template required by JLC. Once you get the hang of this it’s not too hard, but it took a while to work out what was needed.

There are 3 main parts of the placement file, the side of the board each part is going on (although JLC only assemble one side), the position of the component, and the orientation. It seems that each board house has their own ideas of what 90 degrees looks like, partly based on the orientation of the components as they come out of the tape, and partly based on the software you/they are using. It’s also confusing that the component orientation is calculated anti-clockwise, and not clockwise, which takes some getting used to.

With this in mind JLC will actually manually rotate everything based on the markings on the board, so make sure you have board markings, and make sure they are in the right place. JLC will often email you with an image to confirm the orientation once you have ordered, asking you to add markings in the future. Knowing these markings are right before you submit your order makes things a lot less stressful. One thing to note is that the markings on the board should match up with the makings on the component, which may not be pin 1. A standard IC will have pin 1 marked, but some components have a different pin marked (the WS2812-MINI has pin 3 marked). For these components make sure the marking on your silk screen matches up with the marking on the component.

JLC give you an assembly preview of the files you have uploaded, which is reassuring when you’re about to spend money on your first assembly job. It’s really helpful to make sure everything looks correct, the components are in the right place, and the orientation is correct (although they will fix this if they spot an issue)

JLC assembly preview for the TFL2 board, showing the positions and orientation of all components to be assembled

After several orders from JLC the HT16K33 chips that we were using the drive our LEDs became harder to find, to the point where JLC removed them from their database. On our larger boards we had 5x of these chips, each with 28 pins. Where previously we were hand soldering 25 pins (for the ESP8266 and USB connector), we now had to add another 140, this wasn’t going to work for us.

At this point we were starting to build bigger products, and wanted them in larger volumes. JLC had been good at small scale (and was still perfect for prototyping), but we needed a larger manufacturer. We did some research and went to ALLPCB to manufacture our first batch of 100 MBTA dual direction boards.

The process here is very similar to JLC, although less automated. You supply them your gerber, BOM, and placement file, they quote you the assembly and the PCB costs upfront, but manually price the parts. This is usually back in a day or two. JLC have a huge catalogue of parts to hand (so they can quote your prices right away), ALLPCB have to order all the parts in, so need the time to do that.

I was a bit nervous about ordering 100 boards only to find they had put all the LEDs on back to front (any other component we could have fixed by hand if we really wanted, replacing 500 LEDs per board would not have been viable) but I didn’t need to worry. For every assembly order they will assemble the first board, confirming with you before they make the rest. This starts with photos of the board from a few angles, and gives you your first indication on how the assembly went.

We made the mistake in asking them to program the board so we could see it working. The instructions I sent didn’t make any sense to them, and I wasted a few days trying to explain before they suggested they send me the board to verify myself. Although this adds a bit of cost and time, it’s really reassuring to test the board yourself before the rest of the order is assembled. This is what we do for every production run, so we have a higher confidence that the batch is going to be successful.

We have recently built a board programmer which we will be sending to ALLPCB, which will let them flash firmware to each board, to verify that everything works. This means that any issues found can be corrected over there, saving us any rework when we receive them here. So as we move to higher volumes of boards from them, we can be confident that they are delivering boards that are ready to go, with minimal issues.

Night Mode

Sometimes you might want to adjust the brightness of you board at night, either turning it down, or off completely to avoid night time distractions. With this in mind we’ve built ‘Night Mode’ to let you do this.

First you’ll need to set your timezone, so we can correctly calculate when to adjust the LEDs on your board. You can do this by heading to our website, logging in, and clicking ‘Select Timezone’ in the top right of the dashboard

Now you can click the board you want to adjust, and then the ‘Brightness / Night Mode’ button on the top of the page.

Here you’ll get a popup letting you adjust both daytime brightness, but also the nighttime settings.

You can adjust the brightness and night mode settings as required:

  1. Brightness – during normal operation, how bright should the onboard LEDs be?
  2. Enable [Night Mode] – should we enable the night mode settings?
  3. Night Brightness – How bright should the LEDs be at night? You can also select ‘LEDs off’.
  4. Night Starts – At what time do you want the night settings to start?
  5. Night Ends – At what time do you want the night settings to end?

Note: although you can’t adjust the brightness of our original 100mm x 100mm MBTA trackr, you can still setup night mode, turning the LEDs off at night.

Factory Reset After Uploading Your Own Code

We’ve built our trackr boards to be hackable, you can write your own code and upload it to your board as needed, displaying your own data, or changing the way you display our data.

However, at some point you may want to reset the board to it’s factory firmware, here’s how you do it.

Disclaimer: We can’t fully support boards when new firmware has been uploaded, and can’t guarantee that you’ll be able to factory reset. We’ll help point you in the right direction, but in the event your ‘brick’ your board or can’t get the below code working you may need to send your board back to us for a firmware upgrade.

First you’ll need to install the Arduino IDE and the ESP8266 board files, these can be found here:

We don’t provide access to our firmware directly, but give you a simple sketch that will connect to our servers and download the most recent firmware to your board.

The code for this can be found here:

There are further instructions listed at the top of the Arduino sketch. You’ll need your WiFi SSID, WiFi password, and an update code from us to authorize the server update.

Send us an email if you need to update your board and we’ll send you the details you need.

Adjust Rain Settings

We’ve been asked a few times by customers to adjust the sensitivity of the rain data on our rain products. Here’s what we’ve done, and how you can make the changes.

For our rain maps we process precipitation radar images to determine if it’s raining in any one area, looping through all the areas on the board to get data for the entire map. For each area we calculate how many of the radar image pixels are showing rain, setting a default threshold of 8% rain pixels to show rain in that area.

You can now manually update the rain threshold, setting it from 1% to 100%. You can find the setting on your device page, head to your Traintrackr dashboard, click on your board, then look for the ‘Set Rain Threshold’ button at the top of the page.

Click the button and you’ll see a popup asking you to select a new threshold level. Once you select a new threshold we’ll send it to the board and you’ll see the change reflected within a minute. Any changes made to threshold levels when a board is not running will be sent as soon as the board reconnects again.

Adjust Brightness

Many of you were asking to adjust the LED brightness on your boards. It is important to some of you late at night when you don’t want to be blinded in a dark room, or others when using boards in bright rooms.

Brightness controls are enabled on all products released since the beginning of 2020, so this is all products except for the original square (100mm x 100mm) Boston MBTA board.

To adjust the brightness on your board head to your Traintrackr dashboard, click on your board, then look for the brightness button at the top of the page.

Click the brightness button and you’ll see a popup asking you to select a new brightness level. Once you select a new brightness level we’ll send it to the board and you’ll see the change reflected within a minute. Any changes made to brightness levels when a board is not running will be sent as soon as the board reconnects again.

Live MBTA Data

mbta boards

Our Large MBTA boards are an update to our first MBTA board in many ways, they are larger, show the whole network, and have moved away from updates every minute, to updates every second.

Updating the board every minute is easy, we just make a vehicle location request to the MBTA API, displaying that data on the board’s LEDs. Updating every second is much more complicated, we can’t use vehicle locations anymore (they only update once a minute), so we have to use departure predictions.

We pull departure predictions from the MBTA API, and then cycle through each one, adjusting the LEDs as the trains are predicted to depart from each station. This make the movement on the board look much more fluid and natural, but does have it’s drawbacks.

  • Trains can go faster or slower than predicted, so the LEDs can jump when the next set of predictions come in.
  • Predictions aren’t available outbound for the last stop on the line, as there aren’t any public departures.
  • We don’t know where vehicles are, just when they are supposed to arrive/leave. Because of this we don’t show trains waiting to depart from their first stop, until they are scheduled to depart.

Despite these limitations, being able to see the trains move around the network in real time is much more engaging, and we think it’s a big improvement.

Reprogramming Your Trackr

We designed our trackr boards to connect to our servers, access our processed data, and then display that on the onboard LEDs.  Collecting this data in most cases isn’t easy, so we’ve done the hard work for you. All you need to do is enter your setup code (which comes with each board) + WiFi password and you’re away.

However as hackers ourselves, we realize that some of you may want to take matters into your own hands when it comes to the data, especially if you want to display something different, or data of your own.  So we’ve made it easy for you to reprogram the board, allowing you to display whatever you want.

Disclaimer: We can’t fully support boards when new firmware has been uploaded, and can’t guarantee that you’ll be able to factory reset. We’ll help point you in the right direction, but in the event your ‘brick’ your board or can’t return the firmware to it’s default state you may need to send your board back to us for a firmware upgrade.

One option is to use the Arduino IDE, with ESP8266 Core installed.  This will allow you to program the ESP8266, which is the main microcontroller on the board.  

Standard 0805 LEDs

Some of our boards come with standard 0805 LEDs driven by the HT16K33 LED driver chip, to drive this you’ll need to use a suitable library.

Addressable WS2812-mini LEDs

If you are trying to reprogram one of our boards with onboard RGB LEDs (WS2812-mini) you’ll need a library that can speak to those LEDs.

The hardware side of programming your board is easy, you can either use an FTDI programming cable, or on some of our board we’ve included a USB to UART chip (CP2104), so all you need (apart from your computer and the board itself) is the USB cable that came in the box. You’ll need to check the board you received from us to see if we have included a CP2104 chip.

Programming Steps

  • Write your code in the Arduino IDE and make sure it compiles
  • In the board manager select ESP8266
  • Holding the onboard ‘Flash’ button, connect your board to your computer via USB
  • Release the flash button
  • Make sure you have the correct port selected, it will look something like SLAB_USBtoUART (if using the CP2104 chip)
  • Upload to your board

We’ve put together a very simple Arduino sketch to get you started with the basics, it’s then up to you to write some code and make something amazing.

Schematics and basic firmware can be found here:

If you need to reset your board to it’s original firmware, you can find our instructions here

Let us know how you get on with your boards, we’d love to see what you do with them.