Тёмный

Building an analog clock with a microcontroller 

FriendlyWire
Подписаться 15 тыс.
Просмотров 7 тыс.
50% 1

Microcontrollers are digital devices, but in this project we will turn it around and use a PIC microcontroller to build an analog clock using a panel meter. And what's more, we will make use of the SLEEP mode of the PIC microcontroller so that this circuit can be run off of batteries and keep the time for decades when not powered on.
Thanks for watching, and let me know in the comments if you have any questions!
Companion article: www.friendlywire.com/projects/...
Email list: www.friendlywire.com/email
Website: www.friendlywire.com
Twitter: / friendlywire
Reddit: / friendlywire
Facebook: / friendlywire
Instagram: / friendlywire
Timestamps:
00:00 Overview and introduction
01:12 What you need
02:38 Main idea
03:50 Schematic
05:30 Modifying the panel meter
08:55 Building the circuit
11:27 Flashing the PIC16F1455 microcontroller
12:57 Main idea of the program
16:37 Verifying the sleep mode capability
17:29 Testing the clock's accuracy
18:13 Tachometer mod
23:25 The finished clock
24:03 Conclusion

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@neelakandamurthi3157
@neelakandamurthi3157 10 месяцев назад
8:27 according to your given data the value of R8 = 2Kohm But how you show the value of R8 =9.5kohm ?
@FriendlyWire
@FriendlyWire 10 месяцев назад
My goodness, you are right, of course. This is a mistake in the video, it should really be 2k. My mistake!
@davidandrews8566
@davidandrews8566 2 года назад
Good project excellent content. You are one of the very few (very very few) makers that use Microchip pics. This channel makes a very refreshing change.
@FriendlyWire
@FriendlyWire 2 года назад
Thank you for your kind words, David, and I am glad you liked the video :) I love PIC controllers, they are so compact and a lot of fun to work with, although, as somebody else commented, they are not as easy to use as Arduinos (at first). After you make it past the first speedbumps (and I hope my videos help with that) it can be a lot of fun.
@createinvent
@createinvent 2 года назад
That is a pretty impressive low-power mode, especially since it still keeps the time! You really do a good job of explaining everything.
@FriendlyWire
@FriendlyWire 2 года назад
Thank you so much for your kind words, it means a lot! :) Yeah, I was surprised how low the current consumption is. One thing to keep in mind, though, is that the current probably spikes up whenever the microcontroller wakes up from sleep for a fraction of a every second. So the draw on the battery will not be a constant 6uA, it's more like an average 6uA.
@ekp_chinthaka9845
@ekp_chinthaka9845 2 года назад
Fantastic ! Thank you Jens. for teaching me to think of something new.
@FriendlyWire
@FriendlyWire 2 года назад
So glad you like it!
@jerril42
@jerril42 2 года назад
Fantastic! I've been seeing the teasers on Twitter for a while, it's great to see it all together. This project has it all, including a little device hacking. Thanks Jens. Take care.
@FriendlyWire
@FriendlyWire 2 года назад
Thanks so much, Jerry, glad you enjoyed it! :)
@aliceybotypora8432
@aliceybotypora8432 2 года назад
Such a nice project! I really love your attention to detail and the animations are fabulous. Very well done :) I already started looking for an old panel meter
@FriendlyWire
@FriendlyWire 2 года назад
Thank you so much, Alice, this means a lot! Please send me a picture of your panel meter clock if you get it working, I would love to see it. And if you have any questions I am more than happy to help. Have a great day!
@BusyElectrons
@BusyElectrons 2 года назад
What a unique and interesting project. I especially enjoyed the modification of the panel meter. Thank you for sharing.
@FriendlyWire
@FriendlyWire 2 года назад
Thank you, Jeff, glad you like it!
@TheScissorunner
@TheScissorunner 2 года назад
Great job Jens! Thank you for all of the hard work you put into producing truly fantastic content. Really some of the very best I’ve seen on RU-vid!
@FriendlyWire
@FriendlyWire 2 года назад
Thank you so much, Craig, glad you like it!
@yt4krist0f
@yt4krist0f 2 года назад
Great idea and project, keep on Jens!
@FriendlyWire
@FriendlyWire 2 года назад
Thanks so much! :)
@Bianchi77
@Bianchi77 2 года назад
Creative video, thanks for sharing :)
@FriendlyWire
@FriendlyWire 2 года назад
Thank you so much, glad you enjoyed it! :)
@309electronics5
@309electronics5 2 года назад
Fantastic and cool project i just salvaged a panel meter from an old radio and i have a lot of pics laying around wich i also salvaged and i just bough a picKit
@FriendlyWire
@FriendlyWire 2 года назад
Nice!!! If you want, share some photos on Twitter/Instagram or on the FriendlyWire subreddit, I would love to see some photos :)
@_bogbean
@_bogbean 2 года назад
Interesting project and thanks for really taking the time to explain so clearly how everything works. For those tricky sticker residues I recommend a little bit of lighter fluid. Works a treat and smells nice too. Edit: Oops, I commented too early: looks like that goo gone worked.
@FriendlyWire
@FriendlyWire 2 года назад
Thanks so much, Ben, will keep it in mind. And thank you for your kind words :)
@markgreco1962
@markgreco1962 2 года назад
This is cool
@FriendlyWire
@FriendlyWire 2 года назад
Hey, glad you like it, thanks so much and happy Saturday! :)
@markgreco1962
@markgreco1962 2 года назад
@@FriendlyWire I don’t have a pic controller need to get that
@FriendlyWire
@FriendlyWire 2 года назад
@@markgreco1962 Awesome! I have a video here where I talk about all the gear you need to get started with PIC microcontrollers: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-yBiQuKFuo4s.html Let me know if you have any questions, I am happy to help!
@thediamondnightingales9623
@thediamondnightingales9623 2 года назад
This is genius, how the hell does someone think of turning a panel meter into a clock? Lol
@FriendlyWire
@FriendlyWire 2 года назад
Haha, glad you like it! I cannot claim originality for that one, though, I am sure you can find many others who have done it as well :)
@maryamalrubaye1624
@maryamalrubaye1624 2 года назад
hello thank u for this amazing tutorial can I use PIC16F627A ? should I change anything I think they are similar right?
@FriendlyWire
@FriendlyWire 2 года назад
You could use that one, too, but there are a lot of things that are slightly different, for example the registers for the internal timers etc. In other words: you can get it to work on the PIC16F627A, for sure, but it will require some programming. It might be easier to just get the PIC16F1455 to get started. Hope that helps :)
@play-and-maker
@play-and-maker 5 месяцев назад
You love PIC Microcontroller more then AVR ?
@FriendlyWire
@FriendlyWire 5 месяцев назад
I think the best microcontroller is the one you can use :) I grew up with PICs, so I like to use them, but you can build this analog clock with any microcontroller that has a decent PWM module :)
@Glidomatic
@Glidomatic 2 года назад
Would there be a way to modify this so that rather it being a clock that counts up in hours, have it count up in seconds? So like having it max out at 1 minute and then resetting itself?
@FriendlyWire
@FriendlyWire 2 года назад
Hey Harry, yeah, for sure! This week I will work on a video that explains the code, line by line. Essentially you just have to change one line in the code. Since one minute has 60 second you could take that value times 4, so you have a number between 0 and 240. If you look at the article ( friendlywire.com/projects/analog-clock/ ), you can change lines 150-155 to "PWM1DCH = seconds * 4;" and that should do it :) Let me know if that helps!
@terrygains8327
@terrygains8327 Год назад
@@FriendlyWire Awesome. I'm going to mod the code to use two really large panel meters (saved from 2x broken Phillips 2430 multimeters) + switch to toggle from hr & mins to min & seconds . Thank you so much for such a friendly and robust frame work.
@mecamaster
@mecamaster 2 года назад
How stable is the clock? Does it keep accurate time day over day?
@FriendlyWire
@FriendlyWire 2 года назад
Around 1%, check the video at 17>29 where I talk about it :) It's not perfect, but there are some ways it can be improved.
@mecamaster
@mecamaster 2 года назад
​@@FriendlyWire Thank you! Sorry I watched the whole thing and somehow didn't take in that information
@FriendlyWire
@FriendlyWire 2 года назад
@@mecamaster No worries, I am happy to help out :) And thank you for your interest, Lyle!
@xarcraft2021
@xarcraft2021 10 месяцев назад
Can you add the print that you put in the clock in 8:46?
@FriendlyWire
@FriendlyWire 10 месяцев назад
Of course, here it is: friendlywire.com/projects/analog-clock/panel-scale.png
@xarcraft2021
@xarcraft2021 10 месяцев назад
@@FriendlyWire Thank you! If there is any spelling mistakes, I'm sorry, my English level is something like B1-B2.
@FriendlyWire
@FriendlyWire 10 месяцев назад
@@xarcraft2021 Happy to help! And I am also not a native speaker of English, it's all good! :)
@lexpee
@lexpee 2 года назад
Hmmm is this project not possible with an Arduino nano. Again spend money for and expensive PIC programmer.
@FriendlyWire
@FriendlyWire 2 года назад
Certainly it is possible with an Arduino :) You just need to convert the time information into an PWM value. I work with PICs because I think they are quite affordable. The PIC16F1455 that I am using here costs around $2-$3 per piece, and the PICkit3 costs around $25. But you only need to buy the PICkit3 once, so after a few projects you come out ahead :) But it doesn't really matter, I am sure you can do this project on many other microcontroller platforms as well.
@lexpee
@lexpee 2 года назад
Thank you for your answer, i will think about it. I have a little experience with programming Anduino projects. I don't know what programming language is used for those PIC processors.
@FriendlyWire
@FriendlyWire 2 года назад
@@lexpee I have a lot of videos about them here. The language they use is a C dialect. Check out this video here if you want to learn more: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mUhzqDD6dg4.html
@lexpee
@lexpee 2 года назад
Thank you for the link. This is for me too complicated to using 3 programs to program one chip. Arduino is much simpler.
@FriendlyWire
@FriendlyWire 2 года назад
@@lexpee I know, PICs are not as beginner-friendly as Arduinos, true, but I actually like to go through microcontroller datasheets and figure out how to talk to different registers, it's like a puzzle game for me. That's why I like this saying: the "best" tool is the tool you know how to use :)
Далее
CD4017 code lock with wrong code detection
20:26
Просмотров 9 тыс.
Control LEDs with your computer using RS232!
16:09
Просмотров 58 тыс.
Making a safe with servos & NE555 timers
11:29
Просмотров 2,9 тыс.
I built my own computer. by hand.
13:03
Просмотров 1,1 млн
Hacking a weird TV censoring device
20:59
Просмотров 3 млн
Analog Chip Design is an Art. Can AI Help?
15:48
Просмотров 188 тыс.
CD4017 tutorial: the IC you can count on!
17:49
Просмотров 31 тыс.
Can Reaction Wheels control a Drone?
24:32
Просмотров 2,4 млн
MAGNETRON - Teardown + How It Works - Dangerous!
14:07
Просмотров 895 тыс.
Your first microcontroller project!
19:44
Просмотров 66 тыс.