Wednesday, April 9, 2025

Northern Hemisphere, Southern Hemisphere, Magic Number Seven, and Sixteen LEDs

я 


On the photo above you can see digital clock. While it has only sixteen LEDs it is twenty four hours clock, which shows time with fifteen seconds precision. Appearance of this timepiece  is non-traditional and most people  may say that using it to read time would be not easy. In this post I'll try to disprove this claim.

Let us start with this episode of StarTalk Youtube channel. Here Neil deGrasse Tyson explains  the reason why all mechanical clocks (almost) have hands moving in the same  (clockwise) direction.


This episode only fifteen minutes long, but in case you are too busy to watch it  I'll provide short brief.

1. Precursor of mechanical clock was sundial. During the day  shadow of sundial gnomon moves  following the sun.  Inventors of first mechanical clock  built it in such a way that hands of clock   moved  similarly to shadow of gnomon. This is how  clockwise direction appears in our life.

2. Shadow of sundial moves clockwise only in Northern Hemisphere. In Southern Hemisphere shadow of sundial moves counter-clockwise. If mechanical clock would be invented in some place  to the south of the equator  clock scale and clock hand movement  would be opposite of what we have now. This  picture of a backward clock shows us how southern invented timepiece may look. You can buy such clocks on Amazon and after some time even get used to it. 


3.  Apart of  clockwise and counter-clockwise movement Neil in this episode discusses how invention of digital clock  changed human perception of the time.  Mechanical clock makes human think about time from geometrical perspective.  Angle between axis  and clock hand corresponds to the time which already passed or left. Recent invention of digital clock creates illusion of precision but deprives us from geometric association.

LED clock presented here is a hybrid. It works partially as a regular (like invented in Northern Hemisphere) clock and  partially as backward (invented in Southern Hemisphere) clock. And I want to think that it is a hybrid in other aspect: while be digital it still  gives some geometry perspective. To understand this timepiece  interface I invite you to play with the web model:  Half-Dial-Clock-Model Link

In case you don't want to click unknown link you can play with model locally. Here is my GitHub repository https://github.com/jumbleview/Clock16  You need to copy content of directory p5model
to your computer and open file index.html  with browser of your choice.


Model has four clocks,  which all synchronized and show the same time.

1. First clock at the left is the regular analogous clock. Nothing to comment here.

2. Second clock works similarly to the first, apart of the fact that in place  of clock hands there are circular arcs. Normally clock shows time by  angles between vertical axis and hands . This arc clock shows time by angles occupied by arcs (outer arc for minutes, inner arc for hours ). Arcs start at twelve mark and grows clockwise. 

3. Third model is a half-dial version of ark clock. For hours less than six and minutes less than thirty  reading the time is not different of the previous clock. Arcs start at twelve mark and grows clockwise. But when hours are in the range 6..12 or minutes are in the range 30..60 there is the change. Hands of the regular clock under these conditions  are positioned at the left side of dial. But for this arc clock there is no left side. Arcs here occupy the same right side but there are change of starting points   and direction  where arcs grow. Under these conditions arcs start not at the twelve mark but at the six  mark and they grow counter-clockwise. That way clock show hours from 6 till 12 and minutes from 30 till 60. In other words this clock works closer to normal clock for hours from 12 till 6 and minutes from 0 till 30. Otherwise this clock works closer to backward (Southern Hemisphere) clock. 

4. Fourth  clock is similar to the previous model but arcs are dotted not solid. This clock does not need dial marks: dots itself are marks. White dots of inner half-dial shows hours, green dots of outer   half-dial show time with five minutes precision. Additional  one minute precision achieved by a color of the last dot of minute arc. Just add color reading to the time provided by green dots (for cyan add +1, for purple add +2, for red add +3, and for blue add +4 ).  This last clock model is very close to the real LED based clock  (just substitute dots with LEDs). 

Model allows to play with clocks dynamically. Three time modes exist:

1. Manual mode. Top slider allows to change clock time.

2. Real time mode. Clock shows current local time on the machine where browser is running.

3. Simulated mode. Time change is simulated (bottom slider allows to increase or decrease simulation speed).

Real LED clock is different of dot half-dial model  by having two more lighting elements. 

1. Central LEDs changes color each fifteen seconds (cyan, purple, red, and blue). When clock is in set mode this LED is dark.  

2. LED on the left part of the clock is AM/PM flag. This LED is OFF during AM half of the day and ON during PM half. 

Clock is built around Atmega328p microchip. Circuit diagram, C program and Microchip Studio project you can find in the Git repository:  https://github.com/jumbleview/Clock16

