Spark Powered Dropbox

Hi all,

Have been working on a new project which I thought I’d share in case anybody fancies building one too - or can offer advise on how to improve the design :slight_smile:

The problem statement… “Post man attempts to deliver parcel, I’m not home. Post man takes it miles away to depot… I lose benefit of free next day delivery!”

Solution = a battery powered delivery box which sits outside the house and is secured using a pass code written on the delivery label of the parcel. The delivery man can enter the code on the box, the box will unlock for 10 seconds, send me a notification using IFTT that the parcel has been delivered and re-lock.

The solution is itself not yet complete, although I’m pretty close to a fully working project. Here is what I have so far:

So in the video you can see that I’ve built a large housing for the core out of wood and covered the lid in roofing felt to keep it waterproofed.

You can see on the lid I’d installed a 3 x 4 keypad purchased from ebay.

In the box I’ve hooked up a 12v lock which is connected to a soldered circuit board containing the core.

I’ve powered the setup using 2 x 6V lead acid batteries connected in series & have added two connectors on the outside of the box which let me connect the box to the mains to open it if the batteries die.

I’ve broken open and old in car usb charging point and wired that into the circuit so that the core is powered via USB. These are designed to run at 12v so convert the power nicely for the core.

For the notification system, I linked IFTTT to the core so that it monitors the events to see when the box was unlocked or the incorrect code was entered. Every 15 mins IFTTT cycles and emails me to say that the event has occurred. It also logs the detail on a google docs spreadsheet so I have a history of when it was used.

I originally build the code on an arduino and ported it over. I’ve not yet mastered how to get a monitor read on the core so I find it more difficult to debug issues.

Here is some outstanding issues / enhancements:

  1. The power lasts for roughly a week on the batteries - constant on. - I’d like to change the core so that it sleeps over night, but I’m not yet sure how to do that.
  2. The batteries take a long time to charge. - Maybe it was a bad idea and could switch to another PSU, or maybe I could use a solar panel to top up in the day.
  3. Having one lock isn’t very secure - I think I’d like to add two more for the left & right hand side of the box
  4. When the power dies, something funny happens to the core. I’ve logged a post about a constant purple led light, which I’m currently working on. It’s inconvenient to have to take everything apart when you need to reset the core / there are issues. I’ll amend the design to give access quickly.
  5. Id like to add some digital scales to the bottom of the box and read the display into the core and have it log the result to IFTTT. I assume that it is possible to pull apart some digital scales and reverse read the signal that they output to the LCD - although I’m not sure how I’d go about that yet!
  6. It would be good to have a different code for each company you order from so that you know which parcel has arrived / which courier entered a code.

EDIT - Issue : “The code works fine on the arduino, and I thought it did on the core too originally, but for some reason the routine that handles the failure of entry after 4 digits isn’t working now. It is supposed to tell you that the wrong code was entered after 4 digits, but instead it just continues in a cycle and you have to reset. - Not sure if its an issue with the code!” now resolved in version 2 of the code below.

Here is the wiring diagram:

Very basic … sorry about that, I’ll do a proper one when I know that I’ve got it right!

Here is the code:

Git hub Code

Version 2 here:
Git hub Code V2

( Let me know if that doesn’t work - I’ve never used github before.)

Here are some other pictures / videos of the build process:



As you can see, close to working, but more to do … any input you guys have would be appreciated :slight_smile: - Also happy to answer questions if anybody needs some more detailed specs. Please be aware though, I’m not an expert on anything here - have just pulled together everything by reading and playing about!

Thanks

5 Likes

Hey @bedsingar, what a cool project! I have a couple of questions:

  1. Why not keep it plugged into mains all the time? Is located remote enough on your property that it’s troublesome to have it plugged in all the time?
  2. Do mail carriers really like having to enter some custom code to deliver the package? Seems like a lot of work for them. Have you considered an approach where the box is always unlocked until someone attempts to deliver mail, after the 1st delivery it locks and must be unlocked by you in the evening. I know that’s worked for others.
  3. What kind of lock do you have? Does it constantly require power to stay locked (does it fail unlocked) or does it just require power to unlock (fail locked)? If you had the fail locked version you could save a lot on power perhaps
2 Likes

Hi,

The box sits outside the property and I’m in a rented house so don’t really want to start installing sockets on the outside of the house.

I’m not sure about mail carriers not wanting to enter the code - I guess it is less effort than knocking at all the neighbor’s houses so shouldn’t be too bad as long as its kept simple. - I had thought about leaving it open but I often receive multiple parcels a day so that approach would mean that only one could be delivered .

It is a fail locked type of lock and so remains locked until the core triggers the relay.

Thanks

Final update for today … I’ve added wifi.off statements into the code so that when the core is not trying to write to the cloud it uses 0.02A rather than 0.08A with the wifi on. This should have a decent impact on the battery. What I did note though was that once this code is running … you can no longer connect to the core to flash it via wifi! - Doh!.. that’s enough for tonight.