Help with Hackster project

I posted a project called "Door Closing Robot" on Hackster a few weeks ago and have had very positive feedback. It's based on the Photon 2 development board.

In fact, a friend suggested it would be a good product for people who are mobility challenged (my friend is wheelchair bound). So I entered it into the Build2Gether contest on Hackster and it has been accepted! Now, I have some challenges to solve to improve the robot and I need some help.

  1. Power Supply - I need to figure out how to power the robot so users don’t have to change batteries every few days or weeks. The original prototype used 4-AA batteries for the motors. Those should last a long time since the robot will only run once in a while and for only a few seconds each time. But the prototype also uses a lithium battery to power the MCU. That one would run out of charge in a day or two. I need to provide a power supply to both the MCU and the motors that can either be recharged “in place” or easily swapped out.

  2. Position Sensing - The robot should “know” when the door is completely open or closed. I just put a timer in the prototype that worked for my specific door. The motors run for n seconds and then stop. That won’t work in the real world. I’ll have to add some sensors so it can detect those states and stop the motors. One colleague suggested current sensing.

  3. Trigger Methods - The prototype is activated by a webhook, which can be triggered by an app or other API (like Zoom or Alexa). But should I add a bluetooth trigger so it could be activated without an internet connection? Should there be other triggering methods?

I would greatly appreciate any help or feedback anyone in the community can offer. This is a fun project, but also has a noble purpose. So, I want to do the best job I can!


#1 and #2 are tricky so I'll defer on that for now.

#3 BLE API can be really handy, but there are a few caveats. While the Particle device code using the BLE API isn't very complicated, there are other things that add difficulty:

If you only need to be nearby and don't need BLE authentication that of course is much simpler.

Presumably you want to control it from a mobile device. This is much easier on Android where you can use Web BLE and a simple web app instead of a native app. On iOS, the major browsers like Safari and Chrome don't support Web BLE so you need to use a native app. You could use a cross-platform tool like React Native to make it easier to make both Android and iOS native apps.

Thank you for your input!

Hey Mike,

Here are my thoughts.

Trigger methods:

One could speak to the Photon 2 to open or close the door.
Check this presentation from Jan Jonboom at the spectra 2023 recordings:


Position Sensing

I’m curious if it's possible to sense the current of the motors to determine their status, similar to how car windows operate. In those systems, when the window reaches the fully open or closed position, the current increases, signaling the motor to stop. This current change can be detected by the microcontroller (MCU) to control the motor, perhaps.

Best of luck in your project!

Another option to consider: I tried attaching an IMU (a Bosch BNO055) to a door. That's a 9-DOF IMU and can return absolute orientation in degrees, and it's pretty accurate. It can certainly tell if a swinging door is open or closed. You could tell if the motor is on but the door is not moving, either because it reached its limit, or it was blocked.

Though I also like the current detection idea, which may be better.