#242

Поділитися
Вставка
  • Опубліковано 21 січ 2025

КОМЕНТАРІ • 161

  • @geralltgriffiths7772
    @geralltgriffiths7772 2 роки тому +6

    Back in the day, some 40+ years ago, my first job was designing circuits for the military (I don't think I still have to shoot anyone, now I've said that!). One of several parameters our designs had to satisfy was mean time between failures (mtbf -- a measure of reliability). Although it was an obvious candidate for a computer application, none existed --- so there was a team that looked-up the figures for every component in our design and then produced an aggregate theoretical figure for the entire circuit panel.
    One lasting recollection that I have is that LEDs absolutely tanked the mtbf figure. I also remember that my design would have been thrown-out, if I hadn't limited the current to around half of the data-sheet nominal figure for the LED (yes, that was on the vetting-procedure checklist).
    Although it was a complete pain at the time, I now appreciate the "design for resilience" mantra that was drilled into us -- it instilled some intuitive thought processes that have been remarkably portable to many other disciplines throughout my working life. But they will never be an antidote to pedantry, nor allow me to take anything for granted!

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Don't Shoot Me, I'm Only The... Software Engineer! (Sorry,🎶Elton).
      Yes, that LED (in fact just about all the ones I've ever tried) might have a max forward current of ~20mA but are very bright at half that (or less). I've even got some that are great at 2mA.

    • @TheEmbeddedHobbyist
      @TheEmbeddedHobbyist 2 роки тому

      Used to spend many days with a calculator to work out MTBF’s of circuit boards, was a lot easier with mil spec resistors and capacitors and 54XX logic chips where you just had to look up the figures.
      Got a lot harder when they stopped making mil spec components and you had to use extended industrial grades to get the temperature range. It was getting harder to get the -55 to 125°C let alone with reliability data.
      MIL-HDBK-217 was a little light reading. It was fantastic when we finally got some software to take a lot of the grind out of it. Happy days not!

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      The stuff we buy now (we hobbyists) is about as far away (on the quality scale) from mil spec as you can get. I've just acquired some small 2.4GHz antenna and the quality is truly shocking. Probably military rejects 🤣

    • @TheEmbeddedHobbyist
      @TheEmbeddedHobbyist 2 роки тому

      @@RalphBacon why not just make your own, not much to a simple antenna and at 2.4GHz you don't need much wire :-)

    • @RalphBacon
      @RalphBacon  2 роки тому

      True, but I wanted it to look more than just strung together with a wire sticking out the back. Now I will have a professional looking antenna that you can't move because it is so stiff 🤦‍♂️

  • @paulyorke1437
    @paulyorke1437 2 роки тому +3

    Hi Ralph. Interesting video as usual. Leds are usually bullet proof but for sure without a series resistor your were probably asking for problems. Surprised it lasted 3 years!! The mention of poor range on the NRF2401L was interesting to me as I've experienced that issue myself. I found a simple answer to the problem. Solder a 50mm to 60mm length of fine wire to the end of the printed circuit areal on the NRF2401L pcb and the range increases substantially. I've never actually measured the difference but the range increases from a few yards to a dozen or more. I noticed that the range is also badly affected by the proximity of other active components or metal casings. The short lengths of wire on both TX and RX really works. Enjoy.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Normally I have not problems with the range of either BT, ESPXXX Wi-Fi or nRF24L01 modules but my last couple of project definitely benefited from the "external" antenna.
      Now, Paul, your suggestion sounds interesting yet weird (no😲offense): isn't the antenna supposed to be a multiple of the wavelength, so adding "short lengths of wire" is a bit hit and miss. The correct length should be 12.5cm or exact fractions of that (eg half, quarter, so 6.25cm or 3.125cm. The smallest size is what they probably cram onto the PCB)?
      I will have to try this, thanks for the suggestion!

  • @LauwersFreddy
    @LauwersFreddy 2 роки тому +3

    Ralph, On the D1 mini boards with external antenna you still have to re-solder the 0 ohm resistor ro switch from the internal antenna to the external one I believe. Thank you for making these videos!

    • @RalphBacon
      @RalphBacon  2 роки тому

      That is correct, Freddy, and there are some boards that ONLY accept an external antenna and the worst thing you can do is run it without an antenna attached! Standing/reflected waves could fry the transmitter circuitry.
      On the nRFL01s with external antenna capability (like the ones I showed and am using in my Storage Bin project) there is also a 0Ω resistor to move (so tiny, probably smaller than a 0402, a solder blob is easier).

  • @superdau
    @superdau 2 роки тому +6

    There are two very fundamental mistakes in that 4-component circuit.
    First, LEDs absolutely *need* current limiting. I'd go as far as saying no exceptions. In the simplest case that is a series resistor. The way you added it, the LED is effectively clamping the voltage to the PIR to the LED's forward voltage (maybe 2 volts at its rated current, in this completely overdriven case maybe 2.5V, and something close to 0V after the short circuit case). You *MUST NOT* drive an LED by directly applying a fixed voltage.
    Second, your choice and placement of transistor. You do not place the load on the emitter side of a transistor, if you want to switch its power. The Emitter voltage is always at least 0.6V lower than the base voltage (in case of an NPN; the voltage difference will be even higher for higher power transistors). If you pull the base to 3.3V the emitter voltage can not be higher than 2.7V. That's just how transistors work. Also your base current has to go through the load, if it is connected to the emitter. That can cause all sorts of issues if the load has a varying current draw. Use a PNP transistor here.

    • @chrisarmstrong8198
      @chrisarmstrong8198 2 роки тому

      Agree on both points, although there actually is a resistor in series with the LED. It is cleverly disguised as the 10K base resistor divided by the transistor current gain (ignoring the PIR load).

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      To both comments (so far): agreed and agreed. I hang my head in shame. I am not worthy. 🤦‍♂️😕😢

  • @FindLiberty
    @FindLiberty 2 роки тому +1

    Pausing the video at the beginning of the schematic diagram gave me an April Fools Day chuckle.
    That three input AND gate and upside down drawing convention was amusing for a few seconds.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Yes, it made me chuckle and then sob into my handkerchief, too.

  • @objection_your_honor
    @objection_your_honor 2 роки тому

    I bought a Di Mini years ago and it was always in my face.
    I wanted to use it a few weeks ago, and couldn't find it.
    Now I know why. You took it and sent it off to Germany!

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Oh no! I was hoping you would never notice that it was gone. Well, you're definitely not getting it back. But you can have the yellow LED if you want (no longer works at all after I shoved 30mA through it whilst testing). 😂

  • @avejst
    @avejst 2 роки тому

    impressive, that the LED survived 3 years with no current limiting resistor.
    Thanks for sharing your experience with all of us 👍🙂

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      That is indeed true, Asger. A pity it didn't last another 3 years!

  • @Tsnafu
    @Tsnafu 2 роки тому +1

    That "little press stud" connector is a UFL - used quite a lot nowadays on RC receiver antennas. You can get very good 2.4ghz UFL antennas from Mouser for under £2 each (Mouser Part No 673-W3918B0100)

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Thanks for the heads up 👍🏻. I was also after an SMA-compatible M-F extension, so I don't have to screw the antenna directly to a PCB (I like the flexible UFL-cable options better). It seems they are available in many lengths and one might help me mount my aerial on a BT project in a better position. Thanks again! 😜

  • @bobsort
    @bobsort 2 роки тому +2

    I haven't done electronic (other than MC) for almost 30 years. however If remember correctly most components can operate out of spec for a period of time (milliseconds or microseconds) before they damage permanently, I guess that LED was passing through too much power but with pulses that wasn't enough to break it, until it finally gave up due to repeated out of spec running. either way I consider it a resilient LED that lasted that long! I'm pretty sure, you will need a current-limiting resistors in series with LED all the time.
    Also smoke from your usb cable, clever, for a second I thought it was real 🤣

    • @RalphBacon
      @RalphBacon  2 роки тому

      Yes, I think everyone is pretty sure that a resistor was required here. Certainly a resilient LED to last that long.

  • @JulioSalim
    @JulioSalim 2 роки тому

    Probably the most expensive LED I've heard of 🙂 Thanks for your always good content!!!

    • @RalphBacon
      @RalphBacon  2 роки тому

      It really is! £8 + €17 is about... $28 (talk about mixing currencies).

  • @fernandoi8958
    @fernandoi8958 2 роки тому +1

    The npn transistor drawn bellow hurts my brain... btw I have seen a lot (4+) 7 segment displays going bad over some years and would love to know why that happens... one of the leds simply dies for no reason... I always thought leds were supposed to last a life time, and because I have no access to the circutry involved I have no idea whats may be happening to these displays... The 7 segment displays that have dead leds are from microwave oven / stove / elevator...

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      When I was 16 years old, I built a 7-segment digital alarm clock. It was a wonderful product and I "hacked" it to do more with alarms and so forth. I kept it far beyond its normal sell-by date, but one after the other the soldered-on 7-seg LEDs started to die. They were not overdriven. I could (probably) have found some suitable replacements but the effort outweighed its (then) usefulness, when you could buy such devices for less than £5. Sigh. If the LEDs had continued I'd probably still have it today 😆

  • @TheEmbeddedHobbyist
    @TheEmbeddedHobbyist 2 роки тому +1

    Interesting delay switch, With the transistor off the emitter is pulled to ground by the sensor
    As the base rises to about 0.6V the transistor will start to switch on current fill flow and the emitter will start to rise. But it can only rise as fast as the capacitor charges up as it will try and keep the 0.6V VBE at the threshold point. But It might even cause spikes as it could turn on fast then run out of base drive and turn off, now it got base drive again so it will turn back on and so forth.
    Might have been better to use a PNP as a high side switch than an NPN which is better for low side switching.

    • @RalphBacon
      @RalphBacon  2 роки тому

      A P-channel MOSFET would have been better to switch the high-side but when I designed this I was unfamiliar with those components. I could even have used a small (TO92) N-channel MOSFET (eg 2N7000). Many options. Anything other than this!

  • @steveroberts1861
    @steveroberts1861 2 роки тому

    As usual an informative video. Thanks Mr Bacon.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Glad you enjoyed it, Steve!

  • @3v1Bunny
    @3v1Bunny 2 роки тому +2

    It is a diode.. and I see them fail often. To high forward current will tend to result into shorts

    • @RalphBacon
      @RalphBacon  2 роки тому +2

      A pity it shorted rather than going open circuit in this case.

  • @garycrockett4477
    @garycrockett4477 2 роки тому +1

    I find I have to listen carefully. Lifelong resident of Arizona, USA, "chalk and cheese" threw me! I had to look it up. Oh, I see. Like "apples and oranges". Thanks for the videos. I'm enjoying them!

    • @RalphBacon
      @RalphBacon  2 роки тому +2

      I just looked up "chalk and cheese" in Webster's American Dictionary, Gary. Guess what? It's not listed 😲 Who knew this was a British English expression?
      Still, I'm happy to expand your understanding of proper English - hey, we Brits invented it, right? From Old Norse, Viking, a dab of Roman... what do you mean, it's a mongrel language? 🤣

    • @garycrockett4477
      @garycrockett4477 2 роки тому

      @@RalphBacon I've long maintained that I don't speak English - I speak American. Give us another couple hundred years, and we ( Brits vs. Americans) won't be able to understand each other! Go figure!

    • @RalphBacon
      @RalphBacon  2 роки тому

      "Go figure"? That's as bad as saying "gotten"? Or "mom". I don't think it will take 200 years for us to speak different languages. But by then we (the UK) will be the 51st State of the United States and we will all speak "American" 😲🤣

  • @fredflintstone1
    @fredflintstone1 2 роки тому +1

    was that smoke from the 5 volt lead when powered up check video 11:21?

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Was it? Well, was it? Was it REAL smoke? Was it? Or was Ralph playing around with some digital effects just to amaze and mesmerise his audience? Well, was it? 😁

    • @kissingfrogs
      @kissingfrogs 2 роки тому

      @@RalphBacon I assumed it was effects but then it looked real, then fake, then real.

    • @fredflintstone1
      @fredflintstone1 2 роки тому

      @@RalphBacon One day Ralph it maybe become true😉 remember the story of the boy that cried Wolf

    • @RalphBacon
      @RalphBacon  2 роки тому +2

      Funnily enough, I used to be a werewolf, but I'm alright noooooooow 🐺

    • @TheUnofficialMaker
      @TheUnofficialMaker 2 роки тому +1

      good eye! looks fake to me..that Rascal Ralph!!

  • @peterthinks
    @peterthinks 2 роки тому

    I had an LED that was strange right out of the box. When I disconnected power to an array of them this one LED was somehow providing power to the others thru the ground? Odd. I took out the LED labeled it "Unicorn" and still don't know what to do with it.

    • @RalphBacon
      @RalphBacon  2 роки тому

      It probably has magical powers. Light it up and chant "Nom, nom, nom" a few times and all your worries will be gone. So will your friends, but that's the price you pay for a magical LED.

  • @davidwillmore
    @davidwillmore 2 роки тому +2

    At one point you seemed to be surprised that you didn't see 3.3v into the PIR sensor. You should never see more than 2.7v there. Because the base can never be greater than 3.3v and no base current will flow until there is a >0.6v drop from base to emitter. That means you will never see the emitter >2.7v.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      I'm so used to MOSFETs these days that have (effectively) no resistance that the use of BJT in this sort of circuit feels really odd!

  • @thisoldjeepcj5
    @thisoldjeepcj5 2 роки тому +1

    Was that smoke at 11:27?

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      It might have been. Look closely!

  • @thisoldjeepcj5
    @thisoldjeepcj5 2 роки тому

    Haven't seen that failure of an LED but have seen where they will make a marginal input read due to the current draw and corresponding voltage drop.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Over the years I have some oddly behaved LEDs but none that survived 3 years' of excessive current and then failure!

    • @danman32
      @danman32 2 роки тому +1

      I'd be more concerned about the voltage clamping the LED would be doing to your PID V+.
      I had a similar unpredictable results monitoring output of a counter circuit. The counter output was OK, but the circuit needing input from the counter output was not getting proper logic 1 voltage because of the LED voltage drop.
      Always use a resistor to avoid unintended voltage clamping

  • @digihorse6730
    @digihorse6730 2 роки тому

    Mr Bacon this one episode has got me interested in WEMOS. Damm you sir. 😂

    • @RalphBacon
      @RalphBacon  2 роки тому

      Doesn't cost a lot just to try it out. Sorry about that. 😁

  • @chrisw1462
    @chrisw1462 2 роки тому +2

    If nothing else, a resistor in series with an LED keeps a failed-shorted LED from sucking all the power away.. :-) If the PIR really needs 3.3 volts, you may want to replace the NPN with a MOSFET, or use the NPN to turn on a MOSFET to power the PIR.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Hang on, are you saying the (sort of) short-circuited LED would then prevent the PIR working? What?!? 🤣 Yes, today I would a MOSFET no doubt. In fact, today I would change the design to NOT use a pin that must be LOW on boot up!

  • @TheEmbeddedHobbyist
    @TheEmbeddedHobbyist 2 роки тому +1

    So you were using it as a light emitting zener diode (LEZD) and the transistor as a current limit :-), have you buggered the ram, or excedded the write limit of any memory?

    • @RalphBacon
      @RalphBacon  2 роки тому

      Yes, it was an unusual arrangement. A pity the LED didn't burn out a lot sooner (like after 1 minute) so I didn't get this trouble 3 years later. Ram and all other memory is fine!

    • @TheEmbeddedHobbyist
      @TheEmbeddedHobbyist 2 роки тому

      @@RalphBacon SD cards can be a bugger if you write too oftern to them, die just when you don't want them to. That is if there is a good time for them to die in the first place.

  • @mirceanicolaepop3707
    @mirceanicolaepop3707 2 роки тому

    I guess some resistor were needed in your schematics and maybe a transistor based buffer for the LED. And possibly, a power regulator too. Never relly on the feasibility of these no name modules like the Pir.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Yes, all good points you raise. I should (and do) know better!

  • @stefflus08
    @stefflus08 2 роки тому +1

    Driving the PIR low side of an NPN isn't ideal for stable independent operation.
    Instead I would make an enable for the D3 2n2222 transistor with a resistor making the PIR output high impedance and with the delay circuit clamping the PIR output low initially on that high Z side. (two NPNs, a pullup and your RC delay)
    In the same manner D3 needs a pullup to default high.
    I'm amazed it worked at all those three years, with the 3.3V becoming 2.7V through the NPN, and the LED clamping it to 2V.
    LEDs frequently develop equivalent parallell resistance, which would clamp the PIR supply further.

    • @stefflus08
      @stefflus08 2 роки тому

      There, now I'm done editing my comment. New record, I think. somewhere around 20?

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      I have to admit I don't know why I designed it this way other than to avoid the device not booting (discovered late in testing) and this was a "workaround" just to get it working.
      Yes, that's must be a new record for you, Steffen 👍🏻

  • @markday3145
    @markday3145 2 роки тому

    I wonder if you could have powered the PIR sensor via a GPIO pin. Would it’s current draw be low enough? If not, GPIO to a transistor. Then your software can decide when to enable the PIR.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      If only I'd had a spare GPIO pin! One of the restrictions of the Wemos D1 Mini setup is the limited supply of pins (well, for this project, anyway).

  • @FindLiberty
    @FindLiberty 2 роки тому +2

    Didn't your Mother teach you the unforgettable lesson about LEDs requiring a dropping resistor?
    _"Try getting away with that by attaching an NE2 directly across the mains young man, and you'll see!"_
    That ramp up power scheme for the PIR is also a bit sketchy. _"Take pride in your work, son."_
    *Now, go to your room...*
    Seriously, I'm glad you all are taking good care of your Mom!!!
    BTW, those yellow LEDs have occasionally been problematic for me too; IDK why.

    • @RalphBacon
      @RalphBacon  2 роки тому +3

      I have no idea why there is no dropping resistor there. And., of course, once built and working why would I ever check it again? Can I come out of my room now?

    • @FindLiberty
      @FindLiberty 2 роки тому +1

      @@RalphBacon Of course you can! BIG HUGS directed towards you and Mom.

  • @colepdx187
    @colepdx187 2 роки тому

    Thanks, Ralph!

  • @ForwardGuidance
    @ForwardGuidance 2 роки тому

    Absolutely right!!! When it is wrapped with bacon, it tastes so much better. Pizza with bacon is so much better than pepperoni too.

    • @RalphBacon
      @RalphBacon  2 роки тому

      I've never had pizza with bacon (well, I've eaten it with my family but that a different Bacon).

  • @jp040759
    @jp040759 2 роки тому

    Absolutely. ALWAYS use current limiting resistor with an LED!!!! Where is your current limiting resistor on the top 2N2222 transistor's base from the PIR output pin???????? Pin D3 should have a pullup resistor on it also.

    • @RalphBacon
      @RalphBacon  2 роки тому

      As I already know this, I can only assume that I intended to use a current limiting resistor and forgot. Plausible deniability? 😁
      The PIR already has a 10K resistor on the output so no base resistor was required and D3 is set as an INPUT_PULLUP so no resistor required there either. But it's a crappy, rushed design to solve a problem on start-up.

    • @jp040759
      @jp040759 2 роки тому

      @@RalphBacon Gotcha. I had a similar issue with a project. I could not believe the LED died. Turns out I mis-read the color bands of the resistor. It was a blue LED and those always look over bright so I didn't double check things. Cool idea

  • @Cptnbond
    @Cptnbond 2 роки тому

    I also like the ESP8266 D1 mini. Cheers.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Yes, I was expecting them to bring out a ESP32 version but it never materialised.

  • @arminth
    @arminth 2 роки тому +3

    Being a German myself, I can guarantee you : we never say no to bacon! Everything is better with bacon! Everybody knows this (in the BBQ community)!

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Yes, but it is REAL bacon or just some Lidl Speck substitute, that never cooks (nor tastes) like REAL bacon. Apparently, my mum says that when Lidl (or Aldi) have an _Englische Woche_ all the English stuff is bought by ex-pats. Shelves are empty! Especially of bacon.

  • @Bob_Burton
    @Bob_Burton 2 роки тому +1

    Was it a deliberate decision to use pin D2 ?

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      D3 you mean? I can't remember how I designed this, all the notes are in Germany. With hindsight I would have done it differently. For example, I could have used D3 as an OUTPUT pin for the beeper and whatever pin the beeper uses for the PIR (I guess).

    • @Bob_Burton
      @Bob_Burton 2 роки тому

      @@RalphBacon Whoops, yes. I meant D3

  • @kissingfrogs
    @kissingfrogs 2 роки тому

    Nice project. Have you had issues with stacking those headers particularly the long thin brass looking pins not making the best contact when inserted in a header.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Not at all, but I used gold plated headers (yes, really) because I knew the brass ones were dodgy at best. I didn't want any kind of issue where the device stopped working and had to be returned to me. Oh. 😥

  • @tonyweavers4292
    @tonyweavers4292 2 роки тому

    Would a series resistor to LED have stopped it pulling the voltage down? ... Oh, further into the video you answered my question!

    • @RalphBacon
      @RalphBacon  2 роки тому

      The LED was not there to pull the voltage down (but must have done so in its current configuration). It was just an indicator to tell me the power was on! I'm surprised this project worked at all!

    • @tonyweavers4292
      @tonyweavers4292 2 роки тому

      @@RalphBacon Sorry Ralph, I meant had you put a series resistor in circuit to LED when built would it have prevented it killing the supply voltage?

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Oh yes, it would. A shorted LED could still only draw, say, 5mA via a 100Ω resistor so it would have behaved (except the LED would not be working).

  • @petermoore9504
    @petermoore9504 2 роки тому

    Just a quick thought, have you considered 3d printing a case to make it look less industrial given that it is in a domestic setting? Perhaps a bit friendlier looking.

    • @RalphBacon
      @RalphBacon  2 роки тому +2

      If I had a 3D printer AND knew how to use it I probably would have. In this case, however, the "charm" of this device is in its exposed circuitry with smoked grey acrylic coasters top and bottom (he said). Well, my mum's not complained so it must be acceptable!

  • @zyghom
    @zyghom 2 роки тому +2

    this LED will make sure, the voltage on Emitter is NEVER going to be higher than forward voltage of that LED. If you add resistor between Emitter and LED anode you would get full Vcc on Emitter (lowered a bit by transistor). Not even saying that if the gain of this transistor is very high, you might simply burn this LED without the resistor that would limit the current.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Yes, it's a bit strange that the PIR module ever got enough voltage - but we know it did for 3 years. It must have been border-line OK and then kapow! Put it this way: if I were designing this again today I would do it differently!

    • @zyghom
      @zyghom 2 роки тому

      @@RalphBacon red LED: 1.8V forward voltage, but white LED: almost 3V forward voltage - green somewhere between. But still: LED without resistor ... asking for burning both LED and this poor transistor ;-) However when your Vcc is 3.3V then this LED will probably never burn. But so small voltage for PIR... a wonder ;-) Actually you know: sometimes it works, sometimes it... "brownout" ;-) By design you should do it different way - especially when today it is in UK - before going back to Germany ;-)

    • @RalphBacon
      @RalphBacon  2 роки тому

      Too late, Zygfryd, it's already back in Germany. 😒

  • @NamasenITN
    @NamasenITN 2 роки тому

    Why not using a Raspberry pi and a single PIR? I have a similar system that uses a version 1 pi and a single PIR and all the heavy lifting is done in software...

    • @RalphBacon
      @RalphBacon  2 роки тому

      Have you seen what this channel is about? Not a RasPi (although I have dabbled on the Dark Side). Too much money for too little. OK, all joking aside, it could have worked. Even a RasPi ZeroW would have been fine. Oh wow! I could have written it all in Python too! 🤮

  • @dunk_law
    @dunk_law 2 роки тому

    Diodes are great random noise generators. Definitely should have had a resistor.

  • @teslasapple
    @teslasapple 2 роки тому +1

    Organge LED turns out to be a Red LED without a series resistor.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      🤣😂That made me laugh!

    • @teslasapple
      @teslasapple 2 роки тому +1

      @@RalphBacon …😅👍

  • @SpinStar1956
    @SpinStar1956 2 роки тому +1

    Hi Ralph! Yeah, this failure is on you mate. First off, never use an LED without a resistor unless there is absolute certainty that the voltage will never go above the full-current point of the LED--Even that it's a BAD idea but people will swear by it. Also, LED's these days are much LESS reliable--I find all manner of bad ones--I think it is related to die-size(?). Anyway, on to what I wanted to talk about:
    First, when I get a batch of LED's (I use the hi-intensity ones for power-savings) I characterize them for 500uA; 1mA and 10mA (never more). For indoor, 500uA-1mA is usually just fine; otherwise I use 10mA for everything else since going to 20 or 30mA shortens the life of current day units.
    So, in your circuit (to-me) you need to think of what you were doing, as using a zener without a series resistor; as when most semiconductor junctions degrade they go toward a short-circuit. When I was a commercial circuit designer, you'd never allow a situation whereby an indicator failure would disable a product. Also, (as the proponents of MOSFET's have chimed in) you need to also investigate your PNP's saturation-voltage to see just how much of a load you can get away with. The problem (to-me) with using a n-channel MOSFET for (in your case) high-side switching is you have to have a gate voltage at least 2.5-3.5 volts above the source--so alway use a p-channel for that.
    Finally, back to the circuit: What I do is make sure that there is enough series resistance in the LED circuit, so that I can survive a complete shorted-LED failure and still have an acceptable saturation voltage on the switching element. So always add some resistance, even if just a low value.
    In closing, I really enjoy your channel and it has become a reference to me using these micro-controllers; I'm just getting started and you've been a HUGE help to my understanding, particularly your deep dives into the hardware and software... 73 & Thanks from the States!

    • @RalphBacon
      @RalphBacon  2 роки тому

      Yes, my bad (as we never say in the UK, but I hear it on American TV a lot). I have some LEDs that work on

    • @SpinStar1956
      @SpinStar1956 2 роки тому +1

      Oh, one more thing. For error status lights, what I do is allow the LED to have a lot of current but I cut the duty cycle way way down; this gives short brilliant flashes that are exceedingly easy on the battery system…

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      I was going to demo this in a future video on an ESP32 using a timer. I still might.

  • @epremeaux
    @epremeaux 2 роки тому

    You'd be better off using a mosfet in place of that power switching transistor, (and the signal one as well). You can expect about 0.7 volt drop through any typical transistor, whereas mosfets are virtually zero drop if set up properly. No risk of underpowering your PIR sensor, or placing your switching signal somewhere in an indeterminate state. Also those transistors are power wasters, if you have any plans for making this battery powered.
    I would also suggest that rather than using the RC circuit to form a switch delay, you solve the problem programmatically using a second GPIO pin to drive the mosfet gate. This gives you the added advantage of being able to "reset" the PIR in software.

    • @RalphBacon
      @RalphBacon  2 роки тому +2

      @Emery Premeaux I couldn't agree more about the use of a MOSFET in this situation. A simple 2N7000 would have done nicely. Although switching the high side would be even better, and I am sure I have some small P-Channel MOSFETs somewhere.
      Regarding use of a second pin for the PIR - that's the whole trouble: I had no extra pin available otherwise this whole debacle would never have seen the light of day! Those ESP8266 Wemos D1 Minis are great but are limited in terms of GPIO count. But your reasoning for using one (if one had been available) is spot on and what I do for my ESP32 Web Radio project where I control the VS1053b MP3 decoder in just that way.

  • @jeffbluejets2626
    @jeffbluejets2626 2 роки тому

    You have a way of making people think, allbeit on what should be a simple circuit. Yes, resistor required on the LED, most probably around 22R but........ I wondered just how much current that LED would actually draw under your existing conditions. Only answer I could come up with would really be approximate, unless one actually measures the current. Unless one applies some really in depth circuit analysis that adds some form of resistance (beyond me) best I could come up with seemed extreme at 400ma for 1R series resistor, surely not correct.

    • @RalphBacon
      @RalphBacon  2 роки тому

      No, 400mA obviously can't be correct; I suspect that it took more than 20mA but less than 30mA (the point at which it subsequently died during my testing). A resistor to drop, say, 0.5v, to pass 5mA would be about 100Ω, but frankly a 20Ω resistor would have saved it (and all the shipping fees) too. 🤦‍♂️

    • @jeffbluejets2626
      @jeffbluejets2626 2 роки тому +1

      @@RalphBacon The way I estimated it was to say 3.3v less 0.7 for the saturated transistor, less 2.2v for the LED = 0.4v across a 1 ohm resistor =400mA but you have no resistor so the only resistance then would be the transistor only turned on a certain amount as obviously 400mA not correct as built.

  • @Ed19601
    @Ed19601 2 роки тому +1

    Interesting circuit. I concur though with the various comments: series resistor. Saving a few pence ended up costing you 8 pounds 😉

    • @RalphBacon
      @RalphBacon  2 роки тому +4

      Cost me £8 and my nephew €17 - all for the sake of a resistor. I have now un-hired myself as an electronics engineer and am only good for tea making.

    • @Ed19601
      @Ed19601 2 роки тому

      @@RalphBacon that was an expensive resistor

  • @25sunbeam
    @25sunbeam 2 роки тому

    Wouldn’t it have been easier to use a different GPIO pin for the PIR?
    The D1 Mini Pro (the one that has the external antenna connector) is more expensive because it has more memory (but being able to use it is another issue unless you’re using it for SPIFFS or LittleFS)
    You should look at setting-up a free Blynk account, as the Blynk.Air OTA system allows you to ship new firmware updates to devices that are outside of your network, because it utilises a simple to use version of HTTPS OTA. Blynk also allows you to set up an app and/or web dashboard to monitor the data from the hardware device, and can send notifications to your phone if certain criteria are met (such as no activity from your mother for a certain period).

    • @RalphBacon
      @RalphBacon  2 роки тому

      I cannot remember why I used D3 for this pin. I suspect that I discovered far too late that if the PIR triggered just as the D1 Mini booted up, it would fail. Today, I would choose a different pin. 🤦‍♂️
      Thanks for the heads up regarding the Blynk OTA feature; I will certainly check it out. 👍🏻

  • @uwezimmermann5427
    @uwezimmermann5427 2 роки тому

    nice project - but never, ever use an LED without series resistor!

    • @RalphBacon
      @RalphBacon  2 роки тому +3

      For goodness sake, Uwe, could you not have told me this 3 years ago? 🤦‍♂️

    • @uwezimmermann5427
      @uwezimmermann5427 2 роки тому

      @@RalphBacon I would have thought you knew, because it's told and taught everywhere. If you connect an LED directly to a 2032 coin cell, it will not get destroyed immediately because of the high internal resistance of that battery (order of 50 Ω - 100 Ω). However, if you take a standard GaP yellow or green yellow LED and connect it to that coin cell you will actually see how he light color shifts as the chip inside heats up by the too large current still developing.
      But about your project: I am in a similar situation with my father living in northern Germany and me living in Sweden...

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Yes, I do know, Uwe, it was just a little joke (very little). I do sometimes drive a blue LED directly from an Arduino pin when I demo stuff as they need a much higher voltage and don't take more than 20mA (well, mine don't) so it's reasonably safe. Bad thing to show others, though, I guess.

    • @uwezimmermann5427
      @uwezimmermann5427 2 роки тому +1

      @@RalphBacon actually the outputs of the AVR chips are internally current limited and driving individual LEDs directly will neither endanger the LED nor the Arduino. However keeping the loss heat outside of the chip and within an external resistor is a better solution. Also with more LEDs on the chip there is a risk of exceeding the max current per port or per chip.

  • @saajidthakur6027
    @saajidthakur6027 2 роки тому

    Thanks for your guidance Sir.
    Kindly help.
    How can install library to Arduino IDE by json link or other source?
    I didn't found and explanation regarding this topic.

    • @RalphBacon
      @RalphBacon  2 роки тому

      The ESP32 board json link is:
      dl.espressif.com/dl/package_esp32_index.json
      and should include the esp_now.h header file.

    • @saajidthakur6027
      @saajidthakur6027 2 роки тому

      @@RalphBacon
      Thanks Sir,
      God bless you ❤
      I'll try today and inform you.

  • @McTroyd
    @McTroyd 2 роки тому +2

    Don't mind me, I'm just down here looking for a hundred or so people griping about a resistor. 🍿

    • @RalphBacon
      @RalphBacon  2 роки тому +5

      You've found them, Ted. One little resistor. Hardly a resistor. 20Ω would have been enough. 100Ω even better. Sigh. 🤦‍♂️

  • @medvidekkrupicka1404
    @medvidekkrupicka1404 2 роки тому

    My first thought when I looked at the schematics: "No resistor in series with the LED?! That is dumb."

    • @RalphBacon
      @RalphBacon  2 роки тому +7

      Please don't sugar-coat your comments, Medvidek! Say it as it really is! Oh. 😥

  • @AlbertDongler
    @AlbertDongler 2 роки тому

    Neat device! 🙂

    • @RalphBacon
      @RalphBacon  2 роки тому

      And up until recently worked flawlessly!

    • @AlbertDongler
      @AlbertDongler 2 роки тому

      @@RalphBacon That LED failure mode is really quite bizarre.

  • @IanSlothieRolfe
    @IanSlothieRolfe 2 роки тому

    Well Mr Bacon, today I am battling with the Raspberry Pi that controls my 3D printer that has decided that it will only connect to wifi for a few seconds after boot, after having worked flawlessly for quite a few months, and its looking like a corrupt SD card, despite me religiously shutting down the Pi before turning off. Looks like it had a look at your video before I did!
    Any other forecasts for me ? :D

    • @RalphBacon
      @RalphBacon  2 роки тому

      I'm not sniggering,😆no really I'm not. The first thing I did with my RasPi was get it to boot from USB. It's quick and easy to do and you can use some crummy 1 or 2Gb device which is too small for much else. Then you can copy it to another USB device and you are safe!
      I notice there are lots of videos out these days on how to boot from small hard disk too, either spinning (needs extra power) or solid state. I did that too, to use up one my 500Mb SS disks that is useless for anything else (too small).
      I've no idea why Raspberry Pi haven't done this by default (perhaps they have with the Pi 4?)

    • @largepimping
      @largepimping 2 роки тому +3

      @@RalphBacon They've solved the problem by making sure nobody will ever be able to buy a raspberry pi again. 😄

  • @andymouse
    @andymouse 2 роки тому

    Hi Ralph, that LED is going to drop its forward voltage so right off the bat it's a bit 'skin of your teeth' functionality and I'm glad you removed it, It's a nice thing to have with elderly parents...cheers.

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      I'm amazed it worked at all, the longer I think about it, Andy. Yes, my mum is 94 now, but still "with it" although getting more frail every day. Hence this activity monitor!

    • @fredflintstone1
      @fredflintstone1 2 роки тому

      Cheese Snacks !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @andymouse
      @andymouse 2 роки тому

      @@fredflintstone1 SQUEAK !!!!!

    • @andymouse
      @andymouse 2 роки тому

      @@RalphBacon Yeah, tough little LED !

  • @pb_magnet
    @pb_magnet 2 роки тому

    “Chalk and cheese”… had to look that one up.

    • @RalphBacon
      @RalphBacon  2 роки тому

      Not just you, apparently! 🤷‍♂️

  • @rickhunt3183
    @rickhunt3183 2 роки тому

    not too bad....

    • @RalphBacon
      @RalphBacon  2 роки тому

      The video or the problem, Rick? Frankly, the design of the (failing) circuit was pretty poor. That's what happens when you rush things. But the video was OK, I think? And thanks for watching 👍🏻

    • @rickhunt3183
      @rickhunt3183 2 роки тому +1

      @@RalphBacon The video is always good. You always interest and enjoyment of what you're. I don't think the design is all that poor. I'm never happy with a project I've completed a year or more ago. I'm always thinking, why did I do things this way? Regardless, leaving the led resister out is a mistake that anyone could make. I suspect the reason it didn't burnout immediately and short to ground is because it's wired in parallel with the pir sensor, and that device having a lower resistance is drawing most of the current leaving just enough current to allow the led to work for awhile. I was referencing that the design wasn't too shabby. I'm certain, had you taken your time you would have caught the error. I used to always tell my boss. Hurry up means F*ck up. I hope you have a great night, and thank you for being so nice and reaching out to me.

  • @pintokitkat
    @pintokitkat 2 роки тому

    Surely the first thing you suspected was that mum wasn't moving about.

    • @RalphBacon
      @RalphBacon  2 роки тому

      I have TWO identical devices there, Andy, that cover different parts of the room (and overlap a bit too). Otherwise it might have been a bit worrying 😲
      Hang on, if I put an LED in the other device too... 🤦‍♂️

    • @pintokitkat
      @pintokitkat 2 роки тому +1

      @@RalphBacon redundancy! Clever.

  • @johntoe6127
    @johntoe6127 2 роки тому

    Everybody loves Bacon. (sorry, I couldn't resist....)

    • @jp040759
      @jp040759 2 роки тому

      GOOD ONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LOL

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Glad to hear it! Hang on, Bacon or bacon? Oh, never mind 🤣

  • @VovelPunch
    @VovelPunch 2 роки тому +1

    Kein Bacon😂😂

    • @RalphBacon
      @RalphBacon  2 роки тому

      But they are now letting me in again!

  • @cassiewu8147
    @cassiewu8147 2 роки тому

    Hi ,this is cassie,i looked your video ,and if we want to cooperate with you ,Is there any contact way can talk with you ?

    • @RalphBacon
      @RalphBacon  2 роки тому

      My email is on the ABOUT page of my channel but please be aware that I already have sponsors for my channel (as you doubtless saw).

  • @flemmingchristiansen2462
    @flemmingchristiansen2462 2 роки тому

    Ok then..I make a comment.
    Maybe, just maybe you want to comment on your mail 😉😉

    • @RalphBacon
      @RalphBacon  2 роки тому +1

      Ok 😁 I will reply... I've replied right now!

  • @SteveBrace
    @SteveBrace 2 роки тому +1

    Comment