Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Digital Stonehenge

 



A self-calibrating solar observatory for a post-astronomy world





The original idea began as a small ML project that could learn time and date from the sun. It did not need ephemeris tables, GPS, or even awareness of where it was placed. The device would simply watch the sky, collect its own sunlight patterns, and build an internal sense of time from scratch. Over time, the concept evolved into something simpler, more robust, and aesthetically more interesting. The final vision became a compact solar observatory, a digital Stonehenge that lives entirely on natural sunlight, a crystal oscillator, and quiet geometry.


At its core, the design uses nothing more than a set of fixed sight lines and a sensitive photodiode. The simplest version discards moving mirrors and scanning steps entirely. Instead, a thick circular lid is drilled with multiple narrow tubes or fitted with thin fiber-optic channels. Each channel points at a specific azimuth and elevation. Most of the day, most of the channels remain dark. Only when the sun crosses the exact line of one of these channels does a burst of light reach the photodiode. A single hit per day is enough to correct internal time drift. Over many days and months, the pattern of which channels fire, and when, builds an implicit map of daily and seasonal sunlight.


The electronics remain minimal, almost primitive. A low-power microcontroller, a photodiode, a simple analog threshold detector or ADC, and a crystal timebase are enough. The device sleeps most of the time. It wakes periodically, samples each fiber channel, and records whether any registered light. When a hit occurs, it saves an event: crystal ticks since last hit, channel ID, intensity. Between hits it simply counts time with its crystal. The top of the device holds a small solar panel to keep the battery charged, a simple compass mark to align it to south at installation, and bubble levels to ensure the geometry stays consistent. The body itself can be built as a circular black box, something between a scientific instrument and an art object, even finished in Japanese lacquer to give it the presence of a crafted talisman.


Although the on-device logic stays intentionally simple, the accumulated data are rich. Months of logs, downloaded weekly or whenever convenient, form a large dataset of sun-angle events. Offline analysis on a laptop or desktop can fit hidden patterns. Without using astronomy tables, the system can discover the length of the local solar day, the date of the solstices, and the repeating structure of the solar year. Daily sun arcs define local solar noon, sunrise, sunset, and day length. Repeated cycles of rising and falling zenith heights gradually reveal the part of the year. With enough data, the system can even infer approximate latitude from the span of angles that the sun crosses. All of these relationships can be learned with simple regression, small sequence models, or even direct curve-fitting. No absolute reference is needed, only sunlight and time increments.


As a doomsday clock, this is a powerful idea. In a world without satellites, time servers, or any external coordination, the device becomes one of the few physical instruments capable of re-establishing a calendar. It tells local solar time based on the last correction from the sun and the drift of its internal crystal. It knows the day in its own solar year, defined by the interval between solstices. It re-learns the length of its year from observation alone. And because e-paper or simple LCD displays can remain off most of the day, the clock only lights up when a human wants to know the time, preserving energy and giving the device a quiet, ancient feel.


Future versions can build on this foundation. A more advanced “model D” version could replace fixed fibers with a tiny mirror, scanning the sky and collecting richer angle-intensity data for more precise models. The same enclosure and power system would still work. A weekly offline workflow can combine logs, train improved models, and upload new coefficients back into the device, letting the system grow smarter over time. In this way the digital Stonehenge becomes both a practical timekeeper and a long-term experimental platform for understanding sunlight, seasons, and autonomous learning.


This concept blends engineering, physics, and craft. It is a functional instrument, a quiet calendar, and a piece of art. And it is something that we can return to, refine, and eventually build into a working prototype.




As an Amazon Associate I earn from qualifying purchases.

Using stereo 3.5mm jack to communicate with IR remote

I was thinking about making a universal 3.5mm jack device (IR and more).

This is not a new idea, versions of it has been around for 7 years, but it is still a cool project.

