Detecting presence of Trash Can (visual? / distance? / other?)

This is exactly what I used. You may have to figure out a good way to get a "straight on" reading on the can. It might be iffy if it's taken from the perspective of the photo, but worth a try. You sounds like you're experienced enough to figure out the wiring, logic, and programming. As for me...

2 Likes

You might want to look at Danโ€™s library.

1 Like

I can give you the diagram, software, Hub driver and Zigbee interface if you want it.
All based on the HC-SR04


3 Likes

Absolutely would take you up on that. No rush.

Yea, was holding the camera in the air to get a picture of both cans. But the detection can be done straight on about mid-can level. Bonus with doing the ultrasonic, if I park the trash can to the left side -- then I can detect all three scenarios -- no cans (max distance detected), one can (a few feet away) and two cans (a few inches away) [if the trash can is down, it can be assumed the recycle is as well]

Am a network engineer by day, and can hack my way around some programming and basic electronics -- generally plagiarizing as much as I can due to laziness and/or honoring giants that came before me.

1 Like

For an IR sensor it would depend on the sensor and the cans would not have to be in any special place, just in front of the sensor and not too far away. The ultrasonic method mentioned is very similar and is probably a step up in flexibility.

1 Like

I used:

Hardware:

  1. HC-SR04
  2. Arduino Pro mini (8Mhz 3.3V)
  3. CC2530 based *** Zigbee radio and repeater

*** I made a carrier board with a 5V to 3.3V regulator (all the circuits run on 3.3V. If you get that far I think I have a extra blank board I can send your. This is a custom board I designed myself.

Software:

  1. Arduino Pro Mini custom program (I can provide)
  2. CC2530 firmware (MonaLisa) (I can provide)
  3. Hubitat Driver custom ( I can provide)

Everything is pretty straight forward except perhaps the CC2530 programming. Not really a difficult you just need a ESP32 board. I could program one for you if you wish. You would just have to send me the board.

Basic wiring

If you want to stay with the Hubduino instead of Zigbee I can send you my Arduino code which can be easily adapted to a ESP WiFi board.

John

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.