Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Moon Phase Indicator

Status
Not open for further replies.
I think there are way more than 8 lunar phases. If you decide that during one day there is only one phase happening, then you still have 28 phases. The phases are completely arbitrary, how many phases does a day have? 24? 86400? Besides, if you divide 28 days into 8 phases, where do the boundaries happen, after 3.5 days?
**broken link removed**
 
**broken link removed**Im sorry Analogue...seee, I said it would be difficult to explain, so I have cut and pasted this animation. I just wanted to make certain that the sequence of LEDS illuminating, would match this (if you think of this as 8 wedges being illuminated, or not illuminated by LEDs.)
Can the whole circuit be powered by regulated 5vdc...only because frequency modules are plentiful, and inexpensive, but, (as you mentioned) require 5v. I can run the LEDS on 9v with current limiting resistors, if 5v isnt bright enough, with a separate supply.
Thanks Analogue, as per usual, you are brilliant, and very kind to help so many of us peons.


As for additional cycles, mentioned by another poster, these were the cycles that I found when researching the internet. They may have been simplified for layman's sake.
moonphases.jpg
 
Last edited:
The animation you show is cyclic, just like the circuit you requested, so I still don't understand why you want the display to reverse the way you described in post #19.

Yes, everything can run on 5V. For normal little LEDs with 1.8 - 2.2V forward voltage (Vf), running them on 5V is no problem. If you are using light bars or some other LED structure with multiple LEDs in series internally, then a higher source voltage might be needed. And with NPN or n-channel transistors, the LED voltage can be higher than the logic power without level translators if necessary.

As for other lunar phases - most people think there are four, geeky people know there are eight, and if astronomers define more than that it's probably covered on an astronomy forum somewhere. I wouldn't worry about it. Wikipedia mentions only eight, with an excellent description of the definitions.

ak
 
Ok Analogue, it was my misunderstanding of the circuit that made me queestion it, I now understand its theory of operation, after sitting down and actually looking at it.
I will show you the circuit, once its made, in operation...just give me some time to do it.
Again, I truly appreciate your kind assistance.
Kim
 
You might like my 16 phase Lunar Design, which you may cut in half and move feedback from 8th to 4th stage.
https://www.falstad.com/circuit (enable Java and press switch)
Edit: keep in mind 74HCTxxx uses very thin gold bondwires and Power or ground current is 50mA max. chip power is minimal with low ESR, but 220 Ω works well with good 3V White LEDs to 5.0V using <7mA per port with all 8 ON., but if you want full 20mA per LED then use ULN200x hex driver. ( but only 7 port)


If you block the light from left to right and use as a backlight using WHITE LEDs and crescent slots in front of each LED ( with heat shrink, diffuser film and cutouts) onto a large rear film image of the MOON .... you can show all the phases exactly as it would appear to enhance the effects.... and of course show the sequence from right to left as we see it .
Lunar_libration_with_phase2.gif

Design Time: 30 minutes.
 
Last edited:
OK, so I looked up sipo devices, because I was not familiar with them,, and I have 2 questions:
-does the SIPO replace the 2 ics U3(4017) and U5 (2803) in Analogues original circuit??
-is it driven by the output of i.c. U4-c (4093) in Analoges original circuit???
Thanks
Kim
 
Yes ... it replaces the 4017n and driver.

I have tweaked design and Calculated internal ESR of 74HCT164 and added 220 Ohm to 5V for active low which is cooler ( lower ESR)
I also chose this to stay within 50mA max on Vdd and well under max Chip dissipation limit.

Thus unless you want really bright LEDs with 20mA per , I suggest <6mA per port as simulated here. If you want a detailed explanation on how to calculate ESR on logic devices or diodes , start another question.

You still need to generate a 16 pulse per month clock with 32kHz crystal & dividers* .... or use a PIC for everything.

It replaces the 4017 and driver and I used two NOR gates to create an SR flipflop to create the cycle. which you can do other ways with clock dividers above* to get 16 pulses per lunar month. The SIPO shifts the phase of moon in 16 cycles.... which you can shrink to 8 cycles with 4 LEDs if you want.
 
