I think you are doing a fine job of presenting a very complex (for many of us) subject in a way that even I can understand. Understanding why each part is needed and how everything works together is the biggest draw for me--other than saving money of course. In fact, I've already applied some of this new knowledge to the other project that I was building. Keep up the good work!Jhong wrote:It's hard to judge if I'm posting interesting info, or just waaay to many words sometimes.
Making Magnificent Moonlights
-
YBeNormal
- Former Staff Member
- Posts: 506
- Joined: Sat Jun 04, 2005 1:19 am
- Location: Northern Virginia
- Contact:
-
midgetwaiter
- Puffer Fry
- Posts: 38
- Joined: Sat Jun 25, 2005 9:42 pm
- Location: Calgary, Alberta
One note on parts selection for this project. Being the lazy bugger I am I stopped at Rat Shack on my way home and picked up the generic blue LEDs they sell at 2 / $2.99. I had everything else already. I threw out the packages so I don't have the part numbers but they are the 10mA ones without the forward voltage listed on the package.
These things su-didly-uck!
I bought four in total as I have some other things I want to do with them as well. One burnt out right away and none of the other 3 have remotely the same colour. I played around with different resistors (as I noted above the forward voltage is not on the package) and couldn't get them to look similar.
I have 2 on my nano right now and I'm going to change them out. After sanding them I do get a nice diffuse light pattern (great idea Jhong) but it just lights things up, I don't get any of the neat fluorescence from my corals (pipe organ, shrooms, zoos, leathers and star polyps and a candy cane). When you compare it to my 1 watt coralife fixture which makes everything glow but has a narrow beam it's pretty lame.
I'll post again after I find some different LEDs to try.
These things su-didly-uck!
I bought four in total as I have some other things I want to do with them as well. One burnt out right away and none of the other 3 have remotely the same colour. I played around with different resistors (as I noted above the forward voltage is not on the package) and couldn't get them to look similar.
I have 2 on my nano right now and I'm going to change them out. After sanding them I do get a nice diffuse light pattern (great idea Jhong) but it just lights things up, I don't get any of the neat fluorescence from my corals (pipe organ, shrooms, zoos, leathers and star polyps and a candy cane). When you compare it to my 1 watt coralife fixture which makes everything glow but has a narrow beam it's pretty lame.
I'll post again after I find some different LEDs to try.
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
http://www.besthongkong.com is a great source for LEDs. Their English isn't great, and postage can take a couple of weeks, but their products and proces are very good. They were very popular on eBay last time I checked.
There's a big difference between a run-of-the-mill indicator LED and a 4,000 mcd nichia or clone.
The forward voltage should be similar (3.5 - 4V) for all blue LEDs. AFAIK, there is only one chemistry.
There's a big difference between a run-of-the-mill indicator LED and a 4,000 mcd nichia or clone.
The forward voltage should be similar (3.5 - 4V) for all blue LEDs. AFAIK, there is only one chemistry.
-
midgetwaiter
- Puffer Fry
- Posts: 38
- Joined: Sat Jun 25, 2005 9:42 pm
- Location: Calgary, Alberta
Little slow at work today so I decided to look around.
http://www.luxeonstar.com/item.php?id=3 ... =LXHL-MB1C
Now that is a LED! 110 degree viewing angle even. I found a place I can get them locally too.
http://www.luxeonstar.com/item.php?id=3 ... =LXHL-MB1C
Now that is a LED! 110 degree viewing angle even. I found a place I can get them locally too.
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
Be careful, Luxeon stars are *bright*. People are starting to use them for room lighting.
You could run one or two of these in series, but here are some things that initially strike me that you would need to consider
- These things dissipate over a watt of power. You'd need to read the thermal design guidelines to see if you need to heatsink them.
- I assume power regulation is done on the star itself... but you'd need to check. *Do not* try putting standard resistors in series with them! They would burn up in short order.
You could run one or two of these in series, but here are some things that initially strike me that you would need to consider
- These things dissipate over a watt of power. You'd need to read the thermal design guidelines to see if you need to heatsink them.
- I assume power regulation is done on the star itself... but you'd need to check. *Do not* try putting standard resistors in series with them! They would burn up in short order.
-
midgetwaiter
- Puffer Fry
- Posts: 38
- Joined: Sat Jun 25, 2005 9:42 pm
- Location: Calgary, Alberta
Yeah my coralife fixture is a 1 watt so I've got a pretty good idea what I'm in for. They say right up front in the thermal guidelines not to power it without a heatsink.
I just happen to have a 3 volt wall wart kicking around so I might not mess with it, just use that. Even if I do change my mind, 2 watt resistors are easy enough to come by.
There is another store in town here that has all the Mode Electronics models, you ever give those a try Jhong?
I just happen to have a 3 volt wall wart kicking around so I might not mess with it, just use that. Even if I do change my mind, 2 watt resistors are easy enough to come by.
There is another store in town here that has all the Mode Electronics models, you ever give those a try Jhong?
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
Sounds like you know what you're doing anyway.
I don't know Mode Electronics is... here there is a kindof wholesale "electronics market" that I go to. It's a mess. lot's of small counters run by one man and their wives... but a bit like trawling a junk store. You can buy pretty much any component you can think of (or order, for the more exotic ICs), but it is a bit of a hassle.
I don't know Mode Electronics is... here there is a kindof wholesale "electronics market" that I go to. It's a mess. lot's of small counters run by one man and their wives... but a bit like trawling a junk store. You can buy pretty much any component you can think of (or order, for the more exotic ICs), but it is a bit of a hassle.
-
YBeNormal
- Former Staff Member
- Posts: 506
- Joined: Sat Jun 04, 2005 1:19 am
- Location: Northern Virginia
- Contact:
Hold on while I duck. That should make it even easier for the past few posts to go waaaaay over my head.
I understand basic terminology and simple electronics pretty well. OK, well enough to judge how far away I should mount the fire extinguisher. I also understand burned out LEDs, having created a few in my most recent project. I have no idea what a "4,000 mcd nichia" is though and I'm pretty sure that our current president has crafted some arcane law that restricts cloning of them on American soil, so I'll just sit back and enjoy the conversation. Carry on...
I understand basic terminology and simple electronics pretty well. OK, well enough to judge how far away I should mount the fire extinguisher. I also understand burned out LEDs, having created a few in my most recent project. I have no idea what a "4,000 mcd nichia" is though and I'm pretty sure that our current president has crafted some arcane law that restricts cloning of them on American soil, so I'll just sit back and enjoy the conversation. Carry on...
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
LOL... sorry. Nichia is jsut a good brand of LED.... 4,000 is 4,000 milli-Candella. Or 4 candle power. (= bright)ybenormal wrote: I have no idea what a "4,000 mcd nichia" is though and I'm pretty sure that our current president has crafted some arcane law that restricts cloning of them on American soil, so I'll just sit back and enjoy the conversation. Carry on...
-
YBeNormal
- Former Staff Member
- Posts: 506
- Joined: Sat Jun 04, 2005 1:19 am
- Location: Northern Virginia
- Contact:
Ah hah! Nothin' but the best for my puffs I say--as long as it stays within budget and my limited technical abilities.
I'm really starting to get the itch to begin building this project. How long before we integrate the auto-synchronize-with-atomic-clock module? Failing that, any progress figuring out why your clock is losing time?
I'm really starting to get the itch to begin building this project. How long before we integrate the auto-synchronize-with-atomic-clock module? Failing that, any progress figuring out why your clock is losing time?
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
I left mine sitting on the shelf, powered down (time being kept by the backup battery) for the past 48 hours. Upon powering it up last night, it was about 5 minutes *fast*!. I left it on all evening, and this dropped to about 3.5 minutes too fast.
In the datasheet for the DS1302 (here, page 5), Dallas make very specific recommendations about PCB layout, including a ground plane under the clock crystal.
Strip board is a bit of a nightmare for geting "clean" signals -- the narrowly-spaced strips act like small capacitors, and there is a lot of cross-talk between signals. I have the PWM signal to the moonlights running at 50 kHz as well, and this doubtlessly causes lots of nasty interference that sends things a bit haywire.
Basically, it's an almalgamation of problems arising from not doing things "by the book" and having a professional PCB fabbed. But there's no way most of us can justify doing that for a simple hobby project like this.
But of course, there are no "deal breaker" problems in electronics -- just opportunities to find cheap ways to solve them
As you'll see in the next installment (soon), I've put the crystal right next to the chip (using the same holes) and kept the copper tracks as short as possible. I may also try to emulate a ground plane with a bit of aluminium foil and hot glue!
No biggie though, as long as these things are accurate enough to know which day it is, they'll do fine.
In the datasheet for the DS1302 (here, page 5), Dallas make very specific recommendations about PCB layout, including a ground plane under the clock crystal.
Strip board is a bit of a nightmare for geting "clean" signals -- the narrowly-spaced strips act like small capacitors, and there is a lot of cross-talk between signals. I have the PWM signal to the moonlights running at 50 kHz as well, and this doubtlessly causes lots of nasty interference that sends things a bit haywire.
Basically, it's an almalgamation of problems arising from not doing things "by the book" and having a professional PCB fabbed. But there's no way most of us can justify doing that for a simple hobby project like this.
But of course, there are no "deal breaker" problems in electronics -- just opportunities to find cheap ways to solve them
As you'll see in the next installment (soon), I've put the crystal right next to the chip (using the same holes) and kept the copper tracks as short as possible. I may also try to emulate a ground plane with a bit of aluminium foil and hot glue!
No biggie though, as long as these things are accurate enough to know which day it is, they'll do fine.
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
Plus.... if you count the connections to the MCU in the last circuit diagram -- you'll see there's one pin left free!
That could be used for anything - LCD backlight, light sensor input, another button... whatever. I'll leave it up to the reader to decide.
My plan, however, is of course to integrate this with all the other modules I'm building for my tank controller, and use the extra pin as a serial data input (it only needs to receive data). The main tank controller module will in turn connect wirelessly to a hand-held unit, which can be docked with a PC.
Whenever the hand-held unit is docked, it will synchronise its clock with that of the PC. It will then synchronise all other clocks in the tank controller modules (including the moonlights, lighting timers, wavemakers, etc). Currently my code is too large to be able to squeeze all this on the 16F628, so I'm working on squeezing the code size down.
But don't worry, I'll still try to get the clock as accurate as I can, as it'll be a while before all this is up and running.... a never-ending project. (first stage is to get the pH, ORP and temperature monitoring module up and running...... once I've ironed out the problems with the "Part 1 controller"... and finished the moonlights, of course).
J
PS::: the building installment coming this evening!
That could be used for anything - LCD backlight, light sensor input, another button... whatever. I'll leave it up to the reader to decide.
My plan, however, is of course to integrate this with all the other modules I'm building for my tank controller, and use the extra pin as a serial data input (it only needs to receive data). The main tank controller module will in turn connect wirelessly to a hand-held unit, which can be docked with a PC.
Whenever the hand-held unit is docked, it will synchronise its clock with that of the PC. It will then synchronise all other clocks in the tank controller modules (including the moonlights, lighting timers, wavemakers, etc). Currently my code is too large to be able to squeeze all this on the 16F628, so I'm working on squeezing the code size down.
But don't worry, I'll still try to get the clock as accurate as I can, as it'll be a while before all this is up and running.... a never-ending project. (first stage is to get the pH, ORP and temperature monitoring module up and running...... once I've ironed out the problems with the "Part 1 controller"... and finished the moonlights, of course).
J
PS::: the building installment coming this evening!
- PetPirate
- Gone Today, Here Tomorrow
- Posts: 1230
- Joined: Mon Jun 27, 2005 5:41 am
- My Puffers: 3x Tetraodon Nigroviridis in full marine
- Location: Shanghai, China
- Contact:
No, no...
we need the clock so we can calculate where we are in the lunar cycle.....
If I can find a simple algorithm, calculating rise and set times for the moon on any given date would also be coool. But complex trigonometrical algorithms are the only things I have found for this: Too complex to calculate on a chip and compiler which don't know what a decimal point is (no "floating point" capability), and too much head-scratching with a pen and paper to come up with work-arounds that wouldn't use floating point. Besides, I don't think I could fit it into the code space. But I am trying.
If I can find a simple algorithm, calculating rise and set times for the moon on any given date would also be coool. But complex trigonometrical algorithms are the only things I have found for this: Too complex to calculate on a chip and compiler which don't know what a decimal point is (no "floating point" capability), and too much head-scratching with a pen and paper to come up with work-arounds that wouldn't use floating point. Besides, I don't think I could fit it into the code space. But I am trying.
-
midgetwaiter
- Puffer Fry
- Posts: 38
- Joined: Sat Jun 25, 2005 9:42 pm
- Location: Calgary, Alberta
Jeez, rise and set times? You are ambitious aren't you.
My plan was to just use the Synodic month (29.53 days) and build a table like
0-.25 (29.53) set to 25% output
.25-.5 (29.53) set to 50% output
Etc.
Of course my new plan is to sit back and copy Jhong's stuff.
You know, while figuring out lunar rise and set times might not be a big benefit for the work involved (I HATE TRIG, HATE IT HATE IT) it may be interesting to vary the photo period. For many of our equatorial type fish that isn't going to accomplish much but for people trying to breed some fish messing with the photo period can help trigger them. The program would depend on the latitude of course but it might be kinda cool.
Hmm.
My plan was to just use the Synodic month (29.53 days) and build a table like
0-.25 (29.53) set to 25% output
.25-.5 (29.53) set to 50% output
Etc.
Of course my new plan is to sit back and copy Jhong's stuff.
You know, while figuring out lunar rise and set times might not be a big benefit for the work involved (I HATE TRIG, HATE IT HATE IT) it may be interesting to vary the photo period. For many of our equatorial type fish that isn't going to accomplish much but for people trying to breed some fish messing with the photo period can help trigger them. The program would depend on the latitude of course but it might be kinda cool.
Hmm.