Griffin had something like that patented for several years, read this article, it is still cool. RedEye Mini has recently covered it commercially. Total Control seems to have Android version.
    For IR remote, the first approach is to communicate to 3.5mm jack, it seems that you can pre-record messages as 36kHz - 44kHz, 16bit Stereo square PCM (pulse-code modulation) wave files. Here is a geeky in-depth article from 8051projects.net.

    RedMote is providing Android source code and apk as well as few sample WAV files. The design is very cool:

    Here are the components needed as provided by RedMote:



    Hackint0sh.org (Former Bender) is providing great schematics for the project:



    Quoting from the article: "two IR LEDs mounted in reverse [..] each IR LED will emit half the signal/frequency (15~20Khz). Together they will reproduce the original IR frequency exactly like the original remote."


    The optimal solution of course it to develop a sound generator and plug in the remote specifications.
    Here is a listing of remote specifications.



    I also think it would be cool to design Arduino board/shield that would plug in to 3.5mm jack and be able to receive:
    • IR emitter for controlling AV equipment (and add some social sharing component to TV watching)
    • IR proximity sensor to trigger stuff like alarm, or camera/voice recording
    • Ultrasound Sonar for various distance detection
    • and more..









    It take time and effort to create tutorials, please support my efforts with a couple dollar donation, any amount will be greatly appreciated!



    As an Amazon Associate I earn from qualifying purchases.

    Using stereo 3.5mm jack to communicate with IR remote

    I was thinking about making a universal 3.5mm jack device (IR and more).

    This is not a new idea, versions of it has been around for 7 years, but it is still a cool project.

    Griffin had something like that patented for several years, read this article, it is still cool. RedEye Mini has recently covered it commercially. Total Control seems to have Android version.
      For IR remote, the first approach is to communicate to 3.5mm jack, it seems that you can pre-record messages as 36kHz - 44kHz, 16bit Stereo square PCM (pulse-code modulation) wave files. Here is a geeky in-depth article from 8051projects.net.

      RedMote is providing Android source code and apk as well as few sample WAV files. The design is very cool:

      Here are the components needed as provided by RedMote:



      Hackint0sh.org (Former Bender) is providing great schematics for the project:



      Quoting from the article: "two IR LEDs mounted in reverse [..] each IR LED will emit half the signal/frequency (15~20Khz). Together they will reproduce the original IR frequency exactly like the original remote."


      The optimal solution of course it to develop a sound generator and plug in the remote specifications.
      Here is a listing of remote specifications.



      I also think it would be cool to design Arduino board/shield that would plug in to 3.5mm jack and be able to receive:
      • IR emitter for controlling AV equipment (and add some social sharing component to TV watching)
      • IR proximity sensor to trigger stuff like alarm, or camera/voice recording
      • Ultrasound Sonar for various distance detection
      • and more..









      It take time and effort to create tutorials, please support my efforts with a couple dollar donation, any amount will be greatly appreciated!



      As an Amazon Associate I earn from qualifying purchases.

      Magnetic Card Reader

      Here is a cool DIY project for couple of bucks worth of components:

      http://members.cox.net/berniekm/card.html


      As an Amazon Associate I earn from qualifying purchases.

      Magnetic Card Reader

      Here is a cool DIY project for couple of bucks worth of components:

      http://members.cox.net/berniekm/card.html


      As an Amazon Associate I earn from qualifying purchases.

      Arduino Mega 2560 - use of pins


      pins 2 to 13: Provide 8-bit pulse width modulation (PWM) output with the analogWrite(pin, value) function where value is between 0 (off) and 255 (full on). Used to light a LED at varying brightnesses or drive a motor at various speeds.The frequency of the PWM signal is approximately 490 Hz.


      int ledPin = 9; // LED connected to digital pin 9
      int analogPin = 3; // potentiometer connected to analog pin 3
      int val = 0; // variable to store the read value
      void setup()
      {
         pinMode(ledPin, OUTPUT); // sets the pin as output
      }
      void loop()
      {
         val = analogRead(analogPin); // read the input pin
         analogWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values    from 0 to 255
      }


      As an Amazon Associate I earn from qualifying purchases.

      Arduino Mega 2560 - use of pins


      pins 2 to 13: Provide 8-bit pulse width modulation (PWM) output with the analogWrite(pin, value) function where value is between 0 (off) and 255 (full on). Used to light a LED at varying brightnesses or drive a motor at various speeds.The frequency of the PWM signal is approximately 490 Hz.


      int ledPin = 9; // LED connected to digital pin 9
      int analogPin = 3; // potentiometer connected to analog pin 3
      int val = 0; // variable to store the read value
      void setup()
      {
         pinMode(ledPin, OUTPUT); // sets the pin as output
      }
      void loop()
      {
         val = analogRead(analogPin); // read the input pin
         analogWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values    from 0 to 255
      }


      As an Amazon Associate I earn from qualifying purchases.

      Electronic Components




      • Positive DC terminal (higher voltage)
      • Thermistor (temperature dependent resistor)
      • Potentiometer (variable resistor)
      • LDR (light dependent resistor)
      • Resistor
      • Ground (lower voltage)












      • pin 13 of Arduino board
      • PWV (pulse modulated voltage)
      • isolating resistor
      • NPN transistor
      • ground (low voltage, not Arduino)
      • motor
      • battery +9V
      • voltage spike safety circuit
      • capacitor to store excess voltage
      • diode (one way flow) to drain excess voltage




      As an Amazon Associate I earn from qualifying purchases.

      Electronic Components




      • Positive DC terminal (higher voltage)
      • Thermistor (temperature dependent resistor)
      • Potentiometer (variable resistor)
      • LDR (light dependent resistor)
      • Resistor
      • Ground (lower voltage)












      • pin 13 of Arduino board
      • PWV (pulse modulated voltage)
      • isolating resistor
      • NPN transistor
      • ground (low voltage, not Arduino)
      • motor
      • battery +9V
      • voltage spike safety circuit
      • capacitor to store excess voltage
      • diode (one way flow) to drain excess voltage




      As an Amazon Associate I earn from qualifying purchases.

      apt quotation..