And one last thing to say about the project. The clock has seven LEDs on the hours scale and seven LEDs on the minute scale. There is known psychology phenomenon:  "Magic Number Seven, Plus or Minus Two".  Invented by psychologist George A. Miller, it argues that  seven is  number of items human can keep in short-term memory to operate. Anything significantly more is out of cognitive capabilities of average person.  In  this regard clock presented here looks just right. I believe it is easy enough to get used to its interface. 


Saturday, February 1, 2025

Not Really Tiny

 Until recently I used for  my hobby electronics projects two types of microchips:

  • Atmel Atmega328p (in case I needed at least ten in/out pins);
  • Atmel Attiny85 (if  five or less in/out pins are enough).
But recently I discovered some new for me members in  Atmel family of devices: Attiny261/461/861. These microchips are not actually that tiny:  20 pins providing  16 in/out signals. On the photo below you can compare  Attiny461 in the middle to Attiny85 on the left and  Atmega328 on the right.


 It  occupies less space on a breadboard than Atmega328, but  still big enough for many hobby projects. But what makes this chip outstanding is the fact how convenient it is  for breadboard prototyping. Look at  pinout of this chip in PDIP package:


As you can see all bits of the A register are on the right side, all bits of the B register  are on the left side. Bits are numerated from the top to the bottom. Very easy to remember and really convenient!  And all pins to connect  AVRISP MKii programming interface are located on the left side of the chip.  That allowed me to make flat vertical adapter  and use it during prototyping with the breadboard. On the picture below you can see circuit with Attiny461 chip, two multi-color LEDs and adapter.


I believe AttinyX61 will find some more usage  in my upcoming projects.

Wednesday, January 1, 2025

The Prices Are Down!

 



Here you see the photo with  the price stand on the gas station in Lafayette (Bay Area, California). Photo I made on the last day of 2024 year.  One year ago (thirteen months to be precise )   I made similar photo. You can find it in this post: 'autumn colors'. To make a comparison easier I put the same photo again here.

As you can see prices of the gasoline are down almost by 10%! Not bad. There are some more positive changes: green grass instead of mulch. Bench disappeared as well, but I can't tell is it for the good.

It would be interesting to see where we will be at the end of 2025.



And Happy New Year btw. (Photo of  some front yard   on our neighboring street).
 


Friday, November 1, 2024

Halloween 2024

 Several photos I made this year in our neighborhood. 


This banjo duet plays nice country style music.



Front yard jazz band is on pre-Halloween rehearsal. 



Kids, does these toys  scary you?


This is an election year after all. Steve Garvey and his supporter.


Guards of the Star-Sprangled Banner.


Resting couple.





And the last video is of our house front window.  That is how it looks this Halloween.






Monday, September 16, 2024

Crane

 Yesterday,  on the trail in neighboring town, I have taken with my Pixel 6 Pro couple of pictures .

First one I made when crane just walked out of creek water.  

And here is the same crane again staying still next to a wired fence.




 

Friday, September 6, 2024

Wallpaper

 I just published small Go  project on GitHub:

https://github.com/jumbleview/decor

This is the program which takes jpeg picture as argument and set it as Windows desktop background.

Command line looks like this:

  • decor.exe [-s] path_to_jpeg_file
It starts with single argument: path to jpeg file. If before an argument there is the flag -s program starts in silent mode (without console).

Program reads jpeg file, encodes it, crops image so it's width-to-height ratio matches width-to-height ratio of computer monitor, saves the image as bmp file and sets it as a screen background.

