Arduino LED "Roto" Clock and other Arduino Projects

A place for software, hardware and DSP-based audio gizmos. All things code and the hardware that runs it. Time and amplitude are described in bits and pieces here. Links to interesting gizmos and software.
User avatar
mediatechnology
Posts: 5649
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Arduino LED "Roto" Clock and other Arduino Projects

Post by mediatechnology »

Well it finally had to happen. Wayne modified and wrote some code.

The Arduino LED "Roto" Analog Clock:

Image

I will be adding switches and code for time-setting and may add WiFi Net time synchronization.
The display is single-wire data using WSM2812 addressable RGB LEDs.
The clock runs on an Arduino Nano ATMega328.

The time is 10:58:54.
Image

A broadcast countdown clock is also in the works.

I've also done a simple H-bridge stepper controller for a friend's project.
All it does is run a 50:1 gear-reduced 15° stepper at 3 RPM output shaft speed.
The stepper fits in an Arduino Nano ATMega168.

Image

The USB on these boards are not the standard FTDI232 but the lower-cost CH340.
The Arduino IDE is not supplied with CH340 drivers which must be downloaded here: http://www.wch.cn/download/CH341SER_EXE.html
It is the liar more than anyone who has reason to fear free speech.
https://ka-electronics.com
User avatar
JR.
Posts: 3732
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by JR. »

oh-oh... welcome to the dark side... :lol:

JR
Cancel the "cancel culture", do not support mob hatred.
User avatar
mediatechnology
Posts: 5649
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by mediatechnology »

I stay up late to code. Becoming a real night owl.

The stepper was an epic fail due to vibration. I suspected that when I ran it.
It wasn't the cogging, since it was geared, but internal clacking each time it stepped.
Too much vibration damping/shock mounting would be required.

We need a silent-running low RPM synchronous motor and they work quite well except for heat and 120/240 adaptation.
The client has been using a rotisserie motor and other than having to separately stock 120/240 they work well.
The 50/60Hz discrepancy isn't a factor.

I found some really cool brushless DC low RPM motors with gear boxes that are relatively flat.
They have the controller on-board and can be slowed, if needed, by external PWM.

It's back to the clock code to set the time.
No one bothers me at midnight. :ugeek:
It is the liar more than anyone who has reason to fear free speech.
https://ka-electronics.com
User avatar
JR.
Posts: 3732
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by JR. »

My ability to code has deteriorated over the years, :oops: not some single observable cognitive deterioration, but the requirement to hold so much related stuff in front of mind for easy access.

Back when I was still jogging I would work on difficult coding problems in my head while running 5 miles. Not detailed code work but obscure coding architecture or algorithm design. I could also come up with some solutions overnight apparently while sleeping. I used to call that my overnight engineering team. :lol:

Now I can have a hard time just figuring out code that I wrote myself, but some of that is because of sloppy documentation. Many thousands of lines of code in my drum tuner.

That said I can still have trouble reading some of my old electronic circuit schematics (like the TS-1), but they could be difficult to grok even before I got old. :roll:

JR
Cancel the "cancel culture", do not support mob hatred.
User avatar
mediatechnology
Posts: 5649
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by mediatechnology »

I finally got tired of the 5 seconds per day drift of the DS1307 RTC with this clock and tried out a DS3231 RTC module.

The DS3231 TCXO has a 0-40°C time base error of only ±2 ppm vs the almost 60 ppm error of the DS1307's external crystal.

I think I paid about $2.50 US for the DS3231 module.

Its I2C interface is identical and works with the Arduino RTClib.h library.
Other than declaring the rtc to be a DS3231 I had to change one line of code which tests to see if the clock has been initially set.

After 36 hours running in an unheated garage on an outside uninsulated wall I can't perceive any drift.
The $2.50 was well worth it and the accuracy is now as good as an $8.95 AA-battery-powered analog wall clock.
It is the liar more than anyone who has reason to fear free speech.
https://ka-electronics.com
User avatar
JR.
Posts: 3732
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by JR. »

my fancy outdoor thermometer (weather forecaster) has a radio updated time standard. Not that web connected computers are not accurate.

My fancy weather forecaster that always says it is going to rain, this week said it was going to snow.... :lol: still wrong about the weather but at least the thermometer works.

JR
Cancel the "cancel culture", do not support mob hatred.
User avatar
mediatechnology
Posts: 5649
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by mediatechnology »

I've been using my "Atomic" clocks sync'd to WWVB to check the new RTC.
I also use https://time.is and WWV's dial-up audio at 303-499-7111.
It is the liar more than anyone who has reason to fear free speech.
https://ka-electronics.com
User avatar
terkio
Posts: 305
Joined: Thu Feb 07, 2019 3:17 am
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by terkio »

mediatechnology wrote: Fri Jan 24, 2020 6:38 am
The DS3231 TCXO has a 0-40°C time base error of only ±2 ppm vs the almost 60 ppm error of the DS1307's external crystal.

I think I paid about $2.50 US for the DS3231 module.
Is the DS3231 a module or an IC ?
Is the Xtal integrated inside the IC ?
User avatar
mediatechnology
Posts: 5649
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by mediatechnology »

The DS3231 is an IC with an internal TCXO crystal.
I'm using a board with an on-board AT24C32 EEPROM like these: https://www.ebay.com/sch/i.html?_from=R ... o&_sacat=0
It is the liar more than anyone who has reason to fear free speech.
https://ka-electronics.com
User avatar
terkio
Posts: 305
Joined: Thu Feb 07, 2019 3:17 am
Contact:

Re: Arduino LED "Roto" Clock and other Arduino Projects

Post by terkio »

This clock accuracy, 2 ppm, is pretty amazing at this low cost $2.50.
I presumed integrating a crystal had a substantial cost. Not so, this looks like magic to me.
Other IC you might be interested in.
Audio player.
MP3 decoder chip.
http://www.flyrontech.com/eproducts/164.html
MP3 modules.
http://www.flyrontech.com/eproducts/?id=10
Post Reply