Last edited:
Notice Rather than an individual LED per phase, mine shifts like the light reflected off the Moon where you can choose 8 Phases with 4 LEDs or 16 phases with 8 LEDs as you may prefer for Backlight Suggestion to Film image of MOON, which would be kewl. :) or laser printout on transparency or paper. For even brighter Illumination consider running the SIPO off 5V but the LEDs off 12V using PC PSU but then you need two extra vertical Series White LEDs so that the LED string is 9V and when VOH=5V with Vled=12 the LEDs are OFF with 7V across a string of 3x3V LEDs or 2.33V per White LED. :cool:

Then you have 24 White LEDs total in vertical Strings of 3 and 1/8th phase increments fading from Right to Left with FULL MOON having all 8 LEDs ON and NEW MOON will all OFF. I suggest LEDs with 30 deg Warm White 10 Cd. min @20mA but using only 2.5Cd at 5mA. Can you choose these? If you have 12V WHite StripLeds, this will work too from 5V logic output to (-) side with (+) to 12V... Note if you do this with 3 LEDs and no Series Resistor per string, you may damage the Drivers.
 
Last edited:
Wrote this earlier and forgot to post it.

Notice in the animation on Tony's site that the light pattern is different from my circuit. Because of the way a 4017 works, only one output at a time is on. As the counter is clocked, the ON output steps through the 10 possible pins. This is basically the same as one possible output pattern of a shift register. Tony's output is another possible pattern, where all previous outputs are either on or off depending on which part of the cycle you are in. In terms of a group of 8 lights, his better mimics the way the moon looks. But if you have 8 little backlit signs, then you want only one sign on at a time the way the 4017 works. The point here is that these are not two different ways of doing the same thing; they are two different types of display effects. Your choice.

ak
 
EXCELLENT, both schematics are truly amazing, and FAAAAR beyond my ability to design.

I think I will actually try both displays out on a Protoboard, using 1 driver.... since both use a radically different method to display. It will be interesting to follow both sets of logic, using this as a learning tool.

I will take into consideration correct LED dropping resistors for use with the different circuits....so as not to let out any of the "magic smoke".

I will be using proper transparencies of the moon surface, and backlighting it accordingly at first, then I will try a globe, with the surface painted on.

Is there any way that the 2 circuits can be combined together to give me 1 schematic...so I can have both versions...well actually 3 versions, as Analogue has kindly provided me with a alternate pulse generation schematic (I have corrected the 4017 part of the diagram)
This is the last you will hear of this...unless something goes dramatically wrong during the prototyping, or my head explodes...whatever happens first.

Again, thank you both for your kind work on this.
Kim
 
QUOTE:
"For even brighter Illumination consider running the SIPO off 5V but the LEDs off 12V using PC PSU but then you need two extra vertical Series White LEDs so that the LED string is 9V and when VOH=5V with Vled=12 the LEDs are OFF with 7V across a string of 3x3V LEDs or 2.33V per White LED. :cool:

Then you have 24 White LEDs total in vertical Strings of 3 and 1/8th phase increments fading from Right to Left with FULL MOON having all 8 LEDs ON and NEW MOON will all OFF. I suggest LEDs with 30 deg Warm White 10 Cd. min @20mA but using only 2.5Cd at 5mA."

UMMMMMMMMMM...I think this may be past my comprehension...my brain hurts:wideyed:
 
complexity vs simplicity vs features

12V power to 12V LEDSTRIP (+) Anode of 3 White LEDs (~3x3V)
5V power to 74HCT164 with output to Cathode (-) of string. using Output driver= Low (<0.5V) when ON.

Reverse direction of layout so shift from right to left. ( sorry about the mess)

16 clock pulse per Lunar Month

Rs external >= 270 Ω per string. chosen for VOL<=0.5V and If= 7mA max per string.. You may also use 330 Ω to 1K for even lower current using 12V with 3S string of Warm White.

upload_2015-11-18_18-59-2.png
 

Attachments

  • upload_2015-11-18_18-55-8.png
    upload_2015-11-18_18-55-8.png
    118.7 KB · Views: 162
Last edited:
AnalogKid Do you have the time? to combine your 32kHz clock synth for 1 pps and 16 pplm ( pulse per second & per lunar month) with the 12V/5V 8x3S LED Lunar display and add 1 LED for 1pps with 330 Ohm for 5V operation and correct my sync reset to combine with your clock sync for starting on Full Moon (active low)

This would affect your synth. with 16 pplm also.
Note the SIPO acts as a divide by 16 phase shifter using last stage inverted to D input so 16 pulses per lunar month is the input clock with Release of Reset for start of Full Moon.

