Would this setup work?

Change to this:

pinMode(C2, OUTPUT);

Doesn’t work either. I’m getting very sporadic measurements in - sometimes waiting 10-20 seconds for my 59 measurements. When connected directly, it takes these measurements in just about 600ms.

Give me a picture of the regulator so I can see the wiring to the regulator better.

Also, give a link to that sensor.

I think you have it wired up wrong/not ideally when using the regulator.

There should be 4 wires going to the Ultrasonic sensor instead of 3.

Power, GND, Echo, Trigger lines should be going to the Ultrasonic Sensor.

You need a wire going from GND on the sensor to GND of the Electron or regulator, either GND point will work.

Yeah actually, the GND is missing on the ultrasonic. It was my understanding that I didn’t need to connect this one, as I previously had a different regulator where the ultrasonic would work just fine with the GND disconnected (in fact it stopped working as soon as I connected the GND)

Connecting GND on both makes it work now.

Yea GND is always required.

Without it, your sensor is trying to GND via the C4 & C5 pins probably which is why it lit up but didn’t work correctly.

Now when you want the 5v regulator to go to sleep you just pull that C2 pin LOW.

You may also want a small 1-3 second delay after turning the 5v regulator ON for the Ultrasonic Sensor to turn on before sending it any commands.

2 Likes

Another thing - I have sensors operating at 3.3V and 5.0V…are they allowed to be connected to the same GND pin on the Particle, or should they be on different ones?

@Vitesze, you should have all the grounds connected together creating a common voltage reference.

3 Likes

@Vitesze,

It should be the same GND on the Particle. That way the Particle sees the signals as being 3.3V or 5V above ground.

2 Likes

Thanks everyone :hugs:

I think everything works fine now, so I’m very eager to get a few more of these sensors made and test them in practice

1 Like

How are you using these sensors exactly?

Have you gotten the camera to send pictures to an FTP server yet?

I’m waiting for a lot of new materials to come in (e.g. electrical enclosures, PCBs, sensor components) so to be fair I’m not really do too much right now.

I’ll probably first test the original sensor before dealing with the cameras too much.

Is the whole camera to FTP server still kinda confusing for you?

I think the ability to get images back of the trash levels would beat out all the sensor options considering how inaccurate/confused they can be based on how the trash is laid in the can.

It’s not really confusing me - @ScruffR has been explaining things very well. It’s more to do with budgetary reasons and at this point not having the certainty yet it’s something my employer really wants to spend resources in ;D

Understood.

So you have the camera setup with the Electron and successfully transmitted images to an FTP server over the cellular network? Have you tried this on a trash bin yet?

Based on all the sensor setups you have tried what is working best?

My current setup involves two JSN-SR04T ultrasonic sensors - they don’t really got the best performance in comparison to other ultrasonic sensor, but it’s one of the few low-priced sensors around that is actually fully waterproof, which is a big deal on waste bins.

I will give the FTP Server a try in the coming days or next week - I agree it’s a really useful addition to monitoring waste, so I’m hoping to really get started on everything once I have my materials in for the current setup and have installed some on containers.

I'm also going to give this a go over the weekend and see how well this works. I have not had a chance to give it a try yet due to time constraints. It should be really easy with the ability to upload directly to an FTP server. I figured this was probably a little intimidating to you still, especially if it's your first time setting up and using an FTP server.

I'll try to make a screenshot video of how it works if possible.