Electron Project Discussion [Hardware]


I don’t’ see any issue with soldering the uFL connector in place as long as your good with keeping them on there forever. You could put on a new uFL connector in the future using a hot air SMT removal tool if you really wanted to.

@ScruffR Do you have any feedback on the product firmware update process and how it’s handled by the Electron when running a quick wakeup, read sensor, Publish data, and then back to sleep loop when running on a Primary battery that you want to last as long as possible?


Do you have any experiences with the 3dbi antenna Particle uses? Is the reception generally good? I’m looking to place these devices only in major Canadian cities. I have great reception right here, but of course that doesn’t mean it will work everywhere. Having to take sensors back to replace an antenna would become expensive and time-consuming


Yes, all my Electrons have the standard PCB antenna and they work well. I’ve never tried any other cellular antenna with the Electron for comparison so I can’t comment on that but I have not heard of any real complaints about the antenna not doing a great job except for people in areas with weak cellular reception.

The PCB antenna always connects to the cellular network just fine but sometimes it can take a few mins to connect to the cellular network which seems like a pretty common occurrence for me when testing at home or even while out driving around sending GPS data regularly. I do not always get instant quick cellular connections although sleeping with cellular standby on helps a lot for quick cellular reconnection times.

The metal trash can will affect your cellular signal some but at least you have the whole top of the can open for the signal to escape.


@RWB & @Vitesze,

There are a couple of threads on product firmware update OTA that might help out:

Basically, you do need to keep the device from going to sleep until the update is done.
The other issue is you may not want updates from interrupting your critical functions, if you happen to have anything that is critical.


Yep, the code below looks to be what your needing :thumbsup:

Thanks @cyclin_al

Anyway, within my void_setup, I added the following code:

uint32_t ms = millis();
while(millis()-ms < 5000) Particle.process();
if (System.updatesPending())
    ms = millis();
    while(millis()-ms < 60000) Particle.process();

Basically, wait 5 seconds to check if there’s an OTA update pending. If TRUE, then wait 60 seconds to let it take place. Without those delays, your firmware will likely stay stuck waiting to get pushed to the device. Hope this helps anyone who faces a similar issue.



Actually normally the lids on containers are closed by default. But so far the devices still connect perfectly fine. I think the Particle Taoglas has a really good price/quality ratio though, as I have one antenna with only marginal better gain that’s already 4 times as expensive

I will give those update recommedations a go next week! would system.UpdatesPending stilp return TRUE if the device already has initiated the download of the firmware? Or only beforehand as it sees there’s an an update ready to fetch?


Yea, I just know plastic does not affect the cellular signal so whether the lid is open or closed the cellular signal has the whole top of the can to clearly send and receive cellular signals.

I think this answers your question:


Yes thats true. Some of these containers actually do have metal lids, but normally its some kind of rubber-y material.

I will definitely get onto that update thing next week. I think at this point I get prrtty much everything on my devices working correctly, its just thr small bits like this that are left :slight_smile:

Well, and the camera which however is going to be something for later.


How’s it going up there?

I played with some FTP upload and download code over the weekend and it would for sure work for getting small picture images off a photon to an FTP server quickly. Didn’t have much luck with large 50-100MB files but I’m looking for better code for that on the Photon.

So I can say for sure that if you get an image on an SD card uploading it to an FTP server is pretty easy to do.



I’m still trying to find a solution for the protective glass for the VL53L0X. I email’d the guy who apparantly makes the cover glass for it, but apparently it only has hardness-coating (meaning water/oil/smudge will definitely affect it). My other cover glass from Astra Products has the same issue. According to them, it’s very difficult to provide reliable hydrophobic/oliophobic coating, and it definitely would have to be re-applied after a while.

I wonder what kind of glass they use in computer mice? Because that doesn’t seem to affect the laser signal and even after 10 years fingerprints etc. won’t really stay on it. Until I can find a good way to protect my VL53L0X it’s useless because in at least half of my sensors the sensing quality already deteriorated within 2-3 weeks



So what does the acrylic cover look like when it starts to stop measuring accurately? Is it just dust causing the problem or other debris caused by the trash dumping out?

