Electronic candle with PWM and flicker effect

Sdílet
Vložit
  • čas přidán 14. 12. 2019
  • Let's build an electronic candle that has a realistic flickering effect!
    This is a small and simple PIC microcontroller circuit and makes use of the analog to digital converter and the pulse-width modulation modules. You can use it for winter decoration, doll houses, or anywhere else where you want to mimick the flame of a candle. Check out the companion article on my website for more details and an up-to-date list of all components: www.friendlywire.com/projects/...
    Thanks for tuning in, and let me know in the comments if you have any questions!
    Website: www.friendlywire.com
    Twitter: / friendlywire
    Reddit: / friendlywire
    Facebook: / friendlywire
    Instagram: / friendlywire

Komentáře • 54

  • @MindFlareRetro
    @MindFlareRetro Před 4 lety +2

    A great project and a great video - everything is well shot, edited and presented very nicely. Excellent job!

    • @FriendlyWire
      @FriendlyWire  Před 4 lety +1

      Thank you so much, I am happy you like it! Do you have any suggestions on future topics that might be interesting? I am thinking of doing an RS232 tutorial and I also have one CMOS project in the pipeline.

    • @MindFlareRetro
      @MindFlareRetro Před 4 lety +1

      @@FriendlyWire Well, RS232 is very interesting to me as a retro computer enthusiast. I would enjoy that very much.

    • @FriendlyWire
      @FriendlyWire  Před 4 lety +1

      @@MindFlareRetro Consider it done! :) I actually am very fond of RS232 because it is such a simple interface, and most controllers have a USART module that is compatible. The only pain is the level shifter MAX232 which makes it a bit more involved.

    • @MindFlareRetro
      @MindFlareRetro Před 4 lety +1

      @@FriendlyWire Nice! Looking forward to it. I purchased a used Fluke 45 dual display bench multimeter (with an RS232 interface at the back) a couple of years ago. And about a year ago I came across a gentleman who created a small Windows program that would display the DMMs output via the RS232 port. I should probably get myself a cable to see this in action.

    • @FriendlyWire
      @FriendlyWire  Před 4 lety +1

      @@MindFlareRetro Yeah, RS232 is a really nice, simple, and non-proprietary interface for that sort of thing :)

  • @axeldaguerre8838
    @axeldaguerre8838 Před 3 lety +1

    Thank you it helps me for my future projects, plan to do something for Christmas, it was just perfect explanation

    • @FriendlyWire
      @FriendlyWire  Před 3 lety

      Thanks, that's great to hear! :) Make sure to share your photos and tag me @FriendlyWire on Twitter if you want (or share it on our subreddit /r/FriendlyWire), I would love to see the project. Have a great day!

  • @VintageProjectDE
    @VintageProjectDE Před 4 lety +1

    A really nice idea!
    And I like your presentation. Well done!

  • @labibmuhammadasif1510
    @labibmuhammadasif1510 Před 3 lety +1

    Great Tutorial.... Please keep making interesting project tutorial

    • @FriendlyWire
      @FriendlyWire  Před 3 lety

      Thank you so much, I am very happy you like it! I am almost done with the next video, but it will be on the CD4017 counter IC (no microcontroller). After that I have some microcontroller videos planned.
      Do YOU have any suggestions for future videos? Anything you want to learn about PIC microcontrollers? Because my channel is so small I always love to take direct suggestions from as many viewers as possible :)
      Have a great day, and thanks for stopping by :)

  • @abdullahshamim2218
    @abdullahshamim2218 Před 4 lety +1

    That's really some work for a candle :)

    • @FriendlyWire
      @FriendlyWire  Před 4 lety +1

      True :) But after you know how to use analog to digital converters and pulse-width modulation on a microcontroller, there are many many other cool things you can do. I believe in finding a simple starting project, and then taking it from there :)

  • @GiuliaArmaneli
    @GiuliaArmaneli Před 2 lety +1

    Muito legal o projeto 😁👏🏻

    • @FriendlyWire
      @FriendlyWire  Před 2 lety +1

      Muchas gracias, Giulia :) Glad you like it!

  • @overclockers6835
    @overclockers6835 Před 3 lety +1

    Nice video. Done similar projects using an attiny25/85 and an arduino as the programmer. Any reason you used a pic16f1455? I haven't used this mc yet, wondering if I should.

    • @FriendlyWire
      @FriendlyWire  Před 3 lety +1

      Thanks! I like PIC controllers because they are fairly affordable and rather simple to use, but there is no reason you have to do this project on a PIC, the general idea works with any microcontroller that has ADC inputs. I like the PIC16F1455 and also its related chips like the PIC16F1459, they are quite powerful.

  • @akshaygs292
    @akshaygs292 Před 3 lety +1

    Good Explanation,
    Nice simple and effective animation!
    We can even add a sensor to blow out the candles next time,.. haha
    What is the Software you use to create videos?

    • @FriendlyWire
      @FriendlyWire  Před 3 lety

      Thank you, glad you liked it! And that's a great idea! :) I use DaVinci Resolve to make the videos.

  • @s1nister688
    @s1nister688 Před 4 lety

    Hoping one day you'll do some videos on drones(quadcopters? using arduino as a cheap flight controller?)
    I love these videos though.

    • @FriendlyWire
      @FriendlyWire  Před 4 lety

      Thanks so much! For now I have no planes on drones/quadcopters, I feel like there are so many great diy projects out there, and the controls and regulating circuits are really advanced :)

  • @tziirkq
    @tziirkq Před měsícem +1

    Thanks so much, this is great. Literally exactly what I want to do, but haven't the MC knowledge to figure it out for myself. I have a couple of questions; is it possible to use a potentiometer to control the rate, and can the signal be used to control things other than an LED? Thanks again.

    • @FriendlyWire
      @FriendlyWire  Před měsícem

      I am glad you liked the video, and apologies for my late response. Yes! You can do that! Check out the PIC16F455 ADC tutorial here: czcams.com/video/AlpbbeX7-BU/video.html . What kind of other things would you like to control with the circuit?

    • @tziirkq
      @tziirkq Před měsícem +1

      @@FriendlyWire I'm a musician, I was hoping this would be a handy way to make a smooth sample and hold LFO. Really I'd like to be able to make and program musical devices, like digital effect pedals and synths, without having to put an entire Arduino inside, as that seems wasteful.

    • @FriendlyWire
      @FriendlyWire  Před měsícem

      @@tziirkq Ohh that is so interesting! I have no experience with this, but could you describe it a bit more, perhaps via email? You can find my address at the bottom of www.friendlywire.com :)

  • @Sanaullahalam95
    @Sanaullahalam95 Před 3 lety +1

    Sir can you make more effects like fire, welding spark, lightning effect, cloud pass, tv blink, etc.

    • @FriendlyWire
      @FriendlyWire  Před 3 lety +1

      Thank you for your question and for your interest, Sanaullah, it's great to have you here! :) With just a few LEDs you can make very simple animations, but they can be quite powerful. I think all the key is in the timing. Have you looked at the source code of this project? I am sure you could try it! Let me know if you have questions about it, you can always reach me on Twitter @FriendlyWire as well, happy to help! :)

    • @Sanaullahalam95
      @Sanaullahalam95 Před 3 lety +1

      Thank you so much Dear respected sir
      Sir if i want to find the timing of any effect then how to get it like spark timing of welding By the way, how did you determine the timing of the candle flickering?

    • @FriendlyWire
      @FriendlyWire  Před 3 lety +1

      @@Sanaullahalam95 My pleasure, and thanks for your interest! :) I just tried around to get the effect I wanted. I am no expert with animations but I had some idea what I was after. If I wanted to do a welding spark thing I would change the color of the LEDs to white and blue, and use sharper transitions. You could also look at welding videos on CZcams and play them back at a lower speed (click on "options" and then on "playback speed" and you can set it to 0.25) which will give you more details :)

    • @Sanaullahalam95
      @Sanaullahalam95 Před 3 lety +1

      @@FriendlyWire thank you dear sir
      Sir if microcontroller pic16f1455 is not available in my local market so can change the ic number like pic16f676 in source code?

    • @FriendlyWire
      @FriendlyWire  Před 3 lety +1

      @@Sanaullahalam95 Yes, it works also with the PIC16F676, it is very similar to the PIC16F1455. BUT you will need to change some parts in the code. Feel free to message me on Twitter @FriendlyWire if you need help with that, we will get it to work! :)

  • @torbjrnrosseland598
    @torbjrnrosseland598 Před 3 lety +1

    How long will this last with the battery pack?

    • @FriendlyWire
      @FriendlyWire  Před 3 lety

      Good question! According to Google, a typical AA battery has between 2000mAh-3000mAh capacity. If both LEDs were on at the same time, and each LED draw around 10mA, that would be 20mA total current draw (with the current consumption of the controller negligibly small), resulting in 100-150 hours of continuous operation. Of course that is just an approximation: the LEDs are not on continuously (they are driven by PWM at reduced effective brightness, after all) and also the batteries won't last until zero capacity. So I would guess that the circuit should run for around three days straight.

  • @boltex_4280
    @boltex_4280 Před 3 lety +1

    hi. can i use the PIC16F1455 with led strip and 12v? thanks u

    • @FriendlyWire
      @FriendlyWire  Před 3 lety +1

      Hello :) The PIC16F1455 is for 5V maximum, so I don't think it works right away. Do you have a link to the LED strip you have in mind? It might be possible to use a special driver :)

    • @boltex_4280
      @boltex_4280 Před 3 lety +1

      @@FriendlyWire Hello thanks for answering, this is the link a.aliexpress.com/_mroQxPn, I want to make a lava diorama and I want to do the candle effect but it is 12volts

    • @boltex_4280
      @boltex_4280 Před 3 lety +1

      @@FriendlyWire I would appreciate your answer🙌🏻

    • @FriendlyWire
      @FriendlyWire  Před 3 lety +1

      @@boltex_4280 These LED strips are "smart" LED strips that can be any color you want. If you search CZcams for "Neopixel fire animation" you should find something that works well. The project in my video here is just for single-colored LEDs, and unfortunately it's not "smart" enough.
      My next project will be about the PIC16F1455 and how to drive Neopixel LEDs with it, but it will be a few weeks until it is out.

    • @boltex_4280
      @boltex_4280 Před 3 lety +1

      @@FriendlyWire Thanks, I'll look for neopixel on youtube, I don't need rgb anyway, I want 2 strips warm white as a candle

  • @Sarahbuildsstepsequencers

    Ugh, I don’t know how to program.

    • @FriendlyWire
      @FriendlyWire  Před rokem

      But you can learn it! :) Try this beginner tutorial here if you are interested: czcams.com/video/e4Q2dYVedPY/video.html