Optional SPDT switch to SIPO clk so a faster clock can be used for a chaser light. e.g. 16 Hz.

Which reminds me of a chaser I made in 1976 where the shift clock was triggered by the drummer's kick drum using a taped up electret mic. and Ac coupled CMOS inverter with 1M feedback with a pot.
 
Last edited:
Again, wrote this and didn't post it. DUH!

Tony - if you use an SR with a reliable power on reset, or an external reset pin such as a 164, do you need the FF? Wouldn't a simple inverter between Q7 and Din be enough?

I'm already most of the way through adding your output stage to my front end. Tomorrow...

ak
 
Of course Inverter is fine. I added a FF , since SIM had no Reset so I needed to purge register with 0's.

@Biort1961 Can you make vertical apertures between LED's and diffuser film behind photoimage to cast a diffused crescent shape of light from 3 LED's? This be done with incident light or edge lit maybe.

I imagine a 5mm plexiglass backpanel panel with eight clear timezone like phases of clear plastic , perhaps with vertical cut edges coated in black ink. for separation into sector projections onto a 2D sphere

LCD laptop CFL edge backlights or LED edge-type backlight use layers of diffuser film and fresnel lens film for smooth lit surface , except in this case parsed into 8 Zones of equal brightness or almost equal area/ If you wanted to use 4 LEDs per string , then add 3V to supply and make it 15V. with 2 on top edge and 2 on bottom edge.... maybe....

Wiring can be done with 30 AWG magnet wire and solder melt thru a few turns in < 5 seconds max per joint, pref 3 sec max. to LEDs.
 
Last edited:
... to combine your 32kHz clock synth for 1 pps ...

Nope.

There is not true consistency in the labeling of multi-bit counter outputs. Some, like the CD4040, have outputs labeled Q0-Qn. Others, such as the CD4521, label the first divider output Q1 and go upward from there. So for this part with a 32 kHz clock, 1 pps or 1 Hz appears on the Q15 output. Unfortunately, because of a limited number of device pins, Q18 is the first available output, equating to 1/8 Hz (4 seconds on, 4 seconds off).

It looks like I might have the decoded outputs shifted from their correct positions. I include the most significant trailing 0 in the decode value, and I think it threw me off. Checking...

And, shifting (!) to a display with 16 phases (8 waxing and 8 waning) means shifting all 17 decoded counter bits one position downward on the schematic, the equivalent of dividing the decoded reset value by 2 for twice the output frequency.

ak
 
Last edited:
Analogue, if its not possible the complicated designing with 16, can we go back to a simpler design of using 8 LEDs instead, just have a transition between 2 leds like Tony's output design?
Is this possible, without having your head explode????
Thanks\Kim
 
Here is an updated version of the schematic in post #19. This has Tony's shifting output display for the originally requested 8 standard lunar phases, 4 waxing and 4 waning. The shift register requires an extra inverter. Changing to a hex inverter and dropping a superfluous decoded bit maintained both the chip count and diode count. A power-on reset purges the shift register, and the switch makes it possible to set the clock at the start of any phase rather than waiting for a full moon.

I think balancing the logic and LED voltages based on the LED Vf is a bit tricky for the OP (based on the experience level in his questions) and reduces greatly the selection of workable LED types. With the 2003, or discrete transistors, the display devices and brightness levels are independent of the logic, the supply voltages, etc.

Note that by adding strings of LEDs to the shifter output and adjusting the decoded reset value, you can have any arbitrary number of phases per lunar cycle.

ak
LunarPhase-5-c.gif
 

Attachments

  • LunarPhase-5-c.pdf
    19.8 KB · Views: 117
OK, I think we're getting to the end. Here is version 6, with an integrated timebase oscillator, single-LED outputs, no LED drivers, single 5V supply, etc. Note the spacing of the shift register outputs. I adjusted the decoded reset value so the shifter now moves twice as fast (only 5.2 billion ticks per shift register clock pulse). Using every other output gets you the original 8 phases. If you want the higher resolution display as in post #32, use the disconnected pins and more LEDs.

Note - the individual inverters are interchangeable. You can reassign them to make the wiring easier.

ak
LunarPhase-6-c.gif
 

Attachments

  • LunarPhase-6-c.pdf
    17.6 KB · Views: 139
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top