It is pure Go program. It should be compiled with command

  • go build -ldflags -H=windowsgui 

  • Using such flags allows to start without Windows console attached. Console is created dynamically or suppressed by flag -s.

    This program allows to change background by desktop shortcut, batch file or schedule background change with Task scheduler.

    Update on September 13, 2024.

    One more project on GitHub:

    It is more advanced version of background utility.  It starts with such  command:
    • picshuffle.exe [-s] [-l] path_to_folder_or_jpeg_file

    If argument is a path to a jpeg file program  works exactly as decor.exe.   

    In case argument is a path to a directory with some jpeg files program reads content of directory and randomly picks one file from that directory to set it as a desktop background. Program tracks selected files in storage picshuffle.db so once selected file will not be selected again till all files from this directory are taken.
    I personally use this program out of Windows task scheduler at logon event. Each time after a logon into the system  I see different background picture.

    To track selected files program uses embedded key-value store  bolt  (go.etcd.io/bbolt). If started with flag [-l] program prints list of files used as a background within last 365 days.




      Friday, August 23, 2024

      Deer , Turtles, & Heron

       


      Get lucky to make this shot of two deer (probably mother and child) roaming around neighboring town.

      It is good  that may Pixel 6 Pro is always with me. Its telephoto lens is excellent.

      One more picture  I shot next day  in another neighboring town. It is a pond near town hall.


      The same phone, the same lens.

      And one more at the park lake.


      Monday, June 24, 2024

      Four Years in Use

       Four years ago I published post about my Go terminal application which I use as  personal password manager.

      https://www.jumbleview.info/2020/04/here-we-go.html

      During all these years I used it on constant basis making some tweaking here and there. This post  summarizes major changes.


      • Application now supports mouse interface. User can utilize keyboard  hits  and mouse clicks interchangeably.
      • At start application can be supplied with some flags. That allows  to select application colors, initial application mode, even  add new table column or delete existing one.
      • In case current cell contains valid URL user can open browser window on that URL with the help of WWW button.
      • There is no button Add anymore (its functionality  absorbed  by button Edit). 
      • When table is in focus user may select  row by hitting key which corresponds to the first letter of the  record name. 
      • Initial implementation had a security vulnerability: content of clipboard was not cleared  in case application was terminated  by closing console window .  Now it is fixed: disregarding of which  way application is terminated (by Ctrl+C, Exit button, or window closing)  clipboard is empty.
      Source code of the application  as well as readme is available to the public (same place)     https://github.com/jumbleview/tspur

      Saturday, June 1, 2024

      Tetris House

      Couple of photos of  new street art  artifact : "Tetris House". It is private house  in Duboce Triangle neighborhood of San Francisco. Owner recently made  his house to become piece of art.

       

      Street where this house located is not that wide and it is hard to catch the moment, when there are no cars parked, but I tried my best.


      And one more photo near the Market Street and 10th Street.


       

      Saturday, May 25, 2024

      Syntax Prototype Board

       From my experience succuss of electronic DIY project in a big part depends  on how good  you  solder circuit  components. And high quality soldering depends on the prototype board. Three years ago I have published my review of  Adafruit Board . It is indeed excellent  for small projects accommodating Attinny85 processor but for project based on Atmega328 it is too small.  For a long time my favorite boards for such projects were Radio Shack  catalog numbers #276170 and #270150. Alas, there are no anymore  Radio Shack stores around  and, while Radio Shack web site  still exists, boards are not on sale on there site. Sometimes Radio Shack boards can be bought on E-bay, but cost with delivery reaches   $15 or even more. I consider this as  too much. So I have started to look for a replacement. Eventually I found  this site They sells some useful  stuff including prototype boards. On the picture  below you can see the board taken from there.  I paid  for five boards with delivery  ~$25 (~$5 per a board).

      Boards came nicely wrapped into transparent material. On wrapper of each board there were labels: "Made in Taiwan". As you can guess board has  two power buses  and six rows of three  hole  pads.


      What differentiate this board form other unexpensive  protype boards is the fact that conductor strips   are not on  surface  but sandwiched in the middle. On one side of the board there is white paint picture  of conductors topology, on opposite side there are isolated spots for component soldering. At first I got frustrated of this fact: (what if I need to cut conductive strip), but eventually I got  used to it. By using some external wire and with boards three hole pads  I can  accommodate any circuit topology needed. Soldering  experience is very good. At least as good as with Adafruit board (maybe even better). 

       Below you can see project I made with this board.


      Project itself I published on Instructables site: https://www.instructables.com/Half-Dial-Wall-Clock/  




      Monday, May 13, 2024

      In Seven Years

       There are three pictures showing our front yard  at different stages within last seven years.

      Top picture made today. That's how front yard looks now. (I just put fresh two cubic yards of mini red mulch on it).



      Photo in the middle made a little bit more than two years ago in March of 2022.



      And bottom picture is form April of 2017, right after we converted green lawn to garden.



      Friday, March 15, 2024

      The Pi Day

      Yesterday there was March Fourteen. Since recently people around the world  used to  celebrate this date   as the Pi day.  After the work  my co-worker an myself   strolled   through  the  San Francisco downtown streets and found this view:


      Would it be the decent tribute  to the 3.14 number?  

      Overall the day was beautiful: warm and sunny. Here are some more street pictures:  



      Transamerica Pyramid.



      San Francisco mix.






      Arks and Lights.



      Early evening. Salesforce Tower.