funny how this has been a long standing challenging project for most hobbyist / makers, with you being such a prominent figure to this day looking to perfect the mailbox notifier.
Thank you for this complete end-to-end multi-device system, with comments and verbal "links" to tangential topics like microscopes, battery selection, HA/Mqtt, PCB sourcing, and sample sets of parts. It's easy to get stuck on any one of these topics.
This such a great project. Beyond all the excellent tips and techniques linked into this project, it helps secure the existence of future projects through repeated testing ... with new parts orders delivered to the mailbox. ⚡♥♻
I use a great battery for my projects. It is a Saft LS 14500, LiSOCl2 technology and is 3.6V, AA battery type. This has a fantastic capacity and is capable of running 3.3v circuits, I have circuits, using this battery with MPU sleep that have been running for over 2 years and still going! Definately recommended.
A tip: primary Lithium 1.5V AA batteries are great for these kind of outdoor applications as they have a large capacity, extremely low self discharge (10 years shelf life), high current capability and continue working in deep freeze temps. A bit more expensive though.
Einfach genau das wonach ich suche! Ich habe mir mehrere Sensoren gekauft (begonnen mit Zigbee, über WiFi), aber alle hatten eine zu niedrige Reichweite im Neubau bei mir also kam ich auf LoraWAN und habe mir einen Tür- Fensterkontakt bestellt und jetzt genau heute kommt das Video :D.
Many thanks for your ongoing series of DIY projects and tips ! Always interesting and useful. Cool that LORA gets far enough to be used in this application (not intuitive !). As Im more software inclined I think I'd rather code my own tight loop for polling and processing the events from the mailbox rather than be dependent on MQTT and internet. Im in a rural environment so perhaps an external antenna and solar recharging would be better also. Perhaps the 'enclosed LORA antenna' approach would work well for onboard diagnostics in larger systems also.
Thank you! If everything is in your posession, you can add solar and an external antenna (I do not own the mailbox). Which would remove a lot of constraints I had for my antenna. But your distances are probably bigger ;-)
Great video. I ditched node-red for homeassistant automations. Node-red disconnected sometimes from homeassistant and needed to be reset. Homeassistant automations have come a long way, it is has become easier than node-red for complex automations. Above all, it is rock stable for mission critical automations.
So far, Node Red is very stable. As said, I move in the direction of HA automations. Still, the possibilities and particularly debugging is much easier in Node-Red. I would have to do a lot of YAML, and I do not like it.
Awesome video. I also swapped back to regular batteries instead of rechargeable ones, depending on the project. Usually I prefer the so called C cell aka R14. Really cheap and safe. Install it, forget about it. Sometimes it lasts for years! And of course... silicone wires ! They're the best!
Thank you! The notifier runs perfect with an ATTiny412 too! I only shorted M0 and M1 of the E32 and use only 1 output of the ATTiny. #define SWITCH_OPENING A3 //PA3 = Pin 7 #define SWITCH_DOOR A0 //PA0 = Pin 6 #define M01 A2 //PA2 = Pin 5 #define AUX A1 //PA1 = Pin 4 // TXD = A6 = Pin 2 // RXD = A7 = Pin 3 Greetings Jürgen
Great project thankyou for sharing. Built and installed today. I had to modify a bit as I only have one door on the mailbox and I added a battery voltage monitor mqtt to home assistant as well. (it only powers on when door is opened to save power).
I built a yard gate notifier using an ESP32, Home Assistant and (2) inexpensive garden solar lights, and rechargeable batteries. Has been working for a few years not with no issues. The yard lights have a voltage regulator included in the assembly. You could remove the solar panel and mount it on the mail box. Just a thought
Good solution, too. I did not use solar because the mailbox does not belong to me and I did not want to make holes, and I also did not want that something stands out. Like that, everything is hidden and locked...
Great video! Ive been wanting to get into PCD design but always stuck to soldering through hole with a nest of spagetti wires all over the PCB. It takes forever and is not much fun. Ill make sure to learn it for my current project.
I am trying to do the same but the upfront time investment needed to learn how to design them correctly is quite significant. One question about this, please: how do you create the Vcc and ground planes? Do you start with a solid copper fill covering each side of the PCB and sort of "carve" the gaps around the tracks as you route them (especially on the Vcc plane), or you only fill them after all the tracks are routed? I'm trying to figure out a good workflow for this. Thanks! (and yes, 1206 here as well thanks to age 😀 )
@@dan-nutu , there are a lot of tutorials on the Internet. You start with the ground plane (layer) and the supply voltage layer, then place the components, then connect the components.
I also like silicone sleeved wires - their fleibility makes them easy to stuff into small spaces. However, crimp connections tend to be weak because of silicone's slippery qualities.
With Attiny for simplicity I do the same, but with cylindrical Li-ion batteries, AAA or AA size. They go from 4.1V to 3.0V, don't need any regulator, are cheap and you can just replace it in the device by a re-charged one. The holders are also the same. For simple projects, just one AAA size battery last more than one year. The leakage is also very low. The new Attiny MCU's by the way are very simple and a lot of fun to program, even bare metal. And just with one wire + one TX wire, I can flash and debug at the same time.
@@AndreasSpiess I use normal batteries 10440 (AAA) about 12€ a pack of four, and 14500 (AA) 5€/6€ each. Or the bigger ones (18650)... Then a USB separated charger that is also cheap, about 12€. I have a 'IMREN K2', compatible with all the Li-ion cylindrical sizes, even the big ones. In Aliexpress just pay attention to the batteries too cheap or with 'amazing' capacities, in chini-amps hour.
@@AndreasSpiess And of course these chargers are not compatible with the normal 1.2V NiMH batteries. And being the same size could be dangerous, unless the charger detects it. And also dangerous for a device expecting 1.2V or 1.5V batteries. Better label this batteries clearly, and the holders.
A prev comment has been removed. I use normal 10440 (AAA, about 3€ each), 14500 (AA about 5€) or the bigger like 18650. And a USB charger of about 10€, compatible with all cylindrical Li-ion batteries. In the usual places, just be careful with batteries too cheap or with amazing capacities, in chini-amps hour.
I hate the smell of some dupond wires, silicon will be welcome! The lora ntenna inside the metal mailbox is not a problem ? (A link to the previous video about it in the description would be welcome 😉)
Hi. Another great video. maybe one thing you could have added : a voltage divider to measure the battery voltage. Another thing on your design : I think there is a bit of current leaking from the opening / closing pin (from VCC to GND through 4.7kOhm resistor isn't it?
A voltage divider for measuring the voltage using a pin consumes (leakage) current all the time unless you add a transistor to switch it off. And the leakage current through the 4.7k resistor is very small because it has to go through a pin of the MCU which has a high resistance when sleeping.
Really great watching your journey for this project in one video, very informative and inspiring. One question, is your mailbox metal? If so how well does the LoRa signal travel through it?
Thank you very much! Very interesting solution but complex due to the long distance to the letterbox. Luckily the distance to my letterbox is in range of cheap 433MHz sensors's capability. So I can use RFlink connected to my ioBroker. Powered by 1 AAA. Having no 3D printer, one reed contact is covered by a conduit and the other by an empty toothpaste tube (elmex, swiss GABA 🙂 ).
You are very creative with your packaging! I am sure, when you will get your 3D printer one day, you will be thinking: Why so late ;-) But, unfortunately, GABA was sold in 2004 to Colgate :-(
@@AndreasSpiess The toothpaste tube is made of plastics, isolating, water resistant enough and thin. I am not sure, if a 3D printer could produce a housing with such properties. At least not to such a price point :-)
Great video! Many details and info on different aspects in one place. But, where can I find schematics for the gateway? Don't see it in the 493 video...
Correction - the better DuPont wires actually copper inside, not just more. The cheap ones aluminum or chinesium if you ask me. Any breadboard problem I ever had, was related to cheap DuPont wires !!
I am not sure if the reduced resistance of copper matters on these small distances. Or why do you prefer copper? But the quality of the crimp definitively matters. I also think, that thicker wires do not break easy.
My version is based on the latching transistor idea you made a few years ago just using wifi. I'm currently powering using 3 eneloop cells into the 3v for the low self discharge, the only issue I have is remembering to charge the cells, any thoughts of measuring cell voltage when powered this way? - Something like the secret arduino voltmeter but running on esp. My box is lined with thick polystyrene in an attempt to retain capacity in winter. Thanks for the great videos.
This time I had to choose another way because I had two switches. In your case, you can add a voltage divider and measure the battery voltage with one pin. In my case, it would drain the battery and I would have to add a transistor to switch the two resistors off during sleep.
Congrats for all your stimulating projets! I have 2 questions. Q1: Do you get below freezing temperatures during winter? If so, would the device be affected? Q2: Our mailbox is all metal, would'nt it be acting as a Faraday cage et prevent the signal to go out? Thanks!
What is the expected range of a device like this? Was it mentioned how far away Andreas’ box is? My mailbox is about 150m from the house and been thinking of making something like this for years. Great video!
@ Thanks for your reply! I have the possibility to place the antenna outside. I have no previous experience of LoRa. I have understood that LoRA can achieve long transmission ranges, but was unsure if there are any specific limitations for this use case, in addition to the metal box. I’ll test, and find out some day. Thanks for your very educational videos! I just found your channel and have now been watching for hours. And I of course subscribed.
Two AA batteries from Lidl? When they go flat you need to replace ASAP before they vomit their electrolyte, almost as bad as Duracells. Now if I could figure out how to use my Optivisor magnifiers now that I have had cataract surgery, arrrg agrivating, even worse my left hand has developed a bit of a shake. What a curse and I love working on repairing commercial radios and electronic projects! Thanks for this video and I need to look into home assistant, would make life simpler in the home but I have no plans on linking to the open internet.
I have one question here, what i believe about LoRa it needs line of sight to transmit, in case we have some obstract it could not communicate, in this scenario when LoRa sender is installed in a metal box, at some ramdon direction how come it can send signal to gateway ?
can you share you PCB design that we can order the same plank PCBS ( it will be great if they populate with components ) / if we decide to build this concept for our home mailbox ?
I love this project as it is exactly what I am looking for. I would just need to water proof the transmitter box a bit more but otherwise - ideal. Problem is between getting all the components and soldering onto custom PCB I would never be able to finish it myself. Is there anything like this that can be purchased already made that can be integrated into home automation?
Don't be that pessimistic. I went from "No idea how all of that works" to a custom made PCB in 6 weeks while having a full time job. If you are lacking the knowledge, there are a lot of people who can help and a lot of easy to follow tutorials. Beginning with a simple Arduino or ESP dev board and a breadboard is a good start. If you are lacking the equipment for soldering or 3D printing a case, there may be a makerspace not far from you.
Thanks for answering and being honest. A more detailed description could be a link to a document. But I have to say goodbye from being a long time Patron supporter. Thanks for all your tutorials in the past. If I want entertainment videos, I will go otherwise. Sure there will be an audience for your videos.😊
So many things I have never even heard of.. Node-Red/HomeAssistantIo , EasyEda, Reamer, etc! Then there's things that seem to be specific to the application / availability and rules in your area. For example, the choice of low-power, long-range wireless standard... LoRaWAN/LR-FHSS, Zigbee/Z-Wave, Mioty, Thread/Matter, Sigfox / HayStack / X10 , ANT/+, etc. If you were a contractor doing this project for a customer, how many engineering hours do you estimate it took? BTW, what PCB house did you use? Something local in Sweden, or something oversees (OshPark, JLCPCB, PcbWay, MacroFab, SeeedStudio Fusion)?
Hello, How are you using your magnetic switches? As i know, magnetic switches are normaly closed. So everytime current flows to the pullups and the switches. !? In your video you are using momentary switches with with NO.... Another question: in youre code are input pullups are set: pinMode(SWITCH_OPENING, INPUT_PULLUP); pinMode(SWITCH_DOOR, INPUT_PULLUP); Are the physical 4.7k Pullups needet? Why 4.7k and no higher resistors? greetings Jürgen
Yes, I use magnetic switches. NO and NC is not always defined the same way because with these switches, "normal" is not standardized. So I only bought ones where the seller described the behavior in his own words ;-) These resistors, in conjunction with the capacitors, should supress switch bouncing.
Tried building something similar with off the shelf lora/meshtastic devices, but failed miserably due to battery limitations. Any way to convince you to sell a semi-built notifier ? Any signal concerns inside a standard Swiss milchkasten ?
Because it was no more reliable. The TTN sensor worked for years, but since a few month, no more reliably. I did not investigate the reason, I just wanted a simpler system.
Nice work. Suppose you’re not going to share the gerber and bom of that pcb ? 😋 you could always upload that to pcbway so that lazy people can order directly and you get a % from that , just saying 😊
Excellent work as always. Congratulations on this new printer (it is on my wishlist). Did you explain the notifier's purpose to the mail delivery person?
@@AndreasSpiess , many years ago, German companies provided components and gadgets (in central Europe and beyond). China exported rice. It's amazing what happened.
@@Suchtzocker yes. Settings>companienapp>sounds, wich sound to play you can choose in the service. Hope this is still correct, last time i nudged around that is yrs ago.
Heh, it's just that I like it more when you say "you can always sit in the front row", than when you say "you can always sit in the first row". It's just linguistic pedantry. Blame my autism. But I have noticed that you've sometimes started saying "front row", which I like :-)
Hallo Andreas, seit Jahren schaue ich mir deine Videos an und möchte erst einmal Danke sagen. Bei meinem Auto wollte ich schon lange eine "Präsenzmeldung" via BLE/ESP32/iPhone entwickeln um den Zündschlüssel zu ersetzen. Ich habe dann endlich eine Lösung gefunden die sehr simpel und robust ist und keine Software auf dem iPhone benötigt. Melde dich wenn du Interesse daran hast.
I really don't get the point of MQTT in all these projects. Just another unnecessary software component that is a headache to maintain and configure. HomeAssistant and ESPhome have a perfect direct integration with each other and the HomeAssistant native API is all that you really need. The mailbox notifier project idea is quite cool though, I might try it.
@@basileus9343 I think you misunderstand me, the ESP will still be the gateway for the LoRa communication with the attiny. It's the communication between ESP - HomeAssistant that will not use MQTT but they normal HA API.
@@AndreasSpiess No unfortunately it doesn't support LoRa modules directly, but you can easily alleviate this with a lambda piece of code under the UART sensor of ESPhome (that's my guess though, haven't tried it for LoRa modules).
I am not a fan of Internet cloud based brokers and related garbage. There are plenty of other stand alone options that I am in total control of and can trust. For such a simple application this has too many layers of complexity, such as node-red.
Who owns the mailbox? Here in Canada, if you put something like this into your mailbox, you could be fined, and the device would be removed and destroyed. The mailboxes in Canada are the property of the government owned postal service and they don't like their customers messing about with them. 🙁😖
You mean the mailbox that is on your property where your mail gets delivered to? Don't you buy these yourselves? In Germany and I also think in Switzerland, this is a mailbox that you buy and mount either directly on your house or near to the street, there mostly attached to a fence like object. You chose the design and size and as long as the mailman can find it and put your mail in it they don't care what it is. Some even put USA style mailboxes out on a post.
@@drstefankrank Nope. If you live in an urban area of Canada the post office no longer delivers to your home. They deliver to a set of mailboxes they have installed at key locations, usually within 100 meters of your home. As a home owner I don't buy a box from them, they are just provided by Canada Post. Thus to get your mail you are given a key to your box and you have to follow their rules, which does not allow the installation of electronic devices. I still have a mailbox attached to the wall about 2 feet away from my front door, but I've only ever received 1 very small package from Amazon in that box in the past 20 years.
@@mcconkeyb Ah ok, Canada is much bigger and less densely populated, so that system seems to works for you. Spares the post office a lot of travel time for just a letter. This isn't the case here. I'm not aware that we have a system like that anywhere. I could only think of some single houses up on the alps who could have their mailbox down near the next village.
The home owner has to provide one, but the place is defined by the postal service. Where I live, many boxes are in one place and they are owned by the company that runs this place. That is why I did not want to make a hole for the antenna.
funny how this has been a long standing challenging project for most hobbyist / makers, with you being such a prominent figure to this day looking to perfect the mailbox notifier.
Indeed, mail comes every day and therefore we are reminded every day if it does not work ;-)
Your methodical layout, and using 1206 components makes this a winner! 👍
Thanks for your kind words!
Using orange wires for clock signals is brilliant!
:-)
Thank you for this complete end-to-end multi-device system, with comments and verbal "links" to tangential topics like microscopes, battery selection, HA/Mqtt, PCB sourcing, and sample sets of parts. It's easy to get stuck on any one of these topics.
That is what makes such a project so interesting!
"Here is the guy with the Swiss accent" makes me laugh every time.
:-)
But the best sections are: the suggestion for the Christmas present and the reason for testing the mail-in function. ;-)
For me this accent sounds very positive\cheerful. And yes, great video as always
Very good points today for any general purpose projects.Thanks Andreas!
My pleasure!
This such a great project. Beyond all the excellent tips and techniques linked into this project, it helps secure the existence of future projects through repeated testing ... with new parts orders delivered to the mailbox. ⚡♥♻
That's what makes it so enjoyable!
Very cool, time to make my first LoRA device 👍
Go for it!
I use a great battery for my projects. It is a Saft LS 14500, LiSOCl2 technology and is 3.6V, AA battery type. This has a fantastic capacity and is capable of running 3.3v circuits, I have circuits, using this battery with MPU sleep that have been running for over 2 years and still going! Definately recommended.
Indeed, this is a good technology. Maybe a bit expensive for everyday usage...
A tip: primary Lithium 1.5V AA batteries are great for these kind of outdoor applications as they have a large capacity, extremely low self discharge (10 years shelf life), high current capability and continue working in deep freeze temps. A bit more expensive though.
In my experience they never have the same capacity, that is the ones that include a voltage regulator and charger in the battery case
You are right! And the Best: I have plenty of Them free of charge from my found Weather Ballons 😀
That must be a very crunchy polenta! 😀 (yes, it's clear you meant to write "plenty of them", but I read this and wondered what were you talking about)
Haha, I was wondering the same! I still cook polenta. Everybody loves it, a delicious dish that I inherited from my Italian ancestors.
Wonderful auto-correction ;-)
Einfach genau das wonach ich suche! Ich habe mir mehrere Sensoren gekauft (begonnen mit Zigbee, über WiFi), aber alle hatten eine zu niedrige Reichweite im Neubau bei mir also kam ich auf LoraWAN und habe mir einen Tür- Fensterkontakt bestellt und jetzt genau heute kommt das Video :D.
Dann ran an das Projekt ;-)
Thank you for the video Andreas !!
My pleasure!
i love the silicon wire. been using it for a while now.
Thanks for sharing your experience!
Many thanks for your ongoing series of DIY projects and tips ! Always interesting and useful. Cool that LORA gets far enough to be used in this application (not intuitive !). As Im more software inclined I think I'd rather code my own tight loop for polling and processing the events from the mailbox rather than be dependent on MQTT and internet. Im in a rural environment so perhaps an external antenna and solar recharging would be better also. Perhaps the 'enclosed LORA antenna' approach would work well for onboard diagnostics in larger systems also.
Thank you! If everything is in your posession, you can add solar and an external antenna (I do not own the mailbox). Which would remove a lot of constraints I had for my antenna. But your distances are probably bigger ;-)
Excellent video !! Bravo
Glad you liked it!
Great video! And really useful tips :) thank you!
Glad it was helpful!
Great video. I ditched node-red for homeassistant automations. Node-red disconnected sometimes from homeassistant and needed to be reset. Homeassistant automations have come a long way, it is has become easier than node-red for complex automations. Above all, it is rock stable for mission critical automations.
So far, Node Red is very stable. As said, I move in the direction of HA automations. Still, the possibilities and particularly debugging is much easier in Node-Red. I would have to do a lot of YAML, and I do not like it.
@@AndreasSpiess they are moving away from YAML in the current releases. You can do almost everything from the UI now.
Awesome video. I also swapped back to regular batteries instead of rechargeable ones, depending on the project. Usually I prefer the so called C cell aka R14. Really cheap and safe. Install it, forget about it. Sometimes it lasts for years! And of course... silicone wires ! They're the best!
The R14 seem to be a bit bigger. Because I have many other devices using AA batteries, I always have a stock in my drawer ;-)
Thank you!
The notifier runs perfect with an ATTiny412 too!
I only shorted M0 and M1 of the E32 and use only 1 output of the ATTiny.
#define SWITCH_OPENING A3 //PA3 = Pin 7
#define SWITCH_DOOR A0 //PA0 = Pin 6
#define M01 A2 //PA2 = Pin 5
#define AUX A1 //PA1 = Pin 4
// TXD = A6 = Pin 2
// RXD = A7 = Pin 3
Greetings
Jürgen
Indeed a good idea! No distinction is needed for this project.
Great project thankyou for sharing. Built and installed today. I had to modify a bit as I only have one door on the mailbox and I added a battery voltage monitor mqtt to home assistant as well. (it only powers on when door is opened to save power).
Congratulations! With only one switch you could switch the power with the reed switch. Then it would last even longer...
I built a yard gate notifier using an ESP32, Home Assistant and (2) inexpensive garden solar lights, and rechargeable batteries. Has been working for a few years not with no issues. The yard lights have a voltage regulator included in the assembly. You could remove the solar panel and mount it on the mail box. Just a thought
Good solution, too. I did not use solar because the mailbox does not belong to me and I did not want to make holes, and I also did not want that something stands out. Like that, everything is hidden and locked...
Great video! Ive been wanting to get into PCD design but always stuck to soldering through hole with a nest of spagetti wires all over the PCB. It takes forever and is not much fun. Ill make sure to learn it for my current project.
Before these cheap PCBs I also used your method. These days, I tend much more towards PCBs. They look much more professional ;-)
I am trying to do the same but the upfront time investment needed to learn how to design them correctly is quite significant. One question about this, please: how do you create the Vcc and ground planes? Do you start with a solid copper fill covering each side of the PCB and sort of "carve" the gaps around the tracks as you route them (especially on the Vcc plane), or you only fill them after all the tracks are routed? I'm trying to figure out a good workflow for this. Thanks! (and yes, 1206 here as well thanks to age 😀 )
@@dan-nutu , there are a lot of tutorials on the Internet. You start with the ground plane (layer) and the supply voltage layer, then place the components, then connect the components.
@@dan-nutu These programs do all the heavy lifting. You just add a copper plane and they carve the insulation like magic...
Aw heck yeah my favorite dood uploaded a new video
:-)
I also like silicone sleeved wires - their fleibility makes them easy to stuff into small spaces. However, crimp connections tend to be weak because of silicone's slippery qualities.
I agree they are slippery (sometimes an advantage). But so far, I did not have issues with the crimp quality.
With Attiny for simplicity I do the same, but with cylindrical Li-ion batteries, AAA or AA size. They go from 4.1V to 3.0V, don't need any regulator, are cheap and you can just replace it in the device by a re-charged one. The holders are also the same. For simple projects, just one AAA size battery last more than one year. The leakage is also very low. The new Attiny MCU's by the way are very simple and a lot of fun to program, even bare metal. And just with one wire + one TX wire, I can flash and debug at the same time.
I agree with the ATtinies. I have to try the AA or AAA size Li-Ion batteries.
I just looked at the choice. Which one do you use? The USB chargeable ones?
@@AndreasSpiess I use normal batteries 10440 (AAA) about 12€ a pack of four, and 14500 (AA) 5€/6€ each. Or the bigger ones (18650)... Then a USB separated charger that is also cheap, about 12€. I have a 'IMREN K2', compatible with all the Li-ion cylindrical sizes, even the big ones. In Aliexpress just pay attention to the batteries too cheap or with 'amazing' capacities, in chini-amps hour.
@@AndreasSpiess And of course these chargers are not compatible with the normal 1.2V NiMH batteries. And being the same size could be dangerous, unless the charger detects it. And also dangerous for a device expecting 1.2V or 1.5V batteries. Better label this batteries clearly, and the holders.
A prev comment has been removed. I use normal 10440 (AAA, about 3€ each), 14500 (AA about 5€) or the bigger like 18650. And a USB charger of about 10€, compatible with all cylindrical Li-ion batteries. In the usual places, just be careful with batteries too cheap or with amazing capacities, in chini-amps hour.
you have great experience.
Thank you!
Great video, Andreas. Anyways, have you heard about MIoTy protocol? Maybe in one of the next video you will evaluate this technology?
So far, nobody was able to show me the advantages over LoRaWAN with its large installed base :-(
The one thing that improved this hobby for me was: Divorce. 😁
Also a possibility ;-)
12:44 Placing the antenna inside the steel mailbox seems a bit counterintuitive to me.
What is the alternative in a shared (apartment, HOA) mailbox situation?
You and @alexdrinkwater28 both are right ;-)
I hate the smell of some dupond wires, silicon will be welcome!
The lora ntenna inside the metal mailbox is not a problem ?
(A link to the previous video about it in the description would be welcome 😉)
The antenna inside the metal box is a problem, but LoRa with its huge link budget was the solution.
Link added. Thank you for the tip.
Hi. Another great video. maybe one thing you could have added : a voltage divider to measure the battery voltage. Another thing on your design : I think there is a bit of current leaking from the opening / closing pin (from VCC to GND through 4.7kOhm resistor isn't it?
A voltage divider for measuring the voltage using a pin consumes (leakage) current all the time unless you add a transistor to switch it off. And the leakage current through the 4.7k resistor is very small because it has to go through a pin of the MCU which has a high resistance when sleeping.
Really great watching your journey for this project in one video, very informative and inspiring. One question, is your mailbox metal? If so how well does the LoRa signal travel through it?
Yes, it is metal. And it works because of the high link budget of LoRa
Thank you very much! Very interesting solution but complex due to the long distance to the letterbox. Luckily the distance to my letterbox is in range of cheap 433MHz sensors's capability. So I can use RFlink connected to my ioBroker. Powered by 1 AAA. Having no 3D printer, one reed contact is covered by a conduit and the other by an empty toothpaste tube (elmex, swiss GABA 🙂 ).
You are very creative with your packaging! I am sure, when you will get your 3D printer one day, you will be thinking: Why so late ;-)
But, unfortunately, GABA was sold in 2004 to Colgate :-(
@@AndreasSpiess The toothpaste tube is made of plastics, isolating, water resistant enough and thin. I am not sure, if a 3D printer could produce a housing with such properties. At least not to such a price point :-)
I've been wanting to try the Code Red for a while, so maybe I'll try it.
I like it for complex stuff.
Node red... makes it easier to search on google or in HA 🙂
Great video! Many details and info on different aspects in one place.
But, where can I find schematics for the gateway? Don't see it in the 493 video...
This is too simple. Connect the 5 wires from the LoRa board to the GPIOs with the same name in the sketch.
@@AndreasSpiess got it, thanks
Do you have a link for the Wire holder that you showed @8:20 to 3d print? As that is excatly what I am after for my silicone wires
No, unfortunately not. I printed it long time ago :-(
Great Video! Thanks. Does it also work when the Door of Mailbox is jammed and the lid stays open? Sometimes our Mail guy is to lazy…
It should. But I did not test if it starts to sleep in this condition. But could be solved by small changes in FW
Correction - the better DuPont wires actually copper inside, not just more. The cheap ones aluminum or chinesium if you ask me.
Any breadboard problem I ever had, was related to cheap DuPont wires !!
I am not sure if the reduced resistance of copper matters on these small distances. Or why do you prefer copper? But the quality of the crimp definitively matters. I also think, that thicker wires do not break easy.
Brilliant
Thank you!
Could you have used a single 18650 cell and replace it when it needs to be recharged (which would not be often)?
I agree. If rechargeable, I also could have used 2 NiMh batteries. I wanted to avoid the LDO. Or one LiFePo4...
My version is based on the latching transistor idea you made a few years ago just using wifi. I'm currently powering using 3 eneloop cells into the 3v for the low self discharge, the only issue I have is remembering to charge the cells, any thoughts of measuring cell voltage when powered this way? - Something like the secret arduino voltmeter but running on esp. My box is lined with thick polystyrene in an attempt to retain capacity in winter. Thanks for the great videos.
This time I had to choose another way because I had two switches. In your case, you can add a voltage divider and measure the battery voltage with one pin. In my case, it would drain the battery and I would have to add a transistor to switch the two resistors off during sleep.
Did you have any concerns about placing the device in a metal enclosure and having signal strength issues?
That was a concern until it worked ;-)
Congrats for all your stimulating projets! I have 2 questions. Q1: Do you get below freezing temperatures during winter? If so, would the device be affected? Q2: Our mailbox is all metal, would'nt it be acting as a Faraday cage et prevent the signal to go out? Thanks!
You could use rechargable AA batteries. There are even 1/3 AA batteries, so u could have a batterypack, that has the size of a signle AA battery.
A good idea!
Wouldn't you have issues with the voltage, because they are 1.2v?
@@userou-ig1ze Look at the discharge curve.
@@userou-ig1ze AFAIK they stay for quite long on 1.2V
What is the expected range of a device like this? Was it mentioned how far away Andreas’ box is? My mailbox is about 150m from the house and been thinking of making something like this for years.
Great video!
My box is about 50m away. However, the metal box is the problem. My LoRa world record 8 years ago was 200km. And others reached even more after me...
@ Thanks for your reply! I have the possibility to place the antenna outside. I have no previous experience of LoRa. I have understood that LoRA can achieve long transmission ranges, but was unsure if there are any specific limitations for this use case, in addition to the metal box. I’ll test, and find out some day.
Thanks for your very educational videos! I just found your channel and have now been watching for hours. And I of course subscribed.
@@bjondersson Line of sight usually works, also no long distances. No line of sight needs testing. Sometimes it works.
Two AA batteries from Lidl? When they go flat you need to replace ASAP before they vomit their electrolyte, almost as bad as Duracells. Now if I could figure out how to use my Optivisor magnifiers now that I have had cataract surgery, arrrg agrivating, even worse my left hand has developed a bit of a shake. What a curse and I love working on repairing commercial radios and electronic projects! Thanks for this video and I need to look into home assistant, would make life simpler in the home but I have no plans on linking to the open internet.
We need people like you who still have the ability to repair radios! They die out :-(
Great
Thank you!
At 3:17 I didn't quite catch the software that he uses for more complex PCB projects..... kite app??
KiCAD
Does the transmit power depend on how much voltage the RF module is getting? Might 3x AA be a better choice to give it some more voltage?
I did not measure the output power. Half the power would not matter too much.
I have one question here, what i believe about LoRa it needs line of sight to transmit, in case we have some obstract it could not communicate, in this scenario when LoRa sender is installed in a metal box, at some ramdon direction how come it can send signal to gateway ?
You are right with your statement. However, on short distances it still works out of this metal box because it only needs very low signal levels.
Any link for the reamer? That is an amazing tool and great tip for 3d printing holes
I added the links
can you share you PCB design that we can order the same plank PCBS ( it will be great if they populate with components ) /
if we decide to build this concept for our home mailbox ?
I assume you did not watch the video till the end ;-)
I love this project as it is exactly what I am looking for. I would just need to water proof the transmitter box a bit more but otherwise - ideal.
Problem is between getting all the components and soldering onto custom PCB I would never be able to finish it myself.
Is there anything like this that can be purchased already made that can be integrated into home automation?
As this is a Maker channel, I do not extensively research on available products. So I do not know if something like that is available :-(
@@Edsdrafts , there are some products, but I don't know how easy/difficult they could be adapted to a home automation.
Don't be that pessimistic. I went from "No idea how all of that works" to a custom made PCB in 6 weeks while having a full time job. If you are lacking the knowledge, there are a lot of people who can help and a lot of easy to follow tutorials. Beginning with a simple Arduino or ESP dev board and a breadboard is a good start. If you are lacking the equipment for soldering or 3D printing a case, there may be a makerspace not far from you.
Are you happy with those tiny little antennas? I was under the impression that their SWR is around 3 + at 915mhz
Mine are always close to 1:1. After my "Treatment especiale" ;-)
I was once tempted by the yellow pcb, but decided not to choose it. At least now I can see it in real life.
:-)
Very nice! Is the mailbox of steel? Antenna inside?
Yes and yes.
Great video: I would like it to be much more detailed. Maybe several videos.
This channel is for advanced users and they would be bored by much more details :-(
Thanks for answering and being honest.
A more detailed description could be a link to a document.
But I have to say goodbye from being a long time Patron supporter. Thanks for all your tutorials in the past. If I want entertainment videos, I will go otherwise.
Sure there will be an audience for your videos.😊
@@thorbennielsen3845 Thank you for your longtime support! I thought I did not change the style of the videos too much over the years...
So many things I have never even heard of.. Node-Red/HomeAssistantIo , EasyEda, Reamer, etc!
Then there's things that seem to be specific to the application / availability and rules in your area. For example, the choice of low-power, long-range wireless standard... LoRaWAN/LR-FHSS, Zigbee/Z-Wave, Mioty, Thread/Matter, Sigfox / HayStack / X10 , ANT/+, etc.
If you were a contractor doing this project for a customer, how many engineering hours do you estimate it took?
BTW, what PCB house did you use? Something local in Sweden, or something oversees (OshPark, JLCPCB, PcbWay, MacroFab, SeeedStudio Fusion)?
Because it is my hobby, I never count the hours ;-) And I used JLCPCB because I know them and their price and quality is good.
Hello,
How are you using your magnetic switches?
As i know, magnetic switches are normaly closed. So everytime current flows to the pullups and the switches. !?
In your video you are using momentary switches with with NO....
Another question:
in youre code are input pullups are set:
pinMode(SWITCH_OPENING, INPUT_PULLUP);
pinMode(SWITCH_DOOR, INPUT_PULLUP);
Are the physical 4.7k Pullups needet?
Why 4.7k and no higher resistors?
greetings
Jürgen
Yes, I use magnetic switches. NO and NC is not always defined the same way because with these switches, "normal" is not standardized. So I only bought ones where the seller described the behavior in his own words ;-)
These resistors, in conjunction with the capacitors, should supress switch bouncing.
Hello from Zürich! How does the RF-signal get out of the aluminium mailbox? is this not a good rf-shield that will block all signals?
Yes, it a (nearly) faraday cage. But it works :-)
Tried building something similar with off the shelf lora/meshtastic devices, but failed miserably due to battery limitations. Any way to convince you to sell a semi-built notifier ? Any signal concerns inside a standard Swiss milchkasten ?
1. I will not sell hardware.
2. Of course, the signal is weakened in such a situation. But it works here.
Thanks! @@AndreasSpiess
Why not use a supercap and solar charging for the notifier ?
Because I do not want to drill holes in a mailbox I do not own.
So, you're building a receiver just for the mailbox instead of using a gateway you (I presume) already have? Why?
Because it was no more reliable. The TTN sensor worked for years, but since a few month, no more reliably. I did not investigate the reason, I just wanted a simpler system.
just a heads up, the links for the modules are not working
not a big problem for me just a heads up
Here, the links work. Maybe you use an Ad Blocker?
One suggestion: UPDI connector, pins order, vcc, gnd, updi instead of vcc, updi, gnd.
What would be your reason. Mine is: If I power the ATtiny with a different source, I only need two pins.
@@AndreasSpiess If you mistakenly reverse the connection cable, the attiny will receive the reverse voltage. With vcc, gnd, updi there is no damage.
@@mama9712 Good point!
Where is the link for the boxes?
I now added them to the Github Repo (link in the description)
@@AndreasSpiess Thanks.
Does your mailbox not act as a Faraday cage?
Yes, nearly. That is the reason for all the effort. LoRa with its very high link budgets get through it somehow.
why not use Solar panels for notifier? small solar panel could have done the job?
Because I do not own the mailbox and I did not want to drill holes. And because I do not have something outside the box that is not secured.
@@AndreasSpiess I would love to see a project with LORA and solar panels. I introduce you to my colleague as Father of DIY electronics.
@@yousaf.saleem These are two different topics. I made a few videos on solar. You can combine them with whatever you want...
"Divide et impera" Julius Caesar
"Impera" over all my electronics devices ;-)
Hey Andreas, whatever happened to Mailbag vids?
They are not very liked by the public. So I reduced their appearence.
@@AndreasSpiess I loved them. Please reconsider :) Double-check your assumptions. Thanks for vids, Andreas!
@@kilosierraalpha UA-cam gives me the statistics...
Nice work. Suppose you’re not going to share the gerber and bom of that pcb ? 😋 you could always upload that to pcbway so that lazy people can order directly and you get a % from that , just saying 😊
I added the links (to my project on JLCPCB). No % for me, though ;-)
@@AndreasSpiess very nice!! Thanks a lot!
Good idea to mount the LORA module right beside the ESP32 touching metal /s /j.
The sheets do not touch because of the tape. But soldering them together would indeed be better.
@@AndreasSpiess I'm just saying how the LORA can interfere with the esp32 being so close.
@@4bSix86f61 In this case, the timing might help (there should be no Wi-Fi traffic before the acknowledgment message is here).
@@AndreasSpiess 👍
Excellent work as always.
Congratulations on this new printer (it is on my wishlist).
Did you explain the notifier's purpose to the mail delivery person?
No. I do not think they care. Most of them know that I get a lot of packages from China and sometimes, we have a chat about it.
@@AndreasSpiess , many years ago, German companies provided components and gadgets (in central Europe and beyond). China exported rice. It's amazing what happened.
Nowadays in the Western world everybody prefers to create "wealth" by providing services or all sorts of financial shenanigans
why telegram notification when ha can do this by nature?
What do you mean with "by nature"?
@ if youre using the app, notification is built in as a service. Even prioritiseable!
@@notofinterest An advantage for HA. Because I use other services, too, I still use Telegram. But I might change over time.
@@notofinterest did you find out how you could change sounds for different notifications say alarm, notify, automation based
@@Suchtzocker yes. Settings>companienapp>sounds, wich sound to play you can choose in the service. Hope this is still correct, last time i nudged around that is yrs ago.
I'm honestly here for the "first row" -> "front row" arc in 2024
I do not understand :-(
Heh, it's just that I like it more when you say "you can always sit in the front row", than when you say "you can always sit in the first row". It's just linguistic pedantry. Blame my autism. But I have noticed that you've sometimes started saying "front row", which I like :-)
@@herwighochleitner422 Now I understand. I use Grammarly to check my English. It proposed it. That is why I changed.
Hallo Andreas, seit Jahren schaue ich mir deine Videos an und möchte erst einmal Danke sagen. Bei meinem Auto wollte ich schon lange eine "Präsenzmeldung" via BLE/ESP32/iPhone entwickeln um den Zündschlüssel zu ersetzen. Ich habe dann endlich eine Lösung gefunden die sehr simpel und robust ist und keine Software auf dem iPhone benötigt. Melde dich wenn du Interesse daran hast.
Du findest mich im Telefonbuch wenn du mir eine SMS senden möchtest (oder mein email über meine Firma Arumba)...
I really don't get the point of MQTT in all these projects. Just another unnecessary software component that is a headache to maintain and configure. HomeAssistant and ESPhome have a perfect direct integration with each other and the HomeAssistant native API is all that you really need. The mailbox notifier project idea is quite cool though, I might try it.
Its not ideal in this application due to:
-Mailboxes often being out of range of wifi
-Higher power draw and lower battery life
@@basileus9343 I think you misunderstand me, the ESP will still be the gateway for the LoRa communication with the attiny. It's the communication between ESP - HomeAssistant that will not use MQTT but they normal HA API.
So far I did not see that ESPhome supports LoRa modules. and ARQ. MQTT is a standard used by many sensors and is well integrated into HA.
@@AndreasSpiess No unfortunately it doesn't support LoRa modules directly, but you can easily alleviate this with a lambda piece of code under the UART sensor of ESPhome (that's my guess though, haven't tried it for LoRa modules).
@@XavierGr Then I definitively stick with MQTT. Much easier for me. And withstands all Firmware upgrades...
I am not a fan of Internet cloud based brokers and related garbage. There are plenty of other stand alone options that I am in total control of and can trust. For such a simple application this has too many layers of complexity, such as node-red.
Agreed.
Everybody has his own way. But here, nothing is in the cloud (only the radio waves when there is fog).
Who owns the mailbox?
Here in Canada, if you put something like this into your mailbox, you could be fined, and the device would be removed and destroyed. The mailboxes in Canada are the property of the government owned postal service and they don't like their customers messing about with them. 🙁😖
You mean the mailbox that is on your property where your mail gets delivered to? Don't you buy these yourselves? In Germany and I also think in Switzerland, this is a mailbox that you buy and mount either directly on your house or near to the street, there mostly attached to a fence like object. You chose the design and size and as long as the mailman can find it and put your mail in it they don't care what it is. Some even put USA style mailboxes out on a post.
@@drstefankrank Nope. If you live in an urban area of Canada the post office no longer delivers to your home. They deliver to a set of mailboxes they have installed at key locations, usually within 100 meters of your home. As a home owner I don't buy a box from them, they are just provided by Canada Post. Thus to get your mail you are given a key to your box and you have to follow their rules, which does not allow the installation of electronic devices. I still have a mailbox attached to the wall about 2 feet away from my front door, but I've only ever received 1 very small package from Amazon in that box in the past 20 years.
@@mcconkeyb Ah ok, Canada is much bigger and less densely populated, so that system seems to works for you. Spares the post office a lot of travel time for just a letter. This isn't the case here. I'm not aware that we have a system like that anywhere. I could only think of some single houses up on the alps who could have their mailbox down near the next village.
The home owner has to provide one, but the place is defined by the postal service. Where I live, many boxes are in one place and they are owned by the company that runs this place. That is why I did not want to make a hole for the antenna.