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.
Man, analogue...that is truly amazing...as per usual, slick, easy to read, and straight to the point.
I would like to thank Tony as well for his valuable input.
I will send you a video of the unit in action...as soon as I can get it together.
 
D-oh I now get it...its the same IC driving leds,as in posting #32...you have just simplified it, by not showing all the leds on the outputs...correct????
 
Quote:
"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."

Reply:
Actually, I do understand the differences between the logic supply, and adding transistors to the led driver outputs (such as 2n2222s) to use a higher LED supply voltage, or additional led strings.
I was also considering adding a rechargeable battery to the 5vdc logic supply, separate to the led driver supply, so that if the power is disturbed, it should still tick on .....with the LEDs blanked to conserve power.
BUT this is a separate project...that will be added, after the circuit is prototyped!!!!!
Thank you tho
Kim
 
My design with 12V Ledstrip from 5V 74HCT 60 Ohm logic active low , I considered all worst case values and there was plenty of margin for tolerances on driver ESR.

12V sealed Lead Acid backup with charger for 3 LEDs or 4 LEDs with 4 LiPo batteries is pretty easy . Since 5V logic micropower and is so tiny, you dont need a big battery to act as backup. Just a coin cell. THen LED's can run of volatile power. All this requires is 2 Schottky diodes for 5V and a 3.7V Lipo with float charge at 3.7V from 5V with 3 terminal 5V regulator running from 12V. This is a trival solution, for those with experience.
 
Your questions indicate to me that you still have not decided what it is you want to build. We have discussed two fundamentally different different displays so far:

1a. A stepping display. Only one led or string of LEDs (another design decision) is on at any given moment. I presented this in post #16 because you mentioned the 4017 in post #1.

1b. A shifting display. Tony first presented this in post #25. This display more closely imitates the way the moon phases look to us.

2. Separate from these are the number of phases to be presented in one lunar cycle. 8 are defined, 4 waxing and 4 waning, while Tony's display shows 16 phases, 8 waxing and 8 waning. In fact, any number of phases per cycle are possible. The shifting light pattern movement is more smooth with more phases, but cost and complexity increase with the phase count.

3. Display LED body count. The number of LEDs per displayed segment affects the need for driver transistors, the total circuit current, and maybe a second power supply voltage. In post #32 you expressed a desire to return to a single LED per segment, which makes for a more simple construction, but also less bright.

The schematic in post #40 has only 4 LEDs because that is how many it takes for Tony's display method to display the 8 standard lunar phases. As explained, to modify the circuit to do what is in post #32, simply add resistors and LEDs to the shift register unused outputs. Note that if you still do not want to use driver transistors you will need to increase the resistor values to limit the total current when all outputs are on at full moon.

So, decisions:
1. Display type.
2. Number of phases.
3. Display brightness/power.

ak
 
Just remember you can use Ohm's Law to determine the appropriate series resistance.

  • CMOS driver are not true voltage sources but have a series resistance, but never specified in datasheets.
  • for 5V 74HCTxxx logic it around 50 Ohms at Vol="0" and 130 Ohms guaranteed max at 4.5V at 25'C
  • CD4xxx and HCxxx older logic is around 300 ~200 Ohms which is lower at higher Vcc.
  • LV logic in PICs is designed closer to 50 Ohms.
  • ALVCxxx family logic like in ARM uC's is rated for low voltage but is also around 25 Ohms

You calculate by reading the data sheets for Vol/Iol for low state or (Vcc-Voh)/Ioh for the high state and consider both Typ and worst case, which increases with higher temp. It is sometimes called incremental resistance, dynamic resistance, for MOSFETs RdsOn, sometimes ( by Diodes Inc) Rce for BJT's,, but I refer to them all as ESR . Similarly all batteries and caps have ESR or Rs inverse to its capacity and state of charge and rises with age at end of life quickly due to self heating affecting aging of material.


