#166

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

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

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

    Another excellent video, Ralph. I am impressed on the use of the WDT for timing the sleep. Finally, a comprehensive description of the procedure necessary to achieve the lowest power consumption in sleep mode. I am not sure what correct equivalent for pedantry in the electronic maker world is but excuse my being "pedantic" when I point out that a small hole in the back of the container corresponding to the reset button would be efficacious. This would allow a narrow prodder to be inserted (as is common in many commercial electronic products) by a "none maker" who is being driven to distraction by the piezo sounding continuously.

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

      I like the 'reset' hole idea, Michael. Idea duly taken on board and claimed as my own!!! Yes, this device is working well but I did discover it could be triggered by the hot water pipes as they heated up in the early morning! I've moved the device away from the pipes now...

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

    I bought the wife a fridge.....Her face lit up when she opened it....?🤣🤣🤣🤣

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

      We'll be seeing on Britain's Got Talent any day now then, Brian? (Or in whichever country you're resident).

  • @gartmorn
    @gartmorn 5 ปีที่แล้ว

    I love the flexibility of boards like this. I'm sure we all have slightly different uses this could be put to without the need to get a different batch of boards made up every time.

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

      Quite so, it an be used for a number of projects, I'm sure. If you want one there are still a couple available.

    • @gartmorn
      @gartmorn 5 ปีที่แล้ว

      @@RalphBacon I'd love one but couldn't find your email address!

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

      On a PC or MAC go to the channel (th-cam.com/users/ralphbacon) and click the ABOUT tab. You then click the Business Contact button or similar. If you get stuck I'll try and give more clues but if I get a gazillion MORE spam mails I'll know who to blame!!!

    • @gartmorn
      @gartmorn 5 ปีที่แล้ว

      @@RalphBacon I've sent you an email which hopefully you'll get ok. If the boards are gone that's fine as I only got your message tonight. Thanks for your replies.
      Davy

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

      I'm afraid I don't know whether I got your email as I don't see a 'gartmorn' moniker anywhere. Did you get a reply? A board is still available.

  • @svengaefgen5909
    @svengaefgen5909 5 ปีที่แล้ว +1

    Very good video, very useful.
    Just a minor correction: tone does not use PWM (which has constant frequency), but "Use of the tone() function will interfere with PWM output on pins 3 and 11 (on boards other than the Mega)", because the function uses that timer.

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

      Always good to know the finer points, Sven, I should really have looked this up. Thanks for the info and for posting.

  • @paulyorke1437
    @paulyorke1437 5 ปีที่แล้ว +1

    Thanks Ralph. Very useful info.

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

      Glad you found it interesting Paul, nice to year from you.

  • @colepdx187
    @colepdx187 5 ปีที่แล้ว

    My board using your auto-switch-off from video #123 went together with ease and worked 100% as designed. The circuit only powers up when needed and self-sustains by holding a pin high that is connected to the n-channel mosfet gate. Of course I discovered that the Atmel 328P must be set to use the external crystal otherwise it uses the internal 8Mhz oscillator divided by 8. A modifications to boards.txt and burning a bootloader fixed it up for me.
    I'm trying out a modification that uses an NPN transistor instead of the n-channel mosfet so I can use the assembly service with all SMDs from the 'basic' list.
    My next device in my RF24 radio network will use deep-sleep so I'll be revisiting your videos for that design. This is such great fun :)
    Cheers, Ralph & thank you.

    • @RalphWLundvall
      @RalphWLundvall 5 ปีที่แล้ว +1

      Set the lower fuse to E2 so the internal timer is not divided by 8. I do this with an avrdude command. Google all that and you are on your way.

    • @colepdx187
      @colepdx187 5 ปีที่แล้ว +1

      @@RalphWLundvall Yeah, problems with getting the ICSP to work lead me into a deep-dive into setting the fuses and creating a tailored entry in boards.txt for my stand-alone 328P projects. Learned all about avrdude as well. Thanks!

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

      I'm so glad it's all working out for you, Dirk. I'm happily running my 328P at 8Mhz and on 1.8v (I had expected to have to divide by 8 as you said but no need for me right now). Sounds like you're learning a lot! Good to hear from you.

  • @jeffbluejets2626
    @jeffbluejets2626 5 ปีที่แล้ว

    Have a similar project for us to see if Coco the cat is in his box or not while we are away. Started fairly basic as a clear plastic flap hooked to a pot at the doorway to his box. This ran an IN and OUT LED positioned near one of our security cameras which we can access online. Below a certain value, flap must have moved inwards, above a certain value then the flap must have moved the other way.
    Great...except Coco took one sniff at the plastic and refused to go back in the box.
    So on watching your videos I think it might be feasible to use 2 of the PIR sensors, one outside the doorway and one inside. Connect these as a quadrature encoder signal ie if A high and then B then the movement must be going in to the box and visa versa, and still use the IN /OUT Led indication at the security camera.
    Enjoy all your videos and at times gives food for thought...many thanks...Jorgo

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

      I'm glad you enjoy the videos, Jorgo and makes you think about your own projects. I see what you mean by using two PIRs which are (normally) activated in sequence (not if he just turns round in the box) which indicates the direction of travel. AS long as the wrong one cannot be triggered it should work. You don't want the PIR inside the box to be triggered as he approaches the box, that would confuse things! Good luck, if you get it working let us all know!

  • @simonwhite3137
    @simonwhite3137 5 ปีที่แล้ว

    Hi Ralph, great to know I’m not the only one prone to schoolboy errors! Always plan ahead they said. Don’t solder anything until you’ve designed everything they said. Always leave room for contingencies they said. Yada yada yada...
    Those facepalm moments are all part of the fun 😁

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

      Well, your definition of "fun" might be slightly different to mine, Simon, but no long term harm done as the final product shows. And Benny is grateful that we know when he is in the airing cupboard now, so win-win!

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

    Hi Ralph, your Benny buzzer alarm comes at a perfect time for me to use it as a inspiration for my Halloween decoration (movement detected -> turn on lights in spooky Halloween decorations).
    So thanks!
    Btw do you take requests for video topics? Could you please have a look at the Sparkfun Redboard Artemis? Features are 100% Arduino compatibility, ultra low power consumption, onboard Bluetooth, faster processor, and many other things.

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

      Glad you liked it, Martin. I looked at the Redboard a few days ago and it looks nice but not exactly cheap (when we have ESP32s to play with). Have you compared features?

    • @MartinBgelund
      @MartinBgelund 5 ปีที่แล้ว +1

      Yes, I've compared features (with Arduino, not ESP32). I actually ordered a Redboard Artemis Uno back on Septemer 9th, but the new Artemis line of products weren't released for retailers until October 14th, so I'm still waiting for it to arrive.
      The ultra low power consumption, interrupts on all pins, higher clock frequency, CE certification, and Sparkfun's commitment to making Artemis 100% Arduino compatible are key features for me.
      Nice-to-haves are 3.3V, more ADC's, more PWM's, and TensorFlow capabilities.
      I don't need WiFi on my MC's, so that's just unnecessary overhead and complexity for me on ESP's.
      Also, supporting non-chinese innovation and local retailers is important to me, but let's not get political, especially when we're this close to Brexit :-)

  • @sanguchito7381
    @sanguchito7381 5 ปีที่แล้ว

    Since we're at it, the best way to implement a bridge door alarm, IMO, is to use a normally closed reed switch between the battery and the Arduino, so it cuts the power entirely when the door is closed and turns it on when open. Then an 8 second deep sleep before starting to beep does the rest. I have an ATtiny85 that's been working like that for ages and ages.

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

      I'm glad yours works fine, Dan, but in my case I have a different Fridge Door Alarm entirely because my door closes just enough to turn off the light but not enough to shut. So I have a magnetic detector (reed switch, like you) that closes only when the door is actually closed, not when the light is off. Ironically, it is that very light switch (actuated by the door) that has just enough resistance to stop the door closing. Mine also makes a trilling noise when the door opens and closes, which both dog and cat have come to recognise! So I also implemented a touch point so I can open the door without the trilling noise! It's all very simple and works like a dream!

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

    It should be enough to "set_sleep_mode()" once in setup (unless you want to change the sleep mode later). Then use "sleep_mode()" in the loop. It does the bit setting for you. No need for any other commands.
    I usually have a global variable (make sure it's volatile) that is set to a certain value in the different ISRs (giving those values "names" with an enum helps with readability a lot). Then immediately after "sleep_mode()" (often the very first instruction in the loop) I check the value of the global variable. That way I can easily ignore interrupts that weren't triggered by me (but by something in a library for example) and go right back to sleep (if you call return within the loop it starts the next iteration of the loop). Or I can execute different things in the loop depending on the interrupt (because you always want to be your ISRs to be as short as possible).
    Example:
    enum interrupts: uint8_t { // this is essentially giving names to the values 0, 1, 2, .... for more readability
    NONE,
    COUNTER,
    WDT
    };
    volatile uint8_t last_interrupt = NONE;
    void setup() {
    set_sleep_mode(SLEEP_MODE_...);
    ....
    }
    void loop() {
    sleep_mode();
    if (last_interrupt == NONE) { return; } // run next iteration of loop if interrupt wasn't set to something we want to handle
    last_interrupt = NONE;
    ....
    }
    ISR (TIMER2_COMPA_vect) {
    last_interrupt = COUNTER;
    }

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

      Interesting! I like this and will experiment in due course. Thanks for posting and sharing.

    • @superdau
      @superdau 5 ปีที่แล้ว +1

      @@RalphBacon
      I don't know if you've seen this page already:
      gammon.com.au/power
      A nice collection of power saving hints for the AVR/Arduino.

  • @MrEdwardhartmann
    @MrEdwardhartmann 5 ปีที่แล้ว

    Besides always including a reset and an ISCP, I have started pulling unused pins out to a 2 by X header so I can use them as configuration input pins with little jumpers. For something like your frig timer, this could be used to set how long you want to wait before sounding the alarm. If I have more room, I add a dip switch so I don't have to look for those little jumpers.

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

      A great idea, Edward, and you'll like my next project which contains those little DIP switches!

  • @goamarty
    @goamarty 4 ปีที่แล้ว

    this switch for the light permanently on has special purpose. normally you have it on fridges with an integrated freezer compartment. You use it if the unit stands in a cold place, e.g. a basement. when it is colder than the set temperature of the fridge part. Because there is the thermostat sitting. The freezer part is not individually regulated. In a cold environment the fridge would not need cooling so the compressor would never run and the freezer would thaw - BAD. now you switch on the light and the compressor starts because of the extra heat. So it can also cool the freezer part.

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

      I can't tell whether you are serious or not! I would have thought that a separate thermostat for the freezer would be simpler to install than relying on the heat from a fridge bulb! But if that design saved 0.00001 cents then the manufacturer would probably do it!

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

    Life is a good learner. Thanks for sharing useful tips to avoid these kind of pitfalls.
    Question; For the ICSP signals, is MISO strictly needed when programming, if using header pins and you are short of space or constrained in some other ways to use the standard 6-pins socket?

    • @MaxintRD
      @MaxintRD 5 ปีที่แล้ว

      MISO is used when programming via ICSP. You can also use a bootloader and program via the RX/TX pins. With ground and Vcc that's only 4 pins instead of six, which you can also use for debugging or other output monitoring.

    • @jasonrussell6534
      @jasonrussell6534 5 ปีที่แล้ว

      In space constrained boards I often use tag-connect footprints and make a cable for programming. It uses pogo pins and has a small footprint. 2x3 for stm32 works for Atmel as well. No components to place either.

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

      Maxint is correct that only 4 pins are required to program (and debug) the chip as long as you have a bootloader already present with NO plans to change it. Yesterday I had an issue with a different project: one of the chips would program fine but would NOT run in my circuit. Why? I had left the brown out detector (BOD) active whilst trying to run at 1.8v! So I had to change the bootloader (well, the fuses) and that does require ICSP.
      Pogo sticks also a good idea but not cheap. But then only one cable is required, I suppose, so cheap overall.

    • @Cptnbond
      @Cptnbond 5 ปีที่แล้ว +1

      @@jasonrussell6534 Thanks for the info about tag-connect. Another alternative is "SOICbite" Programming/Debug Connector Footprint, a Hackaday project. According to its description, it's cheaper than a Tag Connect and may even be smaller.

  • @JLaurel
    @JLaurel 3 ปีที่แล้ว

    The way you bend those pins, you where 😡😤
    Thanks for the video

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

      I'm pretty sure those pins were bent by the delivery service; they don't take care of packages and if they are not secure and robust they will get easily damaged from China. But it was not from me!

  • @ronen124
    @ronen124 5 ปีที่แล้ว +1

    hi Ralph, you reused your printed board with the same design to a different project just by changing the code, nice 👏👍

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

      Yes, it's quite nice when that happens, unexpectedly too!

  • @alexsemine1
    @alexsemine1 5 ปีที่แล้ว

    Damn, that laugh at 8:30 scared the shit out of me

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

      At least it ensured you weren't nodding off, Alex, so job done! Ha Ha!

  • @CTCTraining1
    @CTCTraining1 5 ปีที่แล้ว

    Fascinating video, many thanks. Btw ... did you test what sounds you can hear from inside your mates fridge? Perhaps there is a plan B with a vibrating actuator affixed to the inside of the fridge?

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

      The sound it makes is generally audible, Chris, but not if you're in the living room with the door shut and the TV blaring away. However, under normal use, that is, lounge door open, moving around the house or between the kitchen and lounge it could be plainly heard. But I like your idea of a vibration motor, like those you get in mobile phones, that is definitely Plan B, thanks for posting.

  • @ExarchNZ
    @ExarchNZ 5 ปีที่แล้ว +1

    You have probably addressed why in anthor place, but why did you not use SMT parts?
    You probably could have fitted the batteries next to (or either side of the PCB) with the saving in space.
    Nothing crazy small 0805 passives and the transistor would be sot23, TFQP MCU.
    Edit: Here it is in SMD. easyeda.com/blue.fire.falcon/bacon_ldr_mon ...its 50x30 so alot smaller than that one.

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

      NIcely done, the SMD version that you link to. That said, I am very conscious that beginners are not keen on SMD soldering and much prefer THT which anyone with a soldering iron can do. Can you imagine beginners soldering a TQFP32 version of the 328P? So that was my main reason.
      And, in this case, I (thought I) had more than enough space in that case! Using the 3xAAA battery pack (instead of the 3xAA) and reducing the size of the buzzer (so it is not so tall) has solved it for me and has made me remember to check the 3 dimensions of my project next time. Dodged that bullet.
      I notice that you are driving the buzzer from a transistor, whereas I drive it directly. It was supposed to be a piezo sounder that takes next to no current but these (active) buzzers seem to be magnetic and draw quite a current; luckily not more than the max 40mA that a single pin can handle.
      I have some SMD projects coming up, keep tuned and thanks for posting (and that SMD design, perhaps I should link to it?)

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

    Hi Ralph, great to see the project just prior to installation and you made a great work of the dimensions, this is an area where I need to concentrate more as things rarely fit and line up!
    your are using 4.5v for your project is this at 8Mhz ? I will get round to sending you some pics of what Im up to and will value your response, but i'm holding fire because I now want to do some comparisons side by side with the 328P in the DIL package as well, however I ordered 5 pieces from ebay several weeks ago and the max delivery date is up in 2 days time and I guess I have to open a dispute, something I haven't done before, or do you think I should wait a little longer? not sure what to do as this is the first time it's happened, have you experienced things not turning up? however, great video and as always I look forward to the next....I had a little giggle when you talked about the "LED's" as I too would put in LED's just because " I can"... now I tend to just put a SMD LED on the power rail (s) just for that " at a glance " debug...cheer's.

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

      Indeed Andy, I'm running at 8MHz with this 4.5v battery pack (fridge alarm got installed yesterday at my friends house, as he's an electronics engineer by trade I hope it works for a long time!). So...
      So. it's interesting you should mention 328P DIL packages. Do you use any Arduino UNO boards with such a chip (ie _not_ an SMD QFP-32)? If so, *contact me on the usual email* you may be interested in something I have. Regarding your delivery (from China I assume) contact the seller NOW to raise your concerns and see what they say. They may re-send, refund or ask for longer. I give them the benefit of the doubt for a couple more weeks if it happens to me (on AliExpress normally) but after that I want a refund!
      And who doesn't need LEDs in a project, even if the project is running on a 1.5v battery (see tomorrow's video for more on this).
      Good to hear from you!

  • @keitholiver3981
    @keitholiver3981 5 ปีที่แล้ว

    Hi Ralph nice project with lots of possibilities, a PCB would be nice to experiment with

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

      Send me an email with your details, Keith, my email address is in the About tab of this channel.

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

    Loving the content Ralph - a question. Do you have a layout file for ATMega328p breakout board to save me having to design one (Gerber file?) Cheers

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

      I'll check (I take it you have checked my GitHub already)? Nudge me if nothing appears there in the next few days.
      Are you sure you want this exact PCB or any breakout board for the DIP version of the ATMega328p?

  • @superdau
    @superdau 5 ปีที่แล้ว

    Btw. the edge interrupt should work on an atmega32 in both directions (what do you mean by "it doesn't say it works reliably"? It says it does in the datasheet). Are you sure the output of the PIR sensor is push-pull and not just some kind of open-collector output? You don't want a floating pin.
    What are the voltage levels on the output of the pin? Maybe they are just too low for the AVR to be read as "high".

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

      I was using HIGH as the trigger value which is not (officially) supported; I could have used RISING, I suppose? The PIR is definitely a true HIGH or LOW, no floating pins (it's the same device I used in the Home Alone project, so I really checked that out). It works very reliably now so LOW (and perhaps FALLING and RISING too) are the options to choose it would seem.

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

    thanks Benny ;>)

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

      Benny is purring like a kitten, thanks for posting, Danny!

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

    Hi, please may you tell me which kind of Multimeter you are using? Thank you so much and my greatest compliments for your channel

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

      I have four multimeters (overkill, I know). One I use a lot is the Kaiweets HT118A. Similar looking and performing is the AstroAI DM6000AR. Two smaller meters (ideal for a crowded workbench or your pocket) are the Kaiweets ST600Y and the ANENG AN8008.
      I don't know why I keep using the HT118A, just one of those things! The others are pretty much equal in terms of performance although the latter two have fewer control and might be easier to use by a beginner (more auto-ranging).
      As I said in my multimeter review, it's not worth spending huge (Fluke-type) money if you are just a hobbyist, when $20-50 will get you more than you will ever need.
      Here's comparison page I just found too: bit.ly/4amiQdf

    • @MrZiolelle
      @MrZiolelle 10 หลายเดือนก่อน +1

      @@RalphBacon thanks so much, very kind!!

  • @yogeshitaliya473
    @yogeshitaliya473 5 ปีที่แล้ว

    Have nice day sir

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

      Thank you Yogesh, I will try to do that!

  • @Thingstest-rl8xu
    @Thingstest-rl8xu 5 ปีที่แล้ว

    The tool shown at 12:08 is a PLCC Extractor used on Square 20 to 128 pins PLCC chips _buried in_ the sockets. In other words use the right tool. Example
    www.amazon.co.uk/Aquiver-Protection-Extractor-Stainless-Extraction/dp/B073RDS57B
    Can get better ones with a clamp screw that is much harder to slip off.

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

      I'm almost certain someone else suggested this too because I already have on order. We shall see if I better success with DIP28 chips with the new tool! Thanks for the confirmation; if this new one doesn't do the job I shall look around the larger suppliers, after all there must be a million engineers doing this all day!

  • @Corgitronics
    @Corgitronics 5 ปีที่แล้ว

    Nice little project with a versatile board.
    You can boost the volume of the piezo element by adding an inductor in parallel. Some information on that is on the forums at: www.eevblog.com/forum/projects/driving-a-piezo-hard/

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

      That would be very useful, I shall read up about that immediately, thanks for the link.

  • @daveharkin4731
    @daveharkin4731 5 ปีที่แล้ว

    nice video, but I was wondering could you have used the attiny85 chip for this project would it have used even less power?.

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

      Although I've used ATTiny85 in the past (and done videos on them too) they quickly run out of pins and capabilities, I find. Even though I got both I2C and SPI working on one it was not as easy as using a 328P chip. If this were a commercial product then doubtless that question would be asked and the answer might well be 'yes'!

    • @Ed19601
      @Ed19601 5 ปีที่แล้ว

      I love the Attiny85, but its too damned expensive. The DIL is about 1.25 USD and I have seen prices over 3 dollars. With a bit more you have a fully fledged Arduino pro mini.
      In fact, even the Atmega168 DIP is like robbing yourself: it costs about 1.50-2 euros and a pro-mini 168 about 1 euro.
      If I would be designing a PCB like this, it might be worth considering designing it for a TQFP32 package 168. That costs 50cnts. An attiny85-20su will still be 65 cents so way overpriced.
      However.... could you get an attiny13-su (23 cnts) to do this

  • @Hasitier
    @Hasitier 5 ปีที่แล้ว

    Hey Ralph. Interesting concept. I might steal it to make a device to take a look on when my daughter gets up at night. She is now a bit over 2 years and will get an open bed soon where she can get out if she wants. But we as parents would like to know that so we can help her getting on the toilet or prevent her doing potentially dangerous things. So I think of placing a similar device on her bed room door but only to react if the light is off. So I don’t need to switch it off when we are awake. The sounder could be remote in our bedroom then. What do you think about that idea? And do you also have children? Greetings from Germany. Michael.

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

      You could easily do that, Michael, but would require the monitor (in your bedroom) to be wirelessly connected to the sensor (I'm assuming you don't want long wires everywhere). The sensor could be battery operated and only triggers when there is movement but the receiver would need to be plugged in as you won't know when the signal is going to arrive. I'd probably use a 433MHz transmitter/receiver (see video th-cam.com/video/tl0FkYWhhsk/w-d-xo.html) for simplicity.
      Or just lock her bedroom door. What? Not so good an idea?

    • @Hasitier
      @Hasitier 5 ปีที่แล้ว +1

      Ralph S Bacon hey Ralph, thanks for the answer. Locking the door is no option (out cat would make terror if she cannot go where she wants, also my daughter doesn’t like when the door is shut). I also thought about using a 433 or a nrf type of Transmitter. I will think about it and try this out. The sender needs to be battery powered, that’s also why I like your idea and code so much. Where the receiver would be is a power point nearby so that would work.

  • @crayzeape2230
    @crayzeape2230 5 ปีที่แล้ว

    12:01 Your chip extractor tool is a PLCC (plastic-leaded chip carrier) extractor, used with four sided square chips in four sided square sockets.
    For DIL chips like the ATMega328P you're playing with, it's better to use either a simple U Type IC Extractor, or a slightly more fancy GJ-3 chip extractor tool (most ads say SMD which is rubbish, they are for DIL chips). Example links follow, of which I have no affiliation:
    U Type IC Extractor: www.aliexpress.com/item/4000182122425.html
    GJ-3 chip extractor: www.aliexpress.com/item/32578718826.html
    Edit: GJ-3 is for 14 - 22 pin chips only, so you'd use the U type extractor in this case. Ignore the GJ-6 if you come across it, as it's for wider chips.

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

      Now this is really useful stuff. I NEED a better chip extractor. That one I showed I've had for donkey's years so I shall search for the ones you mention. Thanks for the links, appreciated.

    • @crayzeape2230
      @crayzeape2230 5 ปีที่แล้ว +1

      @@RalphBacon By "donkey's years", you mean "back when they were super expensive". I bought a PLCC extractor 30 years or so back for $70 AUS, things have certainly changed since then. Thanks for the continued videos Ralph.

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

    And, she said, this is why we do design reviews. Feel your pain, brah.

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

      Indeed, Dale, but I had a post-implementation review (with Benny) and we've noted all the things that could have gone better and which ideas worked well, so experience gained all round.

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

      @@RalphBacon Yes. Knowledge gained all 'round. I now have ICSP headers on the two boards I'm in the process of laying out. Many thanks.

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

      @@RalphBacon PS: how do you get Benny to contribute? Loki and Cy don't seem to care very much.

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

      Benny is my boss when it comes to things C++ and Arduino. He calls the shots.

  • @Tekwyzard
    @Tekwyzard 4 ปีที่แล้ว

    I think the switch that makes the fridge's light stay on is a particularly weird way of implementing 'Fast Freeze' in fridge freezers where the thermostatic sensor is in the fridge, versus it being in the freezer. So instead of fitting a low wattage heater to keep the freezer sensor artificially warm, and thus cool the the freezer down more, they use the lamp in the fridge to keep the fridge sensor artificially warm to achieve the same end.
    I changed the bulb in a friend of mines fridge the other day, and was similarly baffled that it had a very easy to accidentally switch on door switch override, which I only noticed because I checked to see if the light, which hadn't worked for years, went off when the door was closed. A totally stupid setup, coz without having read the destruction book, most folks wouldn't notice it, or even be able to figure out what the switch is doing, and it'd cost 'em loads in extra electricity costs.

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

      I worry less about the cost of running the bulb (it's pretty low wattage) but more about the heat it generates thus causing the fridge to work overtime. The obvious answer is to replace any incandescent bulb with an LED equivalent. I've still no idea why there would be a permanently on switch for the light, though.

  • @lezbriddon
    @lezbriddon 5 ปีที่แล้ว

    might see about moving my rfid lock to interrupts/watchdog. you can find a nice story online about how not to do watchdog timers... but the short version, car manufacturer to save money removes hw watchdog timer in car engine management, car engine management has an issue in the loop for throttle position, and can 'ramp up and stick' at 100%, this should be picked up by the sw watchdog, but its only attached to the one that times out like every 15-30 seconds, and if you press the brake pedal, it resets it leaving the throttle still stuck at 100%. i wont mention the manufacturer that starts with a T ... people died because of this ''unintended acceleration''

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

      Isn't it always about money, Lez? Rather than doing the right thing they save a few cents and cause pandemonium. [Shakes head in disbelief].

  • @juanrodriguez6656
    @juanrodriguez6656 3 ปีที่แล้ว

    Thanks

  • @albanwincott2585
    @albanwincott2585 5 ปีที่แล้ว

    hi ralph great video how about combining sketches and using tabs on arduino ide so we can use some of your codes

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

      The sketches are now on my GitHub (I missed that step, sorry) so you can take the code, Alban, and learn from it what you will and amend it to suit your needs. I hope that helps.

    • @albanwincott2585
      @albanwincott2585 5 ปีที่แล้ว

      @@RalphBacon i am using a mega to control servos around a room so need to control say 10 on mega and 10 on a nano using either i2c or rs485 but cant combine sketchs for servo control and rs485/i2c .

  • @ytfp
    @ytfp 5 ปีที่แล้ว +1

    Only makers can make a problem out of anything, I know I am guilty of it, till I started catchin on to my own overcomplication. But yea... Chinese are laughing because they would use a 0.2 cent microcontroller specific to this task rather than our full blown atmega328 overkill. Mothers out there are laughing because they would just buy a $1 plastic childproof latch, 3d printer nerds would just make their own childproof latch, grandpa would use and old rubber band from the garage, grandma, who is always in the kitchen it seems, is not going to tolerate the cat in the kitchen and the cat knows it. Only makers can literally take a free or $1 project and turn it into a mortgage on the house. It might be they spend so much time on electronics that there is no time to train pets. Its quite the Ouroboros, just made out of jumper wires.

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

      Only makers can invent a solution for any problem, I would say! Remember, too, that whilst I would have made a version of this anyway (I have all the parts) it was a chance for my sponsor to show off some PCBs and for me to educate makers in the two ways that Deep Sleep can be interrupted. And all for the price of large Cinnamon Latte at my local coffee house!

    • @ytfp
      @ytfp 5 ปีที่แล้ว +1

      Its a great project and good learning experience I bet as well.

  • @deslomeslager
    @deslomeslager 5 ปีที่แล้ว

    Why not run it off of a solar cell? No batteries needed.

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

      If you were to run this off a solar cell (during the daytime only then, I guess) you wouldn't need Deep Sleep as you are not trying to conserve battery power. This is really aimed at battery-powered projects where minimising the current consumption is paramount. As my Benny PIR project is in a dark airing cupboard (or dark fridge) I don't see a solar cell working there, you see?

    • @deslomeslager
      @deslomeslager 5 ปีที่แล้ว

      @@RalphBacon You are right. However I was aiming at the fridge story. The solar panel (fitted just behind that lamp which needs to be turned off) will make the buzzer go off after 1 minute by powering the circuit. And it will always go silent, when the lamp is switched off. (I understand it goes against the intention of your build, sorry for that. It is just to say that there are other ways to solve the lamp-in-the-fridge problem).

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

      That is really thinking outside the box, very ingenious indeed. Unfortunately, solar cells are not the cheapest thing in the world but I have a couple of smaller ones so I might try out whether the lamp in the fridge is enough to power on a circuit like this (4.5v at 4mA or so). Thanks for the slightly, off-piste but very interesting suggestion!

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

    Just BTW - the "light always on" switch would be for those who are prohibited form operating electrical devices... primarily fundamentalist Jews, on the Sabbath. Without the bypass, they wouldn't be able to open the fridge without violating their covenant with God!
    WHERE the Sabbath mode switch is in the fridge might well be poor design, but having one does make sense.

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

      A serious question: if the Torah was written so long ago (6th century BCE), how did they know about electricity and switches? Sounds like a modern interpretation, but I'm happy for that explanation about always-on fridge lights! But Siemens could have wired it so that it was always-off too and with the same benefit?

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

      @@RalphBacon Yes, an nterpretation of how to apply ancient laws against "work" on the Sabbath to modern technology. Apparently it's OK to have the fridge running to keep your food fresh, but not to flip a light switch (or drive a car, or turn on a stove, or make a phone call). It"s all a bit beyond me, but then, I'm not a Talmudic scholar... just a guy who noticed the "Sabbath mode" setting in the manual for my own fridge, and looked it up.

  • @mahlapropyzm9180
    @mahlapropyzm9180 5 ปีที่แล้ว

    The non-Arduino solution for the fridge would be to simply disconnect the override switch.
    Pah! Technology, who needs it?

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

      I'm not sure I'm with you Mahla; if we disconnect that switch where does the Arduino go? You don't mean dispense with the Arduino project altogether do you!!!!??? [Brain reboots]. Actually he looked at doing this but the switch is buried into the side wall of the fridge and can't be dug out easily at all. And at least now he does have a door open reminder too!

  • @richardgrier4721
    @richardgrier4721 5 ปีที่แล้ว

    Awakened or awoken (sorry, the pedant in me).

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

      Either is acceptable, Richard. He was awakened by the sound of birds. He was rudely awoken by his alarm clock. Google search says it might be regional as to which one is preferred (country or within your country). Now if I said that the 328P was waked up... well...

    • @richardgrier4721
      @richardgrier4721 5 ปีที่แล้ว

      @@RalphBacon I agree with awoken (British/European) and awakened (American). Woken causes me heartburn.

  • @RoamingAdhocrat
    @RoamingAdhocrat 4 ปีที่แล้ว

    Bit simpler to disconnect/short the switch in the fridge than to implement a battery-powered beeper, isn't it? Although it would be a much shorter and very boring video ;)

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

      If I disconnected (or shorted) the fridge's switch then the light would either not come on at all or stay on all the time. And no video, just as you say!

  • @drwhonemo
    @drwhonemo 5 ปีที่แล้ว

    amusing ! over engineering , lets stay complicated , replace the fridge switch with a relay activated by a PIR with or without an arduino...
    int val1 = 5;
    #include
    int wakePin = 2; // pin used for waking up
    int sleepStatus = 0; // variable to store a request for sleep
    void wakeUpNow() // here the interrupt is handled after wakeup
    {
    }
    // the setup function runs once when you press reset or power the board
    void setup() {
    Serial.begin(9600);
    delay(2000);
    //pinMode ( 4, INPUT);
    pinMode ( 9, OUTPUT);
    digitalWrite(9, HIGH);
    pinMode (13, OUTPUT);
    pinMode(wakePin, INPUT);
    attachInterrupt(0, wakeUpNow, HIGH);
    }
    void sleepNow() // here we put the arduino to sleep
    {
    set_sleep_mode(SLEEP_MODE_PWR_DOWN); // sleep mode is set here
    sleep_enable();
    attachInterrupt(0,wakeUpNow, HIGH);
    sleep_mode();
    sleep_disable();
    detachInterrupt(0);
    }
    void loop() {
    if(digitalRead(2)==HIGH){
    val1=10;
    digitalWrite(9, HIGH);
    }
    if(val1

    • @BaronVonBiffo
      @BaronVonBiffo 5 ปีที่แล้ว

      Or just superglue the switch to prevent it operating. ;)

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

      It all depends on what you mean by complicated! This project's PCB was sitting there and could be easily converted into a light on detector (whilst using WDT and Deep Sleep), sounds like a no-brainer to me!

    • @drwhonemo
      @drwhonemo 5 ปีที่แล้ว

      @@RalphBacon please accept my apology. my comment was intended to be funny. keep the good work , i am learning a lot watching your channel.

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

      Glad to hear it! And no offense taken, sometimes we Arduinites _do_ sometimes over engineer solutions but this one is fun and cheap so if beginners are looking for something to build this might be it! Well, the Fridge Light alarm version, anyway... Keep watching, thanks for clarifying, good to hear from you.

  • @markgreco1962
    @markgreco1962 5 ปีที่แล้ว

    Thanks

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

      You're Welcome, Mark, I hope you enjoyed it, thanks for posting.