Electron Project Discussion [Hardware]


#121

Yea they look to be better quality sensors that should last a long time.

This company looks to be using them:

https://enevo.com/


#122

Yeah exactly, I saw those Enevo sensors before and could tell they use the sensors from MaxBotix.

The thing is though, the rates for those sensors seemed to be pretty steep (towards $80-90) unless you buy in large quantity. I assume Enevo bought a lot of these things and so lowered their production cost quite a bit.

Im keeping into consideration, though theore5ically the JSN-SR04T should also be good (lower quality but cheaper) as they for sure are very waterproof and water and smudge resistant. Right now I drilled a hole in my protextive case and attached it on there with superheavy duty tape. Will put it out in the field next week to see how reliable and consistent the readings are


#123

Yes, that sensor you have is much more reasonably priced but I also see a lot of mediocre reviews on it so it will be interesting to see how well they work out for you over time.


#124

@Vitesze How is the rollout going? Everything stable?


#125

All is well so far. Currently getting all 40 of them installed on waste containers which takes a little while, but so far the data seems pretty good. Connectivity is also great.

Looks like most of the issues I was facing before were more related to the hardware of the Electron, rather than actual connectivity. At times I can see them searching for a signal for several minutes, then it reboots and finds the signal within 10 seconds


#126

Good to hear!

Let me know how things progress, I’m very interested in seeing how this works out long term.


#127

I’ve looked at data from 50 sensors for the past two weeks, and conclude that the accuracy of my container pickup detection is only 90% or so…I’m not sure what happens with the remaining 10%…they don’t seem to be waking up even though the sensitivity for the accelerometer I use is set quite low.

Is there any way you think while Electron is in Deep Sleep, for an accelerometer to send the Interrupt signal once a certain tilt treshold is reached? I know this is possible when the Electron is awake and I’m already doing this, but so far I’ve only been able to set the accelerometer to wake up the Electron upon hitting a movement treshold.


#128

You would need a tilt sensor for alerting on tilt changes.

The accelerometer should be able to be set so a truck picking up the trash bin should trigger an interrupt every time it happens I would think and based on my testing.

Are you using the same sensor that’s on the Asset Tracker?


#129

I’m just worried that a tilt sensor may be a bit too primitive, as there’s many variables that come into play, e.g. lots of vibrations, difference in angles it is set up at etc. Ideally, I really would prefer to have a sensor that can very accurately measure it’s position at any time, and send the interrupt signal to the sleeping Particle whenever it hits a 45-degree angle threshold (in whatever direction that may be)

I’m using the ADXL-362, which should be similar to the LIS3DH? Either way, I also have a spare LIS3DH lying around so I could test with that if there’s more potential with it.


#130

The latest tilt sensor chips are totally customizable so for sure you could get one to work how you wanted. Just have to get one and play with it.

Or as your doing, just keep playing with the settings on the sensor you have. I can’t see how a truck picking up a bin wouldn’t trigger an accelerometer sensor set on it’s most sensitive setting.


#131

Me neither, which is why I have been doing tests now changing the sensitivity. I increased the sensitivity already before, but apparently it’s still not enough to set it off sometimes, so I will continue to up it;) It’s fun to work on this project, but sometimes frustrating, as really waste containers come in all sizes and shapes, and each pickup action by a truck is different from the rest in terms of forces.


#132

Sounds like a Tilt sensor would be better since it would detect when the bin is lifted upside down vs just forceful movements.


#133

For now I’m going to increasing the sensitivity more - because what you said makes sense. On the most sensitive setting, it should go off even with the slightest movement. I still haven’t set it yet to the highest sensitivity settings.


#134

It’s tough because on the smaller bins too much sensitivity and somebody throwing stuff in the Bin could trigger the sensor. That’s where the tilt sensor makes more sense.


#135

It’s set to wake up, and then take measurements to determine the angle. Setting it off without anything happening to the bin would not yield a message to the server that it was picked up.

Anyway, looked at the most recent dates, and there’s two bin pickup cases where the sensor did wake up, but didn’t say it was picked up. Really puzzled by this; I thought it was a sensitivity issue but seems to be a measurement issue.

I have this code, that senses the angle:

 xl.readXYZTData(XValue, YValue, ZValue, Temperature);
	if ((XValue != 0 && XValue != -1 && XValue > -1500 && XValue < 1500) && millis() - xloneSample >= 250) {
	        xloneSample = millis();
	        xval1 = (XValue);
	        Serial.print("xval1=");
            Serial.print(xval1);
	        Serial.print(" (");
          Serial.print("X=");
            Serial.print(XValue);
            Serial.print(" Y=");
            Serial.print(YValue);
            Serial.print(" Z=");
            Serial.print(ZValue);
            Serial.println(")");
	        }
  if (xval1 < -400 || xval1 >= 400) {
      delay(500);
        xl.readXYZTData(XValue, YValue, ZValue, Temperature);
      xver = (XValue);
      Serial.print("xver=");
        Serial.println(xver);
        if ((xver < -400 || xver >= 400) && (xver != 0 && xver != -1)) {
          Serial.println("sleeping for 35s...");
          delay(1000);
          System.sleep(D0, RISING, 35);
          state = XLTWO;
          break;
          }
     else {
          Serial.println("possible rogue collection detected");
            System.sleep(SLEEP_MODE_DEEP, 2);
          }
      }
  if (millis() - stateTime >= 8000) {
      if (xval1 != 0) {
            Serial.println("no collection detected");
          state = DEFINE;  
          break;
          }
     else {
          status = -3;
            Serial.println("xl Error");
          state = DEFINE;  
          break;
          }
 stateTime - millis();
 }
 break;

In which I exclude invalid measurements (i.e.0, -1, or extreme values) and look for X-values higher/lower than about 400/-400, as this would indicate that the sensor is getting tipped. It doesn’t quite seem to work yet though. Perhaps I need to change this and instead have the sensor output the X-values over a period of time and see if there’s any change to it, rather than go by a fixed value.

Personally, I blame the phenomenon where if the device enters Sleep mode while there’s still movements going on, the Accelerometer is unable to send the interrupt signal. I just tested this by rapidly moving a sensor around for a long period of time. After it went to sleep, it continued to move for a minute more, and didn’t wake up. Then I let it sit for 10 seconds, slightly moved it and it sent the interrupt.

From what I can tell my sensors may be experiencing this issue.After all, the pickup process starts off with the truck nudging the bin with its forks, which probably sets the sensor off, and then proceed to shake it around for about 40 seconds or so, after which it returns back on the ground. I can see how this could create issues.


#136

I see, then this type of sensor should work just fine after some fine tuning.

The sensor used in the Asset Tracker has some code that deals with the angle before going into sleep mode for the same reasons you’re talking about seeing with your chip.


#137

To be fair, stupid me. I should’ve known that the accelerometer needs calibration time. I think what happens is that the bin would be picked up by the truck, but it does not hit the angle threshold before the 8 seconds are up which forces the sensor to go back to sleep. However, the continuing movements must have prevented the accelerometer from re-calibrating, which meant that it essentially missed out on the entire pickup of the bin.

I’m thinking either upping the 8 seconds to something like 20-30 seconds, or not using a timer at all and simply going by (lack of) movement, surely must fix at least some of the issues


#138

Test, Test, Test :slight_smile: