Large Electron Deployment Troubleshooting


I have a large deployment of Electrons (230~) that we use on campus at UCSC. The Electrons have mostly been working very reliably, consistently posting the data expected from them. There are however about 10-15 per week that go dark and often need to be reset to continue normal operation. I am actively working on trying to increase the reliability of these devices. At this point I am not entirely sure where to pursue the cause of the inconsistency issues. I have a guess that it could be narrowed down to a few areas.

  • The dropouts might be caused by cell service inconsistency. I have uploaded a few devices with most recent Particle Firmware 0.8.0 and have found some instances that have low enough cell service to warrant a warning in the device diagnostics in the Particle product console.

  • The dropouts might be caused by something in the user firmware. It might be possible that there is some configuration in the code I wrote that causes a few Electrons to go dark. The hardware/firmware and device OS are consistent across all 230 deployments. I’d like to think that the 215~ that do stay up are proof enough that the cause of the dropouts is not in the actual user firmware. It’s also entirely possible that something can be changed there to remove whatever the cause is.

At this point I am not sure where to begin searching for where the issue is. It is my full time job to develop the system that we are currently relying on so it is very important for me to be able to get this issue resolved.

Thanks in advance!

In regards to the firmware; it’s always helpful if we can have a look at it. It’s very hard to guess for issues or think of areas of improvement if we haven’t got a clue what’s going on.

Unfortunately the firmware is the property of the university and I am not allowed to post it in a public forum.

It’s probably ok to post just the relevant parts though. I guess an area of concern that I have in regards to the firmware is in how you can ensure information is published to the Particle cloud. What might be a best practice to give the data the best chance to reach its destination? Here’s how I have been handling publishing in semi-automatic mode.

waitFor(Particle.connected, 30000);
bool success = false;
int publishAttempts = 0;

while(!success) {
     String data = String::format("{ \"tag\": \"%s\", \"distance\": %s }", tag.c_str(),  String(emptyDistance).c_str());
     success = Particle.publish("d",data);
     if (publishAttempts > 3) {

@jlbeebou, you may want to look at this:


Also, there are a bunch of software things that you can do to help the Electron get out of any weird situation it might fall into using the techniques here:


Awesome, I think I have everything I need to be able to refactor and deploy a new firmware version. Hopefully the additions will show some results. That was really a great help. I really appreciate it.

1 Like

@jlbeebou Hey! Always love to hear how the Particle devices are being used in the field since there are so many different cool things people are doing with them.

Can you tell us more about how the Electrons are being used and what benefit that is providing?

@RWB of course! On our campus there are around 230~ dumpsters that the university services with our in house refuse collection department. The UCSC campus is also located on a heavily forested and sloping terrain. This makes servicing the dumpsters on a regular basis a trickier task than you would find in an urban environment. To ease the task of servicing dumpsters, we created our own ultrasonic dumpster fullness sensors to guide the trucks to the areas where we know we can service the most amount of refuse and recycling on campus. This is actually not a new concept there are several companies that provide ultrasonic waste level sensors and one that provides an image based dumpster sensor. We were using one of these companies but because of the very specific needs of our department, we decided to create our own to allow us to have access to the data the sensors provide and be able to manipulate it to further data collections. We’ve been able to use our Particle sensor system to do a much better job of collecting the data that we need and put it in the hands of the people who need it. Most dumpster sensor companies only care about getting full dumpsters serviced. I am also researching using the data to create predictive models using machine learning to track improvements in sustainability on campus.


I think @Vitesze is working on something similar.

That’s Awesome!

I’ve been talking with @Vitesze for a while now as he tries to find a reliable sensor for a large trash company in Canada who is basically doing the same thing as you are.

What sensor did you find to be most reliable for your uses?

How large are the dumpsters your servicing?

I really only tested one ultrasonic waste level sensor. Maxbotix makes a few versions that are specifically designed for waste level sensing. They require a fair amount of noise filtering and making decisions based previous fill readings. They are very tricky to use but mostly they have been reliable. We have everything from 2 cubic yard dumpsters to 8 cubic yard dumpsters on our campus. The most common being 6 yards which is what most people would consider the average dumpster size.

1 Like

If @Vitesze is interested, feel free to contact me about the research we have been doing. We are currently looking for funding and at the possibility of licensing the work we’ve done.

1 Like

@jlbeebou I’m sure he is interested. He knows filtering is important and needs help with that.

He is trying to keep cost low and is trying to work with the cheaper waterproof sensors since the Maxibotix sensors are so expensive compared to the lower cost versions.

So are you guys using the Maxibotix Ultrasonic Trash specific sensors only for your fleet?

@zach Maybe @jlbeebou 's 230 Electron trash fill level sensors for the whole University would be a good addition to the blog and usage examples?

Sorry for the late reply, I was away on vacation for the last two weeks.

Like @RWB mentioned I’m working on pretty much the same thing - a Particle-driven device that will be able to sense the fill-level in dumpsters, so we can optimize the servicing of them with trucks.

I know the companies you’re talking about - our company has literally gone through a dozen of them over the years. The first big issue with these is (obviously) cost - I don’t know about the particular situation at UCSC, but for us we spend X dollars per individual container per month to have it serviced - some of these sensors can be pretty expensive, so it’s simply no longer a worthwhile investment anymore. For instance:

assume you spend $120/mo to have one container serviced 3-times a week. If you could cut this down to 2-times a week through sensor data analysis, you will save $40/mo on it. However, if the sensor (and its maintenance) costs you $15/mo, that’s already a significant portion of your savings evaporated. And you’re not going to be able to optimize servicing on every single container you put a sensor on.

The second big issue is that a lot of these sensor manufacturers are still in an early stage with their product - it may be likely to malfunction, stop connecting, show erratic data, etc. Committing to a large number of sensors therefore can become a very risky financial decision. These manufacturers also typically go through new product versions rapidly, so any sensor you obtain is going to be outdated quickly. With a Particle-driven device, you have full control over the components, e.g. you can swap out an Electron for a Boron in the future, without producing an entirely new device + discarding the old one.

The final big issue, is that if a particular sensor is exceptionally successful, at some point a manufacturer could want to terminate a contract with a client and offer services directly to the end-user - e.g. our business is a waste management consultant, and we utilize sensors to monitor the waste efficiency of large clients (e.g. shopping malls, hotels). One of our sensor partners in the past took note of what we were doing, cut contact with us and started selling sensors directly to our clients. Shortly after, these clients walked away from us as well.

So that’s in short why our business decided to work on their own Particle-driven sensor. There’s some differences between us and an organization like UCSC, but I can definitely think of what the benefits would be for them (besides the obvious research component of it).

@jlbeebou Feel free to shoot me a PM, as our use case is pretty much identical. Our dumpsters also range from 2 to 8 cubic yd. It would be nice to collaborate on the data filtering part.