T O P

  • By -

xebzbz

There's plenty of different options, but if you're a beginner, start with something simple, and then add new features.


veks9

Yeah, i agree with you. This will be a small business commercial solution so it has to be robust and secure as much as it can be.


xebzbz

How skilled are you for a commercial solution? From your original post, I have an impression you didn't work much in system engineering.


veks9

I am an iOS developer with some experience with raspberry pi and arduino. Friend of mine that is more skilled in this field advised to use esp32 for my problem. So yes, I am not very skilled but eager to learn. Also, I am trying to find some plug and play solutions for my problem, this is just an alternative approach. I would like to come up with my own solution and then compare the complexity and price vs. plug and play solution


xebzbz

There are many IoT vendors with attractive prices, so it may turn out to be too expensive to build your own. Also, GSM networks are dying out and are being replaced by LTE and 5g. For example, GSM is completely out of service in Switzerland.


veks9

Yes, I am looking into some solutions but they turn out to be too expensive unfortunately. I actually don't know how expensive it would be (only components) to create my own system for 15-20 locks Didn't know the fact about GSM, thank you for that.


xebzbz

You also need to think through the security: how do you make sure that the command to open the lock is coming from an authorized source? The esp32 is capable of many cryptographic functions, but it's still quite limited.


veks9

yes I was thinking the same, maybe this is far too complex to implement myself


xebzbz

I made this, but it's far from being trivial https://cc32d9.medium.com/secure-data-logging-in-iot-506fdc9251c8


Djbusty

I understand your question is about how to control many lockers with limited number of I/Os. The answer is looking into expanders as mentioned already. The true complexity of your system will depend on making it robust! If you ever plan to lock something valuable, designing it securely from the ground up will be your real (doable, yet not trivial) challenge. (Think root of trust, authentication, key provisioning, key management, etc)


veks9

yes, I agree. It has to be robust and secure. That is no easy task


strawberryreddy

Check out TI IO expander TCA9534. You can get an evaluation kit at Sparkfun too.


letsgotime

I would think something like a rasberry pi would make more sense. That way you could have a camera to do QR code reading and more easily integrate wi-fi.


JustinUser

Well, technically an esp is capable of doing camera and read qr codes... WiFi as well.


letsgotime

possible, maybe. ideal, no.


Pingyofdoom

So, 1 esp per lock is way better than 1 esp with a hacky fit system. The term multiplexer can help with the problem you're having electrically. I think you can get it down to where you just need as many pins as the amount of units you need plus the amount of pins one requires and power, maybe less with frequency selection, but the thing you'd buy to do this would be way more complex and expensive than an individually addressable esp8266. Sounds like you might be more inclined on the coding side, carpe that diem, a cloud based rest api connecting to x locks is more cool than a switched one. Do something cool.


MissTortoise

The issue with this is going to be that if you're putting them all on WiFi you'll end up saturating the WiFi with multiple endpoints if there's lots of lockers. If I was doing this I wouldn't use an ESP, I'd go for a cheap, simple MCU per device without networking. If there as a need for interconnectivity, use a CAN bus or something similar.


soubitos

Is this a private project for fan or a commercial application? Either case, since and if WiFi is not available and GSM is the way to go for wireless communication then an ESP32 might not be a great idea.. there are plenty of other MCU out there to use for the control part of the project, power management is very important too


paul_kertscher

Could you explain *why* ESP32 is not a great idea? You assert that it is the case, but don’t really give any reason for that. There are even dev boards that already incorporate an GSM-Modem and SIM card holder. Furthermore I don’t see why power management should be very important here. OP did not state that it has to run on battery and I don’t believe similar locker systems do.


soubitos

Many of these lockers are installed in remote locations to begin with.. power management is perhaps even critical for their normal operation in a commercial environment.. nobody wants unhappy customers! You might want a simple backup battery/UPS or could run on solar power to begin with.. and you wouldnt like customers going to the locker only to find it out of order... IF you are going to have a GSM/NBIoT module (many of which can be programmed to operate on their own without another MCU) AND you are not going to need WiFi/BLE then, ESP32 has strong competition for both power consumption, available GPIO, cost from a range of MCU inlcuding for example and only RP2040/STM32xxxxxx Dev-boards are exactly that.. development boards.. they are not supposed to be on an end product although often they are but they usually have too many issues when it comes to a real life commercial enviroment and installation.. power managent being one.. It depends of course on the complexity of the end product you want to build...


paul_kertscher

Thanks for the explanation.


veks9

This should be a commercial app, indoor, only secure locations (shopping mall, business center). I think power management will not be a problem and battery will not be used


marchingbandd

You could consider NFC, there is a significant challenge in security in this, and NFC can help connect a person to a code with the presence of a device, leveraging its native identity capabilities.


erlendse

Using shift registers, you can connect close to unlimited locks to one. You would need drivers etc. for the locks too. You may be able to drive the locks directly using mosfets, with no need for relays. But you could check out their wifi LR mode, may have the needed range to have a access-point somewhere with internet access. It's slow, but goes far (1 km?).


Pingyofdoom

How's a shift register help here?