Automatic Litter Box - Integration with database
Built the final Firebase proof of concept in PlatformIO with automatic authentication, Firestore storage, and cloud-based motor replay. The next step is migrating everything to the Arduino Uno R4 WiFi hardware platform
🚀 One More Piece of the Puzzle
I've finally reached another milestone in the proof of concept.
The biggest change this time isn't something you immediately see on the hardware—it's what's happening behind the scenes.
The project can now store recorded motor movements directly in Firebase instead of keeping everything in memory. That means a recorded sequence doesn't disappear every time the Arduino restarts. Once it's stored, it stays there until I decide to replace it.
That was something I wanted from the very beginning because it makes the project behave much more like the final system I'm working towards.
💾 Recording and Replay
The workflow is now pretty straightforward.
I record a movement using the joystick.
The Arduino stores every recorded step in Firestore.
Whenever I want to replay the movement, the Arduino simply downloads the sequence from the database and executes it again.
Instead of relying on RAM, the database has now become the source of truth.

🔐 Securing the Communication
Another thing I wanted in place before moving forward was proper authentication.
The Arduino now signs in using its own dedicated Firebase account before it reads or writes anything.
Combined with updated Firestore security rules, only that account can access the motor recordings.
It's still a proof of concept, but it's now following the same approach I would use in a real deployment.
⚙️ Still One PlatformIO Project
One thing I didn't want was multiple small projects solving different problems.
Everything still runs from the same PlatformIO project:
- Recording motor movements
- Firebase authentication
- Uploading recordings
- Downloading recordings
- Replaying stored sequences
Keeping everything together makes it much easier to continue building instead of maintaining several proof-of-concepts.

🔜 Next Stop: The Real Hardware
Now that the software side is doing exactly what I wanted, it's time to move over to the hardware that will become the actual project.
The next build will consist of:
- Arduino Uno R4 WiFi
- KY-023 Joystick
- OLED Display
- TB6600 Stepper Driver
- NEMA 23 Stepper Motor
The proof of concept has done its job.

Now it's time to see everything running on the hardware it was originally designed for.
I'm looking forward to that part much more than writing another line of backend code.

