#221

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • A more detailed walk-through of a simple Arduino/nRF24L01 switch-triggered module.
    JLCPCB Only $2 for PCB Prototype any colour jlcpcb.com/cyt
    Including single-sided aluminium boards just $2 for 5 pieces
    My wireless "bin lid monitor" module could be used in many ways: detecting post, monitoring a gate or garden shed door and even as a burglar alarm detector! Let's walk through the steps I took to get it this far whilst you think about what you could use it for.
    ► Timestamps
    00:00 Welcome Back
    04:55 Power Supply
    14:22 Wireless Data Transmission (nRF24L01+)
    19:18 The μController
    25:18 Designing the PCB (incl. AutoRouter info)
    27:59 Mistakes happen, learn to adapt and survive!
    ► Please do visit my sponsor's excellent PCB website, think of it as window shopping! ◄
    jlcpcb.com/cyt
    ► Items used in this video (and others)
    • TP4056 Li-Ion Charger 10 (yes, TEN) pieces for $6.96
    www.banggood.com/custlink/KDG...
    • 1-Slot 18650 Battery Holder With Pins 5 pieces $5.72
    www.banggood.com/custlink/mmm...
    • EasyEDA download and local PCB router, now works VERY WELL!
    docs.easyeda.com/en/FAQ/Downl...
    ► List of all my videos 💘
    (Special thanks to Michael Kurt Vogel for compiling this)
    bit.ly/TH-camVideoList-RalphB...
    ► Useful Information
    • Oregon Battery Life Calculator oregonembedded.com/batterycalc...
    • Battery tests and reviews lygte-info.dk/review/batterie...
    • Tim Eckel's ToneAC library for louder tones github.com/teckel12/arduino-t...
    • Info on TP4051 battery charger acoptex.com/project/9446/basi...
    • Modifications to TP4056 by @Andreas Spiess to avoid the situation where battery cannot recover from too low a voltage, via a solar cell • #383 Cheap and simple ...
    • Microchip's datasheet for the Low Drop Out MCP1700 regulator www.farnell.com/datasheets/221...
    ► If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite (and other μControllers) journey
    ------------------------------------------------------------------
    • / ralphbacon
    • ralphbacon.blog
    • github.com/RalphBacon
    -----------------------------------------------------------------
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 85

  • @IanSlothieRolfe
    @IanSlothieRolfe 2 ปีที่แล้ว +2

    It is very satisfying getting a project designed and made on a PCB and it all works!

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Yes, indeed. The flip side is, of course, where the PCB is so nearly right but needs "tweaking" before it works. That's if you're lucky and haven't put a footprint on backwards so it will never work no matter how much tweaking you do. But as I have never done that, it doesn't apply to me. 🤥🤥🤥

  • @AtlantaTerry
    @AtlantaTerry 2 ปีที่แล้ว +4

    Thank you for creating this tutorial.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      You're very welcome!

  • @keitholiver3981
    @keitholiver3981 2 ปีที่แล้ว +1

    Hi Ralph, spent many years designing PCB’s using the black, red and blue tape only to find out something doesn’t work, rip it out and start again.
    I agree the Autoroute in any CAD package is brilliant saves a lot of time, only thing to get correct is the placement of the components. (Unless you have auto placement which Easyeda doesn’t have)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      True! I wish it _did_ have auto-placement of components; then again, as Arduinites (we're not designing Challenger Space Rocket boards here, as much as we might like to think so) I guess we just don't have that many components to manually place.

  • @MrRenoman2011
    @MrRenoman2011 ปีที่แล้ว

    Your videos are great so well done and explained. Thanks again

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Glad you like them!

  • @davesdigitaldomain
    @davesdigitaldomain 2 ปีที่แล้ว +1

    I love watching your videos even though I don't fully understand everything you say, because I'm a beginner with programming. could you do an Arduino programming tutorial series from basics to more advance. I think you make an excellent teacher.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I try and make things as straightforward as I can, David, so I'm sorry you don't get some stuff. Remember you can always ask for clarification about something in the video comments. The best way to progress from beginner is to watch my videos, no really, that's why I make them.
      ► List of all my videos
      (Special thanks to Michael Kurt Vogel for compiling this)
      bit.ly/TH-camVideoList-RalphBacon

  • @TheRealNVT
    @TheRealNVT 6 หลายเดือนก่อน

    Wonderful content and lovely presentation. A few tips. #1 Wrap some Sellotape around the LiPo and leave a 'tag' which you can use to pull it out. #2 Use Alkaline AAA's or AA's very low self discharge rate and 4.5V .Keep up the good work

    • @RalphBacon
      @RalphBacon  6 หลายเดือนก่อน

      Thanks for the tips! And thanks for sharing 👍

  • @scottstevens7569
    @scottstevens7569 2 ปีที่แล้ว

    Good Job Ralph! Another nice presentation and project just brimming with ideas and solutions. Thanks!
    Nice to see how success and end product functionality can be achieved all along the steps.
    You seem to have glossed over the inevitable issues at every step, like remembering the file name when it's time to order, things being hooked up wrong, dead battery, burnt out LED, re-soldering something 15 times and the insert coming out, hair pulling over 'it' just not working every time you test it and need to spend hours tracking down a problem like a bad solder/broken wire.... 😊😜

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Hang on, Scott, have you got access to my workshop webcam? Someone's been watching me, I'm sure.

  • @adambeedle
    @adambeedle 2 ปีที่แล้ว +1

    Really informative 👍

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Glad you liked it, Adam!

  • @blic-sx9ix
    @blic-sx9ix 2 ปีที่แล้ว

    Yes Ralph, I would not have done it your way but I respect your choices and there is a lot of good info in the video. Keep up the great work.
    You do have to watch out for those user contributed footprints. I had to scrap some boards where the nRF24L01 footprint I grabbed had a mirrored pinout! I guess they were putting the headers on the back of the board

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      You're not wrong.
      User-contributed footprints can be the devil's spawn. You think you've hit Gold but discover when the PCB is made that it was just wrong - or, at the very least, made for a specific purpose or on the underside of the board, as you say.
      It's easier, in the long run, to make your own footprints; that way you have no excuses and are more likely to put in some effort in getting it right!

  • @MUHAMMADYAWARIFRAHEEM
    @MUHAMMADYAWARIFRAHEEM 2 ปีที่แล้ว

    Very informative video Sir

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      So nice of you, Muhammad, always good to hear from you.

  • @gazzacroy
    @gazzacroy 2 ปีที่แล้ว

    yer cool i found this intresting :) im playing around with battery chaging and control power at the moment my self so found this handy :)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      Glad you found it interesting. Don't forget @Adreas Spiess' video if you're using solar power.

  • @willofirony
    @willofirony 2 ปีที่แล้ว +1

    I do like this collection of generic(ish) modules approach that you are evolving here. It usefully breaks down the description of a circuit into bitesize chunks to aid cognition AND it introduces flexible use of a circuit, so this PCB could be used for many purposes. The clue to this revolutionary (at least in the TH-cam context): you dare to leave some sections of the PCB unpopulated and even suggest other components are optional! Some of your viewers will actually take what they learn here and develop totally unrelated gadgets inspired by their own needs. As the Houghton Weavers' vocalist was often heard to say: "Pure paracetamol". Well done, yet again, Ralph.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Thanks, Michael, for your kind and encouraging words.
      Indeed, space permitting, I'm finding I'm allowing the addition of all sorts of optional components on my PCBs, as I've found out the hard way it's no trouble at all to omit components but it's the very devil to try and bodge an additional capacitor in there where there was no provision for it!
      Anyway, I'll try and "Keep Folk Smiling" with my videos.

  • @Bianchi77
    @Bianchi77 2 ปีที่แล้ว

    Nice video, thanks :)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Glad you liked it!

  • @mikex691
    @mikex691 2 ปีที่แล้ว

    By far the best project and video from u. Thank you for all your work.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Glad you enjoyed it! Project still on-going, of course.

  • @TheUnofficialMaker
    @TheUnofficialMaker 2 ปีที่แล้ว +1

    Is the gerber file available to order board from JLC? Nice detailed video, well done.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I can publish both the EasyEDA project (so you can tweak the design as you want) and also make the Gerber files available - but then you will be "stuck" with my exact design, warts and all.
      Tell me which of these is best for you? You can email if you want, my address is in the About tab of my channel (only visible from a PC not a phone, for some bizarre reason).

  • @balajin766
    @balajin766 2 ปีที่แล้ว

    Great learnings from this video, unfortunately I am unlucky getting these NRF24L01 boards to work. can you do a project where the hc-sr04 are powered on/off by these MOSFETs for low power....seems there is no consistent solution to this problem ?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      You seem to have two questions, Balaji: getting them to work (at all) and controlling them via a MOSFET to switch them off completely to save power.
      To get the modules working reliably whilst developing you need the adapter plates. They basically consist of a 3v3 LDO so you can supply the full 5v without worrying about not enough current for the nRF24L01s. They are very cheap and solve 99% of all power-related issues. In a project you can design in your own 3v3 supply with sufficient current carrying capabilities, as I did with this project.
      To switch off the modules you can use the CSN pin that brings them into a low power mode (which is what I do here). Datasheet will tell you the power consumption in such a state.
      Or, use a MOSFET to power them off completely using a GPIO pin (which I did not do) - it takes a little while for them to wake up and get ready for transmission if you do it this way.

  • @alanbacknd3120
    @alanbacknd3120 2 ปีที่แล้ว

    Great Video, Please look at the HC12 1000meter range with no lib's just tx rx pins same as Bluetooth

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I believe (but only that, Alan) I mentioned the HC12 in my video on two-way BT comms in video #196 using HC-05/HC-06 devices. But I remember wondering whether the HC12 would work with the existing libraries from Martyn Currey. Thanks for the nudge, I will try and get to the bottom of this.

    • @alanbacknd3120
      @alanbacknd3120 2 ปีที่แล้ว

      @@RalphBacon I was out of the loop for a while. I will check out 196 Thank you, Alan

  • @onecircuit-as
    @onecircuit-as 2 ปีที่แล้ว

    One for the fridge door! 😀

  • @noweare1
    @noweare1 2 ปีที่แล้ว

    "Howza bout da receiver unit", made me laugh, another excellent video from someone who contributes to mankind.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Glad you enjoyed it! And you've reminded me I really should get on with that receiver unit design.

  • @MarkDC734
    @MarkDC734 2 ปีที่แล้ว

    I hope someone could help me , when it comes to coding for the nrf for bidirectional use at various stages , any tips for synchronizing data at multiple transmitting and receiving modes within an arduino program , really struggling to use , multiple stages to transmit and receive and synchronize both microcontrollers

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I'm not clear on what you mean by "synchronising" transmissions. Your program logic should be aware of when (and what) you expect at any point in the code and transmit/wait as required?

  • @jakubcihanek
    @jakubcihanek 2 ปีที่แล้ว

    Thank you for this project. Its nice to see the puzzle pieces from your other videos come together in a way i think is useful for many people they want to build some battery powered/remote projects. But as always it raised some questions. All of that works flawles until i connect the high power NRF module to get a longer range. After that connection is unstable. I tried capacitors to provide power reservoir but nothing seems to be working. I know there are these adapter board for NRF modules but when i meassured consumption it doesnt make sense to use them in battery powered project because of voltage regulator used. Is there any solution for that?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      You say "it doesn't make sense" to use adapter boards in a battery powered board, Jakub. I'm seeing here an aversion to using up power by dropping one voltage to another and dissipating the unwanted voltage as heat, as an old-fashioned 7805 voltage regulator might do.
      However, for the fairly modest requirements of the nRF24 (high power or not, it's going to be under 120mA) there are some very efficient LDOs, such as the Microchip MCP1700 family, which I'm using in one of my projects. There are doubtless many others that require just a couple of hundred millivolts above the required voltage (so 3.5v would be enough to provide the 3v3 required) and sip power.
      It's also very easy to turn the nRF24 (or any other peripheral device) on and off under software control of the μController using a (dual) MOSFET device, which ensures zero current consumption whilst the μController is in Deep Sleep, for example.
      As the expression goes, "There's no such thing as a free lunch", and if we are to power devices from a battery then they _will_ take battery power - but we can do much to reduce that to an absolute minimum with good hardware design and Best Practice in software engineering. Agree?

    • @jakubcihanek
      @jakubcihanek 2 ปีที่แล้ว +1

      @@RalphBacon Thank you for those tips. Iam now using 7333-A voltage regulator that has similar characteristics to those from Microchip but it doesnt hurt to try some well known brand to rule out possibility that my 7333-A doesnt act according to datasheet. But i like the most the idea with MOSFET to power off completely the modul until next event occurs it doesnt crossed my mind. Thanks for a quick reply.

  • @brettb.345
    @brettb.345 2 ปีที่แล้ว

    I’ve been working with the ATtiny84A, which has more pins than the 85, but otherwise roughly the same.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Indeed, Brett, the ATTiny84 is a bigger version of the ATTiny85 - but at that point it's not really that much (physically) smaller than an AtMega328P (14 pins vs 28 for DIP and 20 vs 32 for QFP) but does have some hardware limitations (no hardware serial, no I2C, for example). The QFP package might be easier to SMD solder but even so... I'll stick to the ATMega328P for now and see how much of its features I end up using!

    • @brettb.345
      @brettb.345 2 ปีที่แล้ว

      It’s still a fraction of the size of the 328 and can run at smaller loads. I’ve done I2C very easily on it and to great effect. The biggest limitation is 8K. I don’t think it gets enough credit, because most of the videos I see are singing praises of the 85. That said, you’ve inspired me to play around with a raw 328.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      Indeed, play with the bare 328, I've done some videos on it and there is a board entry for it (so you can select clock speed etc) in the Arduino IDE if you install the MiniCore framework from Hans (MCUdude): github.com/MCUdude/MiniCore

  • @flemmingchristiansen2462
    @flemmingchristiansen2462 2 ปีที่แล้ว

    Hope you had a good holliday.
    You take the board out to charge the battery?
    With your luck it would be on a rainy day. Who is going to close the bin? 😉
    Nice layout on the schematic.

    • @jyvben1520
      @jyvben1520 2 ปีที่แล้ว +1

      yeah, hope the shack has a lightning rod ...

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      Shack? SHACK? 😡

    • @jyvben1520
      @jyvben1520 2 ปีที่แล้ว

      @@RalphBacon well does your humble abode has a lightning rod ?

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +2

      My excellent _workshop_ (do *not* say the "shed" word either, I get enough of that from my wife) does not have a lightning rod because it is very low (max 2.4m above ground) and it's not metal either so I can't see it (jinx alert) being struck by lightning any time soon. Plenty of higher buildings and trees around me!
      Of course, now you've planted the seed of doubt, so thanks for that.

    • @RottnRobbie
      @RottnRobbie 2 ปีที่แล้ว

      @@RalphBacon (another thought) ...
      There was a time, certainly in my father's day and I think up through the 70's, when Ham radio operators were pleased and proud to head out to their radio shack to pursue their hobby. The phrase was so common, so accepted, and so prestigious, that a major corporate electronics retailer in North America chose to brand themselves "Radio Shack". Maybe you should reach back to the origins of electronic tinkerers and claim pride in having a Maker (or Arduinite) Shack? (I wish I had so much as a shack - I have to make do with a desk in one room, and a table in the basement).

  • @1larrydom1
    @1larrydom1 2 ปีที่แล้ว

    Good job Ralph, but I was playing along and was wrong. I thought you'd use a laser or an LDR to detect the bin lid open, since I avoid anything I have to remove. My wife would distract me, and I'd forget to put it back!

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +2

      I hope (and at this stage, that's all it is, Lawrence) that I will only have to remove each board twice a year to charge the battery. Of course, with three bins that six removals per year. But rather that than (power or signal) wires everywhere!

  • @WILDMACK
    @WILDMACK 2 ปีที่แล้ว

    Hello, can you publish both the EasyEDA project and Gerber files for this project. Thanks

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Indeed, you can find all the info here:
      github.com/RalphBacon/221-nRF24L01-State-Monitor-Transmitter

    • @WILDMACK
      @WILDMACK 2 ปีที่แล้ว

      @@RalphBacon Thank You

  • @mr.mythoclast4451
    @mr.mythoclast4451 2 ปีที่แล้ว

    such a transmitter could be very very handy if it is small as it could

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Indeed, although in this case the 18650 battery sort of limits how small we can make it.

  • @gazzacroy
    @gazzacroy 2 ปีที่แล้ว

    have you ever played with the esp32's 'NOW' protocol wow very good and no need to learn html :)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      I haven't but will look into it. I found this interesting article that others may wish to look at too: randomnerdtutorials.com/esp-now-esp32-arduino-ide/
      As a web developer I don't have problems with HTML and all that goes with it, but anything that speeds that up must be a good thing.

    • @gazzacroy
      @gazzacroy 2 ปีที่แล้ว

      @@RalphBacon man this 'esp-now' stuff is so so much better i hate html lol.. this is so so quick intant no messing with silly html delay :) lol.. the range is much better to me and my mate was playing around with it got to the end of the street :) yer have a nosey at it you mite like it (less battery power too :)

  • @tubeDude48
    @tubeDude48 2 ปีที่แล้ว +1

    Ralph, why not add a diode to the battery so it won't matter is you put the battery in backwards?
    ----
    It looks like you can use a Nano, Rather than the UNO R3.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Too big a voltage drop, easily half a volt. I could/should have used a reverse connected MOSFET for battery protection but I figured I'll not be taking the battery out.

    • @tubeDude48
      @tubeDude48 2 ปีที่แล้ว

      @@RalphBacon - True, it would be 0.7 volts

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Well, I'd see if I could use a Schottky, less voltage drop but still too much here.

  • @mujahidnazir6873
    @mujahidnazir6873 2 ปีที่แล้ว

    Please let me know about your social media accounts for further details

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      For further details of what, Mujahid?

    • @mujahidnazir6873
      @mujahidnazir6873 2 ปีที่แล้ว

      @@RalphBacon I am an honest amazon agent that's why I am asking

    • @mujahidnazir6873
      @mujahidnazir6873 2 ปีที่แล้ว

      @@RalphBacon reply me please

  • @newburypi
    @newburypi 2 ปีที่แล้ว

    21:01 - ATtiny84 then.
    ;)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Ha, ha! Too small! Not enough pins! Actually, I wish I had used an ESP32 and the ESP-Now protocol. Ho hum.

  • @fredflintstone1
    @fredflintstone1 2 ปีที่แล้ว +2

    toilet lid as that seems to annoy women when left up :-)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      So true, Fred. 🚽 🚻

    • @andymouse
      @andymouse 2 ปีที่แล้ว

      LOL ! Squeak !

    • @fredflintstone1
      @fredflintstone1 2 ปีที่แล้ว

      @@andymouse Cheese ;-)

    • @tim_bbq1008
      @tim_bbq1008 2 ปีที่แล้ว +1

      That big yellow box on the toilet lid might annoy them more...hard to say though

    • @fredflintstone1
      @fredflintstone1 2 ปีที่แล้ว

      @@tim_bbq1008 you could make it puff out scent when the lid is lifted or closed:-)

  • @billryland6199
    @billryland6199 2 หลายเดือนก่อน

    There is only 1 "i" in the word "aluminum".

    • @RalphBacon
      @RalphBacon  2 หลายเดือนก่อน +1

      Only if you're a rebel who broke away from the fatherland, known as Great Britain. Here, we write it correctly as "ALUMINIUM" and even pronounce it correctly too. You colonialist whippersnappers know zilcho about the English language 😉

    • @PexiTheBuilder
      @PexiTheBuilder หลายเดือนก่อน

      How many "s", "o" and "d" there is in Na? 0, because its Natrium. How many "p", "o" and "t" in K? 0, because it Kalium.