Newer CMOS families at low voltage are better and designed to be faster and lower RdsOn .... meaning PMOS is better matched to NMOS for both speed and RdsOn.

For BJT's it depends on base current, but typically when saturated all are the same with IC/Ib ratios of 10:1 used for Vce(sat) thus Rce=Vce(sat)/Ic the equivalent output resistance when saturated.

Similarly, all diodes have a series resistance that is fairly constant when fully saturated at rated current and can be calculated by the incremental V/I.
I can tell you that for 1/16th watt 5mm LEDs, ESR = 16 Ohms +/- 50% on good parts. and 1W diodes are 1 Ohm ESR and 10W Diodes are 1/10 Ohm..

See the pattern? ESR*Pd rated ~=1 ( to 0.5 in really good thermal power diodes.) I call this with tongue in cheek, Stewart's Rule for all diodes. It becomes dynamic at lower current and rises with inverse Isquared law when it goes out of saturation.

This is due to the relationship between thermal capacity of diode and bulk electrical resistance and holds true for all diodes from Schottky to LEDs, although each wavelength has a slightly different threshold voltage due to doping of chemistry and eV thresholds. I normally estimate or calculate the threshold voltage by working backwards from Pd-If*ESR=Vt and this extrapolated tends to be around 10% of the rated current for the threshold voltage but is useful when using Ohm's Law for 25~50% variations in current and 10% supply tolerances, as long as once checks the datasheets until confident.

So remember there are tolerances in Vf and Vce(sat) and Vol which are only affected by manufacturing tolerances of bulk resistance of the epitaxial wafer uniformity. Then you can use Ohm's Law. got it?
 
Last edited:
Thank you Both. I will actually try all designs...just for the hell of it anyways, as I am interested in the logic involved...and I will start out just with 1 LED for each cycle, and then build from there.
1 more question (isnt there always just 1 more!!!???)
-Is there a way that I can add a push-button so I can manually stem the display thru its cycles...so I can watch the circuit operation in less than 1 month?...a whole month is kinda long to test its complete operation.....lol
Thank you
 
It is, kinda. With every switch push the half-phase counter (1.84625 days) is reset to zero, so that is how you set the clock to the start of a phase. It also advances the display to the next half-phase. So at midnight (or whenever) at the start of *any* phase, you tap the switch until the correct phase is displayed. In this way the maximum time you have to wait to set the clock is 3 days instead of 27.

Again, note that the output display now increments in half-phases so that Tony's output section can be configured for either 8 or 16 states.

ak
 
Last edited:
Learning how a design works always starts with understanding how to read datasheets with logic timing diagrams and analog input/out levels for logic. In this case rise times and latency is not a factor.

Learning how to specify a new design comes from understanding how datasheets specify how a chip operates fro inputs and outputs and then applying similar logic to higher and higher levels of integration always defining the Ins & Outs and the desired process effects. Rather than try to adapt an existing schematic without understanding how it works.


For the advanced reader,
But did you know using the most significant outputs ( slowest moving before lunar clock phase output to shift register) you can create a DAC analog brightness control for the next phase so it appears more continuous.

One only needs that to be defined in the first place. Then you can have an apparent smooth gradient light from one LED to the next.

Another feature is to use 1.6V Red LEDs and use those instead of silicon diodes and then the most significant counter bits can be observed to count towards the next lunar clock every 4 seconds or whatever the 2nd stage clock rate is.

The 10K bias resistor would then be changed to something like 1k for dim illumination.

Although the Red LED Vf is close to 1.6V when dim this creates an offset to the Counter state Diode logic voltage reduces the voltage margin for detection on the Schmitt Trigger , but it can be done one way or another. A comparator with R ratio positive feedback is more precise, whereas the '14 is an non-precise level of 1V hysteresis approx centered around V/2-0.5V. with a tolerance on the thresholds that changes with Vcc and temp.

The variations of this functional design are endless.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top