Changes to mailbox notifier?

Started by Zeldatwili, July 08, 2014, 06:04:45 PM

Zeldatwili

Hi, so Im all very new to this and I've never done anything like this before, and I saw the mailbox notifier and I thought about it for a long time, and I was wondering if/how I can make these adjustments:
Make it so instead of the moteino sending packets every five seconds, only send a single packet when the mailbox is opened that contains the fact that the mailbox was opened, and the battery percentage.
Also do you think it would be possible to have the raspberry pi sleeping the most of the time, and have the moteino send a WOL packet (wake on LAN)?
I might have some other questions too, so thanks for your patience with the noob here!

Felix

Sure, you can only send when an open is detected. Just remove the code that sends periodically.
Sleeping the Pi is a whole different can of worms. I have no idea if you can do that and how. Since the Moteino is connected via serial, the Pi would need to sleep except the serial which would listen for a "WOL" on the serial line. But that sounds very weird. I doubt you can do that. Not sure why you'd want to do that since it's such low power anyway.

Zeldatwili

Hello again! I just got back from RadioShack with these parts: the battery connector, npn transistor, 10k resistors, and 2.2k resistors(will these work? They didn't have any 2k). Can you describe the other parts that I need more specifically? Also what moteino do I need?

Felix

You actually should not need the NPN. You just power the hall effect sensor directly from a pin. If you want a battery status reader then you need the additional battery monitor circuit composed of a 100K+47K 1% resistors and 0.1uF capacitor (see http://lowpowerlab.com/blog/2013/08/27/mailbox-notifier-project-upgrade/). Otherwise all you do is just power the hall effect sensor and read the sensor with a digital pin. You sleep the Moteino most of the time, except a few times a second (maybe just once a second is enough) when you power the sensor, read the status, then go back to sleep if nothing changed. The logic is all there in the mailbox notifier sketch: https://github.com/LowPowerLab/MailboxNotifier

You should be good to go with a Moteino+RFM69W or HW (choose 915mhz if you want shorter antenna, performance is about the same).

Zeldatwili

What about the power switch? We were looking at a bunch of different ones and he said that he needed more specific details about the power switch.

I also see you need an FTDI cable, and something connecting the moteino to the battery wires, what is that? And do I need to get the FTDI adapter? If so do I need to get the USB cable with it?

Felix

I think the photo in the linked article is very explicit.

Zeldatwili

Ok so the thing connecting the battery wires to the moteino must come with the moteino, I can just get the straight slide switch from your store, and I do need to get the FTDI adapter with the USB cable from your store if I'm going to connect it to a raspberry pi, correct? I can tell your patience is running out but just bear with me a little longer

Felix

Moteinos are programmed via FTDI adapter, except MoteinoUSB which has the FTDI chip onboard. You could connect a Moteino straight to the Pi's GPIO serial port via 2 wires (tx to rx and vice versa). There is a 9v battery connector in my webstore, also the slide switch and hall sensor. The rest is pretty simple, but you will need to source some magnets yourself.

Zeldatwili

#8
alright i will order those parts from your webstore. im definitely going to need your help later, but ill just create another thread when that time comes, which will be a while. ONE more question, do you think it would be possible to install some kind of camera module in the mailbox circuit that would take a picture when powered by the hall sensor and send it to the raspberry pi? you can lock/close this thread once you answer. Thanks for all your help in advance!

Felix

Possible? Yes
Feasible? No
:)
I thought about this too. It's just easier to have a wireless camera in the house facing the street and capturing motion.