David Gomez6 said:Look, I’m totally aware of the trade-offs here... honestly, it feels like I should just build both versions and let the user decide which system they actually want. Besides, I’d probably have to prototype both anyway just to see how much juice they're actually pulling. Now that I've crunched the numbers, I realized an 80uA draw isn't even that big of a deal—I can definitely live with that!
Look, I'm not saying I'm gonna dive headfirst into this right this second... I'm just weighing my options, you know? Everything hinges on this because it dictates which direction I actually take with the whole project. I was just curious if I can actually bank on this being a solid choice, or if it’s one of those things that’s better off just scrapped entirely.
Yeah, exactly... that's how I tackle every single project. First, I map out the whole plan, break everything down into simple little steps, and then just knock them out one by one. No point trying to cram everything into my brain at once! 🙂
The heavy lifting—the actual thinking part—is mostly just staring at a blank sheet of paper. Once that’s done? It's all downhill from there. You just knock out the tasks one by one without having to stress your brain too much. 🙂
Looking at that list above, honestly? I feel like I’ve already cracked the code on a good chunk of it. I've pretty much got a solid plan for most of those.
I mean, honestly? I’m expecting this to be a total breeze since we're working with an ESP32 that's already got built-in memory. It should be a walk in the park!
3./4. Honestly, once I get this ESP32 fired up, I’m gonna have a blast messing around with the timing settings!
5. / 7.
Handling user authorization once I’ve grabbed that tag ID should be a breeze... honestly, not a huge deal. But what's actually tripping me up is the whole RFID authentication side of things. Like, how do I stop some random person from just scanning the card, ripping the data, and then making their own fake clone? Ugh, man... 🤔
Man, I almost totally blew this one! I was sitting here thinking the ESP32 would just keep track of the time while it’s in sleep mode, like, "no problem, right?" But then it hit me—I completely forgot to account for what happens when the battery dies. If that power drops out, the whole clock just resets itself. Total rookie mistake! 🙂 Alright... looks like I need to hunt down another component that comes with its own clock battery.
It falls under section 2... when I actually try to access the memory... honestly, it’s just an entry insertion.
I haven't really sat down to think about this one... but hey, once I get the Bluetooth communication up and running, it shouldn't be a huge headache to whip up a mobile app that lets me reconfigure all the settings on the fly. And honestly? As much as I'd love to say I could push full code updates over a wireless connection, I don't think I actually need to go there. Unless it turns out to be super easy—because man, if it's not too complex, why not just go for it? Why not have that power? 🙂
I'll probably just Google how that sleep/wake stuff works on the 10th or 11th.
Is there any actual reason not to bake this into the plan? Honestly, I’m just trying to get a ballpark idea of how much of a difference it'll make for the battery life—or if it’s gonna backfire and cause some other headache for us.
So, hey, if you could please give me a little hint on which direction I should be heading with this one:
Just keeping it brief.
Look, let me clear something up right now because people mix this up all the time: authentication is NOT the same thing as authorization. Seriously.
Authentication is basically just identifying who someone is, and honestly, it needs to be done securely if you actually care about your setup. Take RFID, for example. If you're just running a basic reader, anyone could walk up and wave some random compatible tag—say, a standard 125kHz one—right in front of it. Your reader would just go, "Yep, that's a tag!" and instantly save that ID to the disk. And let me tell you, that is a terrible way to do things. You can't just leave the door open like that! There has to be some kind of restriction on which specific RFID tag gets through and how it proves its identity. In other words, you need a protocol.
Once that ID is properly authenticated, someone’s gotta step up and decide if that person actually has the green light to, say, walk through the door. That whole part of the process? That’s what we call authorization.
It works just the same for your Wi-Fi or Bluetooth, logging into your Windows setup, or even just hitting up the forum login.
b) "sleep mode"
It’s basically like putting parts of your computer into deep sleep. You take all that data or current state from different components and stash it away in permanent storage—think CMOS battery, flash memory, or even a hard drive—so when everything wakes back up, it can just reload everything exactly where it left off. Otherwise, everything is just gone. Poof. When we're talking processors, we're looking at register contents; for memory, it's the stuff sitting in RAM. Then you’ve got a whole mountain of other components like UART, PIC, DMA, and MMU, which on an Arduino are usually just baked right into the same chip anyway. Peripherals are where things get a little tricky, though. It really comes down to how they actually talk to the processor—whether they're using I/O or memory mapping—and how they flag the CPU to say, "Hey, I've got data for you!" That's where the PIC (interrupt controller) comes in, letting the processor jump straight over to the specific routine needed to handle that peripheral's data.
c) solar battery charging
That can happen, but we gotta nail everything else first—especially sleep mode. That’s basically its own separate beast entirely.
d)
David Gomez6
how do I use the Arduino digital outputs to switch an element ON or OFF, like an RFID reader? Like, if I want to programmatically cut power to the RFID reader, I could do it the primitive way with a switch controlled by a servo motor. (Just being descriptive here, I'm guessing that's not how people actually do it, haha) ... what are my actual options?
I have a feeling I should be using a transistor for that, where a little voltage on the third "pin" decides if it conducts or not? Does that make sense... or is there a better way to handle this? There probably are ready-made relays for Arduino meant for this kind of thing, right?
I don't know all the gritty details, but it boils down to this: "someone" (the processor, aka the code) tracks time (ticks) for so-called "idle time" (when nothing is happening), and then at a specific predefined moment, it sends a command (a bit or a byte) to a specific IO port or memory location. That's tied to a relay or a transistor that controls the power for a device—which could even include the board itself.
d1) First off, how does the processor even know nothing is happening if it's running constantly? I mean, it has to stay active to monitor things, right? So you basically need a sub-routine that "does nothing" except check if something else *is* happening.
d2) Second issue: where and how do you stash all the necessary data when the processor goes to sleep, especially since it's spread across different parts of the computer?
d3) Third question is how to actually shut down a specific device. I don't know the specifics, but I think something was mentioned in that link I sent you about Arduino sleep modes, so let me go dig that up.
d4) Fourth question: how does an external event trigger the Arduino to "wake up."
d5) Fifth question: how do you pull that saved data from step (d2) back so the computer can pick up right where it left off? And honestly, do you even *need* to resume, or can it just reboot from scratch? For the kind of device we're talking about, starting fresh might be enough. Since this device is essentially "memoryless," it makes things way easier.
It's pretty obvious that "sleeping" isn't exactly trivial.