@@01Hudesohn because that’s how LCDs are driven, to prevent damage which is caused by extended application of DC. I forget what the exact mechanism of damage is, but AC is how we prevent it.
@@01Hudesohn the backplane on an lcd (same as the common pin on an led 7 segment) is driven by a uC pin with a square wave. The segments are driven by another pin at opposite phase so the lcd effectively sees an ac square wave voltage. If the segment is meant to be inactive, the pin drives it in phase so the effective voltage is 0v. He shows it on the oscilloscope near the end.
I got really amazed by the DCF77 receiver, never heard of them before here in Brazil (maybe because the signal can't reach outside Europe anyway). I wish we had something similar here, auto-adjust is a must have feature for clocks for me.
I think there should be an North American/ South American equivalent. I know that there is a Japanese radio clock standard that services a part of Asia. So, I gues there should be one for the Americas also.
It looks like Argentina and Brazil both transmit a clock reference signal on 10MHz with the National Observatory's DSO also on 166.53MHz and 171.13MHz.
@@DiodeGoneWild Surely the best would be a GPS PPS signal - accurate to microseconds anywhere in the world. They are in fact the basis of the majority of stratum 1 NTP servers on the internet, which I well know as I operate one!
I am a PIC guy myself, but I am working at something similar using a DS3231 RTC, a set of 6 new old stock Philips Nixie Ring counter modules and a DCF receiver.
@@teslakovalaborator PICs were my first microcontroller experience and I stuck with them. I know there are more powerful microcontrollers out there, but I come to have a pretty good understanding of PICs and their assembley language. I hate that LEDs under any type of tubes :). And even if I wanted to put LEDs under the nixies, I can't, because they are the small, solderable type and there is no place under them for any kind of led or other nonsense :).
I really liked your program and overall electronics design because of it's efficiency, it is like industrial standard for me. Unlike new coders / schematics makers that use a lot of unecessary code and unexplainable hardware design.
Can also run from a nearly dead lithium cell as well, just put a battery management board on it, and charge it up every 6 months from 5V via a resistor, and it will use most of the capacity of the cell just in the battery monitor, the clock itself taking the same power. Will also last years on the bigger pouch cell, or you can simply add on a small thin film 1W solar panel, probably a 6V output one, and a second battery management board connected to the panel direct, so as to charge with the ambient light, and compensate for the slight discharge. No need for direct sunlight, just the room light, like a calculator, to keep the cell topped up.
There are some Atmega and PIC devices that do drive multiplexed LCDs directly, I know that's too "simple" but it might make sense to explore that capability if you happen to have a device with that peripheral.
2:25 - 14:11 - not easily, it's a problem these days (not only) with these microcontrollers availability; on Microchip website "in production" but : Out of Stock Additional quantities can ship by 18-May-2023 ... For example after searching for word "atmega" on TME website, there are 567 results but if you check option show only available in stock - there are now ... 13 results.
yes, they are :) They are good for prototyping boards, as long as you don't heat them too much during soldering - the insulation would melt. They are also useful for breadboard testing.
@@DiodeGoneWild For some reason my ethernet wires always end up in bad connections on the breadboard. It's weird because i believe that they have the same cross section as that of a regular hookup wire
@@DiodeGoneWild i thouht they were from phone cables tho maybe they are the same type of wire but 4 pairs in i cable. Also are those solid or stranded? i often use solid but sometimes they break inside so i can see why stranded may work sometimes better. What type did u use or do u use what u have available?
It´s a ATmega Programmable IC. You can program what you want. Some Module parts available. Retrofitting a small Radio Circuit would be the simplest Method.
@@01Hudesohn An FM/AM radio is a big story by itself. There are software control radios which can be controlled digitally and will be beyond his show and tell power supply dissectings.
the lcd in my multimeter is not multiplexed, so is 3*7 + dp and sign and segments to make (1 and -) so it has a 34 output shift register as driver, the data to the shift register also drives an LED and the meter comes with an opto-diode-serial lead so a PC can decode the data for logging, i found it a very odd way for it to be made.
ATMega16? It looks just like what I need for a multi-timezone VFD clock project I'm thinking about building. Probably will team it with an ESP8266 for NTP time sync, but the main control will be on the Atmega part.
Fantastic dude did u use assembly for programming? It's pretty hard to write programs in assembly language I'm using iar for stm8 for many years and after i watch ur previous clock video i go for its core and try to learn it in assembly but that was bloody hard. After 3 days i could understand its instructions and i have a success in set clock unit ( it doesn't have fusebits like avr and its clock unit is a little complicated ) and gpio but its a kind of slow and hard process i think if u can do this u should go for pretty cheap Chinese MCUs some of them don't have any compiler and most people can't program them so ur skill is a kind of rare and worthy on that field
ARM assembly and the STM32 is a lot harder than (excuse me for being contraversial) "real" RISC architectures.... if you want to get into assembly, I heartily recommend AVR chips..... they're niiice!
I used to working with stm32 and nxp mcu before I'm actually a developer and I'm now working in a company which is making power electronics pcbs for driving electromotors stm8 especially their AF series are pretty robust against industrial noises and they are also pretty cheap so now we are using them in order to making custom motor drivers for our costumers. We also working on data loggers and measurement instruments and we didn't have any problems with stm8 mcu they are cheap and they are way better than avr we test them in high electromagnetic field atmega mcus restart again and again and don't work properly but stmaf series can handle that kind of industrial noises pretty well so we use them and it's not my choice to use them i actually start mcu learning with 8051 MCUs in assembly and work with all kind of MCUs, some dsp chips and fpga chips as well and i think stm32 is easiest because st give people HALL library and stmcube do all the job for u. I should say stm8 also has spl library but u know u can't compare them it's not complete package and u still should do all the job by ur self. But i think it can be a good challenge for people who wants to get into it.
Eh, you went a bit overboard with it... three batteries for this... There's microcontrollers like Microchip PIC16LF1904 which can run from as low as 1.8v at 16 Mhz, have a built in LCD driver that can do up to 116 segments and has a secondary oscillator optimized for time keeping (you can attach a 32768 Hz crystal to get very good time keeping) You could add a couple calculator solar cells under the lcd screen and a capacitor or something that would charge throughout the day up to 3-3.6v or so and power the chip, and when the capacitor discharges too much, it falls back to the CR2032 battery. The programmer is super cheap, if you want to play with PIC microcontrollers, shouldn't be more than 10-15$.
ATtiny (and even some ATmega) chips can also run down to 1.8V, but in this case I use a higher voltage also because of the thermometer and the internal voltage reference for it. So I needed to be above 2.7V. But with a 2032 it would work, because it stays above 2.7V for over 90% of the discharge (its discharge curve is flat). On the other hand, alkaline battery voltage goes down very steeply as they discharge.
Have you ever tried creating boards for digital watches? I have a cooked Elektronika 5 watch. I wanted to remanufacture a pcb for it and re-use the old LCD, but haven't figured out what kind of IC's to use. I know it needs a dedicated RTC and microcontroller, but that's it. Would love your thoughts on this. Edit note: in the video you said DC voltage destroys LCD's so i might not be able to reuse the old LCD cause i was playing with it with an arduino PWM signal, to see how the pins react.
watches are a bit too tiny for me :). DC doesn't destroy the LCD quickly, it probably takes some time, so your display might still be good. DC can be used shortly for testing.
The clock crystal drift is strongly correlated to its temperature. Your clock has a temperature sensor, so shouldn't you be able to auto-correct for the drift in software?
quisiera construir algun reloj pero con pantallas VFD y sin microcontroladores programables. si no consigo el metodo supongo que solo me quedara usar microcontrolador.
Smart phones killed the need for clocks and watches. An ESP32, 2xAA cells and an I2C I/O expander, can make a great WiFi enabled synchronized clock. It has a very sophisticated RTC (Real Time Clock) circuit, and even a ULP (Ultra Low-power Processor), which can run code in 10uA sleep mode. If you just want the RTC, 2.5uA is hard to beat. You'll need to get out of sleep mode to access wifi and sync the clock once a day, if you want millisecond accuracy. like any typical PC updates its clock.
Trust me, the ULP is a pain in the ass, it's programed in assembler with a special toolchain and need some linking the .asm The ESP32 isn't very energy efficient
Doing things the old fashioned way, taking the pain to make the clock sync is way for fun! than building things with pre-designed sophisticated modules!
Thanks :) I used the last free pin for the temperature sensor, so no alarm. And I intended this for a living room, so I didn't need an alarm. For bedroom, I have built some LED clocks with alarm. LED ones are probably more suitable as bedroom alarm clocks anyway because you want them to be readable in the night.
I like your channel for the down to earth approach. These are realistic usage cases and repair method for normal, which is way more useful than all these stuck-up hypothetical RUclips-electronics-channels, where they are using thousands of Euros expensive equipment for solving problems in devices that non rich people never will be able to own anyways... I hope with some more practice you will be able to reduce your accent a bit, because sometimes you honestly are hard to understand, at least for me.
If you don't mind me asking, what software do you use for schematic drawing? I checked your website and couldn't find anything. By the way, your content is gold; I'm binging on it.
Awesome explanation as always. I have one question though, how do you achieve the output of a negative voltage from you microcontroller in order to create the alternating current. From the schematic I cannot easily extract how that is done. Thanks in advance.
Everything is relative. It’s not actually a negative voltage as far as the microcontroller is concerned, rather the 0V rail. But to the LCD this ‘looks’ negative when compared to the average voltage that each segment sees.
2 года назад
Drive the + pin with 5V and the - pin with 0V. You are familiar with this. The LCD will see 5V from + to - pin (5V - 0V = 5V). Now, invert this: drive the + pin with 0V and the - pin with 5V. From the + to - pin it is now -5V (0V - 5V = -5V). Alternate between the two configurations and you have generated a 10 Vpp (peak-to-peak) signal between the + and - pins. Effectively what you are doing is driving the + pin with a 0V to 5V square wave signal, and driving the - pin with the same 0V to 5V square wave shape, but shifted 180°. From the + to the - pin you would see a square wave signal of the same shape, but it would be swinging from -5V to +5V. If you do not want a square wave at the LCD, you could also change the driving signals so that the LCD would see 5V -> 0V -> -5V. (Though in reality the switching frequency and the stray capacitance of the connections are likely large enough that what the LCD sees more closely resembles a sine wave than a square wave, but I digress.) This is a nice trick you can use when you are blessed with differential signaling (i.e. you can control both the + and the - pin). This is how computer components communicate at high speed (modern RAM clocks are 1000+ MHz). The voltage is low (DDR3L was 1.35V), yet because the clock and strobe signals are differential, the swing at the driven pins is larger. (Of course there are other benefits to this, but transmission lines and HF PCB design are a topic for another time.) Hope this helps at all. Excuse the digressions :)
Low frequency crystals are roughly the same accuracy as the high frequency ones. The problem is that when using a low frequency crystal with ATmega16(A), you're stuck with the internal capacitors and you can't use external ones for fine tuning. Or at least I didn't figure out how to disable the internal ones. Maybe I'm missing something. But anyway, the digital adjustment is better than changing capacitors ;).
He didn't explain the complexity of the LCD driver. Why do you think an LCD driver would be much harder than an LED one? You build an exact circuit for LED, but you create a timer to xor the outputs 30 times per second or so. I think a mutiplexed LED circuit is harder to manage. This LCD clock is not mutiplexed which I think has less code to write than the same Mutiplexed LED one. He probably used another timer to offset the clock inaccuracy. One suggestion for him. The crystal is temperature dependent and this offset changes by the temperature and perhaps the age of the crystal which is another story. An idea is to correlate the offset with the room temperature. Since the clock has a temperature sensor, it can change this offset dynamically with respect to temperature. You can put your clock in the fridge and measure the temperature and the frequency of the crystal oscillator. And also you know how much it is in the room temperature. Then whenever you want to apply the offset you correlated the offset with the average room temperature. Then you will almost have an atomic clock and never have to set the time as long as the batteries last ;)
LED can working even for ages on DC (if it only not overheated). LCD can't because DC flowing thru liquid crystals causes electrolisis and this is reason why LCD need clock signals out of phases, or more precise - without having added constant dc offset. But it refers to only multiplexed signals. If you make some intelectual effort you can make it in progam by writting only one class for multiplexing and use it for drive a lot of pixels/digits witout matter about low level signals layer. Temperature is another problem but what is more interesting you is drift temperature coefficient, daily, yearly etc not it absolute value. As long as integral values of temperature differencies are constatn it not affec day to day time counter. Only temp. drifts can affect your timer. And with standard quartz 30 ppm tolerances it gave you few second for day absolute error.
@@romanowskis1at We are talking about apple and orange here. Since the temperature is not constant during days and the 32k Crystal frequency changes by temperature, so the average value of drift is not constant during the year. So you do not assume the frequency drift rate is fixed. However to measure the 32k crystal frequency accurately, you need to have a PLL and a frequency multiplexer. The LED has more hardware complexity than LCD because you need to use some external transistors and resistors. But for LCD as long as you get the voltage right you get the right contrast. For very complex LCDs, there are drivers that use i2c or spi or other protocols. You never have to do this kind of low level hardware design.
what ac frequency is ideal for driving an lcd segment.? what current? do i drive it direct to voltage or w series resistnce? sorry i cant find datasheets gor lcds online.
Well only some very small pulse current flows. LCD is a capacitive, voltage controlled display, so no current and thus no current limiting. The optimal frequency for driving LCDs is 50-150Hz, that doesn't matter much. What matters the most, is the duty cycle: it has to be exactly 1:1.
As i promised I send to your email, my version of 2 displays clock edited to VFD + old code in Bulgarian language. I still did not look at the new code.
When they burn out from DC voltage it's just kind of sad. They slowly fade out or start leaking into neighboring cells. Then it's time for some hand tools.
1 second per day = 11.574 ppm 1 second per week = 1.653 ppm For example, if it is 3 seconds ahead after 1 week, you need to correct it by -5ppm (-1.653 x 3)
Can someone tell me how to ppm correct a watch for Arduino?? Inside Arduino code.. *I need the logic or the simple math* I mean how can I correct time via ppm using Arduino ide??
Thank you. Nice project. For the clock that is the subject of this video, if you could determine that its time drift is caused by thermal drift, you might could have the MCU automatically adjust for the drift, because you are already tracking the temperature. Just a thought.
well, I know, I could :) but this is already complex enough. It's meant for indoor use where the temperature doesn't vary that much, so this would be what I already consider overengineered.
2 года назад+1
@@DiodeGoneWild Next project: Small thermal/atmospheric chamber so you can determine the specific effects of temperature on oscillator drift for each project :D
And if you build one of these in the US, and take it to your school, to show your shop teacher, you can get arrested. Especially if you're of Middle Eastern heritage. Yes. This actually happened here.
US seems to be self-destructed by this paranoia... Why live in constant fear and suspicion? In the 2 million year history of humankind, you hardly find a safer era to live in.
I had no idea LCDs need AC! Learned something today. Multiplexing them looks bloody complicated.
What makes you think that it need AC?
Can run on dc but with ac it will last long as far as I know
@@01Hudesohn because that’s how LCDs are driven, to prevent damage which is caused by extended application of DC. I forget what the exact mechanism of damage is, but AC is how we prevent it.
@@tookitogo AC prevents damage? The Clock runs on DC Batteries.
@@01Hudesohn the backplane on an lcd (same as the common pin on an led 7 segment) is driven by a uC pin with a square wave. The segments are driven by another pin at opposite phase so the lcd effectively sees an ac square wave voltage. If the segment is meant to be inactive, the pin drives it in phase so the effective voltage is 0v. He shows it on the oscilloscope near the end.
I got really amazed by the DCF77 receiver, never heard of them before here in Brazil (maybe because the signal can't reach outside Europe anyway). I wish we had something similar here, auto-adjust is a must have feature for clocks for me.
There are some other accurate time transmitters around the world. Look for "Radio clock" on wikipedia, there seems to be a list of them.
I think there should be an North American/ South American equivalent. I know that there is a Japanese radio clock standard that services a part of Asia. So, I gues there should be one for the Americas also.
It looks like Argentina and Brazil both transmit a clock reference signal on 10MHz with the National Observatory's DSO also on 166.53MHz and 171.13MHz.
Yeah, DCF77 is an European thing. ☺
@@DiodeGoneWild Surely the best would be a GPS PPS signal - accurate to microseconds anywhere in the world. They are in fact the basis of the majority of stratum 1 NTP servers on the internet, which I well know as I operate one!
I am a PIC guy myself, but I am working at something similar using a DS3231 RTC, a set of 6 new old stock Philips Nixie Ring counter modules and a DCF receiver.
PIC are not so fashionable, but great project anyway. I hope you are definitelly not placing that LED sh*t under the nixie tubes :D
@@teslakovalaborator PICs were my first microcontroller experience and I stuck with them. I know there are more powerful microcontrollers out there, but I come to have a pretty good understanding of PICs and their assembley language.
I hate that LEDs under any type of tubes :). And even if I wanted to put LEDs under the nixies, I can't, because they are the small, solderable type and there is no place under them for any kind of led or other nonsense :).
Thank you for updating your crystal compensation code. My mistake was 20 seconds / year. I hope it shrinks after the repair.
Very good project. 👍
"...and here is my dog." Love it! Excellent content.
I really liked your program and overall electronics design because of it's efficiency, it is like industrial standard for me. Unlike new coders / schematics makers that use a lot of unecessary code and unexplainable hardware design.
Thanks :) yes, why use more components and more cpu cycles than needed ;).
Well it's about TIME you made a video like this. 🤣
Nice clock , you can use a solar panel and a super capacitor to get rid of the battery.
Can also run from a nearly dead lithium cell as well, just put a battery management board on it, and charge it up every 6 months from 5V via a resistor, and it will use most of the capacity of the cell just in the battery monitor, the clock itself taking the same power. Will also last years on the bigger pouch cell, or you can simply add on a small thin film 1W solar panel, probably a 6V output one, and a second battery management board connected to the panel direct, so as to charge with the ambient light, and compensate for the slight discharge. No need for direct sunlight, just the room light, like a calculator, to keep the cell topped up.
Esp32 with internet to time server. Always accurate, no issues. Don’t waste time with adjusting time again
There are some Atmega and PIC devices that do drive multiplexed LCDs directly, I know that's too "simple" but it might make sense to explore that capability if you happen to have a device with that peripheral.
Fantastic video, with loads of great info....many thanks!
Super explanation, as always! Thanks!
Your accent is so funny I like it
2:25 - 14:11 - not easily, it's a problem these days (not only) with these microcontrollers availability; on Microchip website "in production" but : Out of Stock Additional quantities can ship by 18-May-2023 ... For example after searching for word "atmega" on TME website, there are 567 results but if you check option show only available in stock - there are now ... 13 results.
Even if no longer produced, eBay is still full of them. They are probably taken from scrap electronics, but 99% of them work fine.
Looking forward to a video where you explain how you managed to re-engineer your cat into a dog.
Plz make electronic waigh scale using atml common uc
Thank you for sharing your knowledge
Are those wires from stripped Ethernet cables? I strip the outer sheath off Ethernet cables a lot for nice small wiring haha
yes, they are :) They are good for prototyping boards, as long as you don't heat them too much during soldering - the insulation would melt. They are also useful for breadboard testing.
yes, also the CAT6's ones are perfect-fit for breadboards and female pin headers
@@DiodeGoneWild For some reason my ethernet wires always end up in bad connections on the breadboard. It's weird because i believe that they have the same cross section as that of a regular hookup wire
You also can use wirerap
@@DiodeGoneWild i thouht they were from phone cables tho maybe they are the same type of wire but 4 pairs in i cable.
Also are those solid or stranded? i often use solid but sometimes they break inside so i can see why stranded may work sometimes better. What type did u use or do u use what u have available?
Great project. Can you add a radio alarm function to it?
It´s a ATmega Programmable IC. You can program what you want. Some Module parts available. Retrofitting a small Radio Circuit would be the simplest Method.
@@01Hudesohn An FM/AM radio is a big story by itself. There are software control radios which can be controlled digitally and will be beyond his show and tell power supply dissectings.
Please make a video on *how to calculate right ppm value to correct the crystal error* 🙏
I didn't find anything about this on google 🙏
the lcd in my multimeter is not multiplexed, so is 3*7 + dp and sign and segments to make (1 and -) so it has a 34 output shift register as driver, the data to the shift register also drives an LED and the meter comes with an opto-diode-serial lead so a PC can decode the data for logging, i found it a very odd way for it to be made.
Awesome work.
Cool clock
Can you make a video where you explain your Code in Detail? I would watch every second!
Maybe one day I will make a video about ASM code, but such video is going to be many many hours long... :D
Nice clock, DGW. Wanna bring it to the whitehouse?
Cool dog! How does the cat feel about him?
ATMega16? It looks just like what I need for a multi-timezone VFD clock project I'm thinking about building. Probably will team it with an ESP8266 for NTP time sync, but the main control will be on the Atmega part.
Fantastic dude did u use assembly for programming? It's pretty hard to write programs in assembly language I'm using iar for stm8 for many years and after i watch ur previous clock video i go for its core and try to learn it in assembly but that was bloody hard. After 3 days i could understand its instructions and i have a success in set clock unit ( it doesn't have fusebits like avr and its clock unit is a little complicated ) and gpio but its a kind of slow and hard process i think if u can do this u should go for pretty cheap Chinese MCUs some of them don't have any compiler and most people can't program them so ur skill is a kind of rare and worthy on that field
ARM assembly and the STM32 is a lot harder than (excuse me for being contraversial) "real" RISC architectures.... if you want to get into assembly, I heartily recommend AVR chips..... they're niiice!
I used to working with stm32 and nxp mcu before I'm actually a developer and I'm now working in a company which is making power electronics pcbs for driving electromotors stm8 especially their AF series are pretty robust against industrial noises and they are also pretty cheap so now we are using them in order to making custom motor drivers for our costumers. We also working on data loggers and measurement instruments and we didn't have any problems with stm8 mcu they are cheap and they are way better than avr we test them in high electromagnetic field atmega mcus restart again and again and don't work properly but stmaf series can handle that kind of industrial noises pretty well so we use them and it's not my choice to use them i actually start mcu learning with 8051 MCUs in assembly and work with all kind of MCUs, some dsp chips and fpga chips as well and i think stm32 is easiest because st give people HALL library and stmcube do all the job for u. I should say stm8 also has spl library but u know u can't compare them it's not complete package and u still should do all the job by ur self. But i think it can be a good challenge for people who wants to get into it.
Eh, you went a bit overboard with it... three batteries for this... There's microcontrollers like Microchip PIC16LF1904 which can run from as low as 1.8v at 16 Mhz, have a built in LCD driver that can do up to 116 segments and has a secondary oscillator optimized for time keeping (you can attach a 32768 Hz crystal to get very good time keeping)
You could add a couple calculator solar cells under the lcd screen and a capacitor or something that would charge throughout the day up to 3-3.6v or so and power the chip, and when the capacitor discharges too much, it falls back to the CR2032 battery.
The programmer is super cheap, if you want to play with PIC microcontrollers, shouldn't be more than 10-15$.
ATtiny (and even some ATmega) chips can also run down to 1.8V, but in this case I use a higher voltage also because of the thermometer and the internal voltage reference for it. So I needed to be above 2.7V. But with a 2032 it would work, because it stays above 2.7V for over 90% of the discharge (its discharge curve is flat). On the other hand, alkaline battery voltage goes down very steeply as they discharge.
Have you ever tried creating boards for digital watches? I have a cooked Elektronika 5 watch. I wanted to remanufacture a pcb for it and re-use the old LCD, but haven't figured out what kind of IC's to use. I know it needs a dedicated RTC and microcontroller, but that's it. Would love your thoughts on this.
Edit note: in the video you said DC voltage destroys LCD's so i might not be able to reuse the old LCD cause i was playing with it with an arduino PWM signal, to see how the pins react.
watches are a bit too tiny for me :). DC doesn't destroy the LCD quickly, it probably takes some time, so your display might still be good. DC can be used shortly for testing.
@@DiodeGoneWild oh okay, thanks for your answer:)
Yay for dog!
-> LC-Display
nice, maybe add an LED backgound light (RGB + white) that is powered by another set of batteries / NiMH accumulators
Really, what is RGB + white light needed for in a clock? :D
@@DiodeGoneWild -
it´s an optional nice to have to choose te color of the display you want , just like my "Rok Rugby" MP3 player from 2005
14:01 yes
The clock crystal drift is strongly correlated to its temperature. Your clock has a temperature sensor, so shouldn't you be able to auto-correct for the drift in software?
It's probably possible, but it would add a lot of extra complexity and it would be overengineered :). Indoor temperature doesn't vary that much.
quisiera construir algun reloj pero con pantallas VFD y sin microcontroladores programables. si no consigo el metodo supongo que solo me quedara usar microcontrolador.
Smart phones killed the need for clocks and watches.
An ESP32, 2xAA cells and an I2C I/O expander, can make a great WiFi enabled synchronized clock.
It has a very sophisticated RTC (Real Time Clock) circuit, and even a ULP (Ultra Low-power Processor), which can run code in 10uA sleep mode.
If you just want the RTC, 2.5uA is hard to beat.
You'll need to get out of sleep mode to access wifi and sync the clock once a day, if you want millisecond accuracy. like any typical PC updates its clock.
Trust me, the ULP is a pain in the ass, it's programed in assembler with a special toolchain and need some linking the .asm
The ESP32 isn't very energy efficient
Why you didn't make a gps synchronised clock , and how you choose the right ppm correction value .
Doing things the old fashioned way, taking the pain to make the clock sync is way for fun! than building things with pre-designed sophisticated modules!
Часики прикольные но не хватает будильника , а так всё нравится хорошая работа .
Thanks :) I used the last free pin for the temperature sensor, so no alarm. And I intended this for a living room, so I didn't need an alarm. For bedroom, I have built some LED clocks with alarm. LED ones are probably more suitable as bedroom alarm clocks anyway because you want them to be readable in the night.
Спасибо вам за ответ . Мир, Дружба , Май .
thank you great video. AGAIN... AND YOU HAVE A DOG!!! I WONDER IS HE AS CLEVER AS YOUR CAT??? WE WILL HAVE TOO SEE.. ; )
Nice idea if we lived in 1960
I like your channel for the down to earth approach. These are realistic usage cases and repair method for normal, which is way more useful than all these stuck-up hypothetical RUclips-electronics-channels, where they are using thousands of Euros expensive equipment for solving problems in devices that non rich people never will be able to own anyways... I hope with some more practice you will be able to reduce your accent a bit, because sometimes you honestly are hard to understand, at least for me.
8:13 It is supposed to show only 1 & 2 and not "1,2&3" isn't??
Our date format is the day first, then the month, so it has to be able to display 31. 12.
can you reverse engineer a pwm and mppt solar charger controller🤔👌👍
Maybe the next is build VFD version..
A dog ? You are getting better and better ! ;-)
If you don't mind me asking, what software do you use for schematic drawing? I checked your website and couldn't find anything. By the way, your content is gold; I'm binging on it.
Pen and Paper
How did you make that DCF77 receiver module itself? Or where did you buy it?
the DCF77 receiver module is from ebay.
Beauty cool!.
can i use LM35 instead of mcp9700 ?
You can't. Both are 10mV/°C, but MCP9700 output voltage is shifted 500mV up.
@@DiodeGoneWild Ok Thank you👍
No cat?
Awesome explanation as always. I have one question though, how do you achieve the output of a negative voltage from you microcontroller in order to create the alternating current. From the schematic I cannot easily extract how that is done. Thanks in advance.
Everything is relative. It’s not actually a negative voltage as far as the microcontroller is concerned, rather the 0V rail. But to the LCD this ‘looks’ negative when compared to the average voltage that each segment sees.
Drive the + pin with 5V and the - pin with 0V. You are familiar with this. The LCD will see 5V from + to - pin (5V - 0V = 5V).
Now, invert this: drive the + pin with 0V and the - pin with 5V. From the + to - pin it is now -5V (0V - 5V = -5V).
Alternate between the two configurations and you have generated a 10 Vpp (peak-to-peak) signal between the + and - pins.
Effectively what you are doing is driving the + pin with a 0V to 5V square wave signal, and driving the - pin with the same 0V to 5V square wave shape, but shifted 180°. From the + to the - pin you would see a square wave signal of the same shape, but it would be swinging from -5V to +5V.
If you do not want a square wave at the LCD, you could also change the driving signals so that the LCD would see 5V -> 0V -> -5V. (Though in reality the switching frequency and the stray capacitance of the connections are likely large enough that what the LCD sees more closely resembles a sine wave than a square wave, but I digress.)
This is a nice trick you can use when you are blessed with differential signaling (i.e. you can control both the + and the - pin). This is how computer components communicate at high speed (modern RAM clocks are 1000+ MHz). The voltage is low (DDR3L was 1.35V), yet because the clock and strobe signals are differential, the swing at the driven pins is larger. (Of course there are other benefits to this, but transmission lines and HF PCB design are a topic for another time.)
Hope this helps at all. Excuse the digressions :)
Was the choice of a low frequency crystal a factor in the poor timekeeping of the clock DGW?
Low frequency crystals are roughly the same accuracy as the high frequency ones. The problem is that when using a low frequency crystal with ATmega16(A), you're stuck with the internal capacitors and you can't use external ones for fine tuning. Or at least I didn't figure out how to disable the internal ones. Maybe I'm missing something. But anyway, the digital adjustment is better than changing capacitors ;).
Where is the cat? 🤔
He didn't explain the complexity of the LCD driver. Why do you think an LCD driver would be much harder than an LED one? You build an exact circuit for LED, but you create a timer to xor the outputs 30 times per second or so. I think a mutiplexed LED circuit is harder to manage. This LCD clock is not mutiplexed which I think has less code to write than the same Mutiplexed LED one.
He probably used another timer to offset the clock inaccuracy. One suggestion for him. The crystal is temperature dependent and this offset changes by the temperature and perhaps the age of the crystal which is another story. An idea is to correlate the offset with the room temperature. Since the clock has a temperature sensor, it can change this offset dynamically with respect to temperature. You can put your clock in the fridge and measure the temperature and the frequency of the crystal oscillator. And also you know how much it is in the room temperature. Then whenever you want to apply the offset you correlated the offset with the average room temperature. Then you will almost have an atomic clock and never have to set the time as long as the batteries last ;)
LED can working even for ages on DC (if it only not overheated). LCD can't because DC flowing thru liquid crystals causes electrolisis and this is reason why LCD need clock signals out of phases, or more precise - without having added constant dc offset. But it refers to only multiplexed signals. If you make some intelectual effort you can make it in progam by writting only one class for multiplexing and use it for drive a lot of pixels/digits witout matter about low level signals layer.
Temperature is another problem but what is more interesting you is drift temperature coefficient, daily, yearly etc not it absolute value. As long as integral values of temperature differencies are constatn it not affec day to day time counter. Only temp. drifts can affect your timer. And with standard quartz 30 ppm tolerances it gave you few second for day absolute error.
@@romanowskis1at We are talking about apple and orange here. Since the temperature is not constant during days and the 32k Crystal frequency changes by temperature, so the average value of drift is not constant during the year. So you do not assume the frequency drift rate is fixed. However to measure the 32k crystal frequency accurately, you need to have a PLL and a frequency multiplexer.
The LED has more hardware complexity than LCD because you need to use some external transistors and resistors. But for LCD as long as you get the voltage right you get the right contrast.
For very complex LCDs, there are drivers that use i2c or spi or other protocols. You never have to do this kind of low level hardware design.
Mcp9700a temp. Sensor ?
yes, why not? :)
Who cares about time when cat is missing.
Exactly.
Dog has replaced the cat in this story :D
what ac frequency is ideal for driving an lcd segment.? what current? do i drive it direct to voltage or w series resistnce? sorry i cant find datasheets gor lcds online.
Well only some very small pulse current flows. LCD is a capacitive, voltage controlled display, so no current and thus no current limiting. The optimal frequency for driving LCDs is 50-150Hz, that doesn't matter much. What matters the most, is the duty cycle: it has to be exactly 1:1.
cool
As i promised I send to your email, my version of 2 displays clock edited to VFD + old code in Bulgarian language. I still did not look at the new code.
Excellent video as always!! Sometimes they make by brain hurt from all that knowledge. Thank you!! ---|>|---
I like the fact you just simply built the clock into an electrical box with transparent lid. 😏
I’m sending you some people from tictoc
I didnt know you know asembly, why did u use asembly instead of c? (Now if you ever swich uC you will need to rewrite your program...)
ASM is more efficient and more adventurous. I'm not going to switch the uC. If I did, I'd probably have to change the schematic too.
I love it! Also can you show me how to build a clock in Proto using the dots segment?
When they burn out from DC voltage it's just kind of sad. They slowly fade out or start leaking into neighboring cells. Then it's time for some hand tools.
*Can anyone tell me How to calculate the ppm correction??*
1 second per day = 11.574 ppm
1 second per week = 1.653 ppm
For example, if it is 3 seconds ahead after 1 week, you need to correct it by -5ppm (-1.653 x 3)
@@DiodeGoneWild 🥺 Thanks professor you replied ❤️ this will be memorable day for me, love you from India 😇
Can someone tell me how to ppm correct a watch for Arduino?? Inside Arduino code.. *I need the logic or the simple math*
I mean how can I correct time via ppm using Arduino ide??
Can't you make it smaller text to display full day name instead of 3 digit .....oh so it's fixed 4 digits
👏👏👏👏👏👏
reading these comment tells me this is another great video. NOW "TIME" TO WATCH THE VIDEO... (see what i did there)
Thank you. Nice project. For the clock that is the subject of this video, if you could determine that its time drift is caused by thermal drift, you might could have the MCU automatically adjust for the drift, because you are already tracking the temperature. Just a thought.
well, I know, I could :) but this is already complex enough. It's meant for indoor use where the temperature doesn't vary that much, so this would be what I already consider overengineered.
@@DiodeGoneWild Next project: Small thermal/atmospheric chamber so you can determine the specific effects of temperature on oscillator drift for each project :D
برجاء تفعيل الترجمه للعربيه وشكرا
Marzy mi się zegar na przekaźnikach. Wachadło może być elektroniczne co by 1 s liczył. Zbuduj !
PL 👍👍👍
don't have commercial L CD
He didn't post the cat 😭
And if you build one of these in the US, and take it to your school, to show your shop teacher, you can get arrested. Especially if you're of Middle Eastern heritage. Yes. This actually happened here.
US seems to be self-destructed by this paranoia... Why live in constant fear and suspicion? In the 2 million year history of humankind, you hardly find a safer era to live in.
one of these e-paper displays would be even more efficient
👍👍👍