Maybe this is why a lot of the larger companies doing this are using Ultrasonic sensors?


When I touch it with my fingers, the fingerprints are left and won’t go away. I didn’t actually use the glass yet in a waste container, but I can tell for sure any smudge or dirt is going to stay on it because it isn’t ‘‘self-cleaning’’. I touched the glass just to get the plastic wrapper off, and that alone was already sufficient to comtaminate it enough for half of the readings to be totally off

I’m sure there’s the technology for it. Like I said, what about the glass they use for the laser in a computer mouse? That offers sufficient transmittance for the laser, yet they never seem to fail even after 10 years.


Post a picture of the acrylic you have there.

It shouldn’t be a problem.

I don’t believe in the self-cleaning materials, it just does not make sense to me.

Did you order any of the sample Lenses from the Hornix guy?


Perhaps a bit tough to see, but you can tell there’s a lot of contamination on this already. Small particles here and there are ok, but overall all of the glass is covered in oily fingerprints that are impossible to remove now unless you use special cleaning stuff. Meanwhile I’ve seen plenty of glass used in other applications that won’t absorb any of that stuff.

I unwrapped this piece yesterday and only touched it a couple of times. It will be really hard making a proper sensor with this when people may (accidently) touch it or throw stuff against it

I didn’t order any Hornix samples, but he described that it ONLY comes with a hardcoat (which my current glass also has) and therefore he mentioned it wouldn’t be suited for use in waste containers.


Can’t you wipe the acrylic clean with a soft terrycloth rag? Or a clean part of your cotton t-shirt?

I do this all the time to wipe off fingerprints for the Acrylic I cut.


Tried it, but it really has to be very clean for the laser signal to pass it correctly.

Also, imagine this being on a waste container somewhere; are you going to drive over there to clean it off with a rag every few weeks? I’m trying to find a long-term solution.


I get it.

Most of the companies doing this are using Ultrasonic sensors, I guess for a good reason.

Have you tested any Ultrasonic sensors yet?


I did, they seem alright but their detection cone is usually really big on them - and depending on shape of the object signals sometimes don’t return.

Installed some of my sensors on waste containers in a different part in the city. I can tell there’s definitely some connectivity issues now though. Between yesterday noon and now, I expected a combined total of 32 connections to the server - but only 26 connections occured. A group of 3 sensors each missed 2 connection points (they don’t seem to be dead as they DO connect; it’s just that they missed one of their connections).

Check code below to see how I handle their connections. 60 seconds used to sufficient for me to get connections at my desk and outside (but nearby) but it seems it isn’t sufficient always elsewhere due to data reception?. Some of these new waste containers also have full-metal lids which further troubles this.

I’m now debating between giving them more time to connect (or perhaps force them to re-attempt 5 minutes later), or upgrading the antenna. However the options for this are a bit limited as everything needs to be compact so it can’t be significantly bigger than the Particle Taoglas antenna.

case CONNECT: {
  if (millis() - lastConnectSample >= 8000) {
     lastConnectSample = millis();
  if (Particle.connected()) {
      Serial.println("connection established!");
  	stateTime = millis();
      state = FIRMWARECHECK;
  if (millis() - connectWaitTime >= 5000) {
      connectWaitTime = millis();
  if (millis() - stateTime >= 60000) {
  	Serial.println("failed to connect"); 
  	stateTime = millis();
  	state = SLEEP;

Also, just in-case, if I have something like:

  if (Particle.connected()) {

in my Publish state, would there be a possibility that this would return FALSE, after the device already successfully connected? There’s about 1-minute right now between connecting and publishing, so if it’s possible for the Electron to return FALSE on this it could mean the issue is the firmware, not the connectivity


Started looking at other ultrasonic distance sensors and found these if you have not already. They have waterproof versions although they are kinda pricey. Looks like you need to find a wide cone version.

Trash Bin specific sensors:

Here is there trash can specific sensors:


Yeah I came across those! A little bit expensive but they seemed of good quality. Atm I have a couple of JSN-SR04Ts which are cheap waterproof sensors…the measurement cone is a bit large and every now and then I do get a wrong measurement on them