spirilis 1,265 Posted March 30, 2013 Share Posted March 30, 2013 Got the inspiration to do this from a coworker who suggested wrapping those WS2811 LED strips around a bottle of water to disperse the light--like he used to do while camping: This uses a custom DMX512-over-nRF24L01+ protocol I cooked up that works seamlessly with my existing "packet" architecture which I use for my Grill Monitor project. The current project is powered by a tablet USB charger and is using one of my defunct draft1-edition F5172 LaunchPad XL boards (the one that couldn't get its XTAL to stabilize thanks to very poor layout on my part... I'm relying on REFO for this). Main reason is to get 5V-native I/O going to that WS2811 DIN line (I've had issues driving those WS2811's with 3.3V levels, I suspect 3.6V works correctly but 3.3V not too well, but I don't have any 3.6V LDO's in my bin at the moment). Quick recap- The "packet" architecture defines a data link layer where information within the nRF24's 32-byte packets is encoded as an 8-bit "program ID" followed by 8-bit payload size definition, followed by that many bytes of payload. I defined a number of program IDs for the use of my grill monitor but I decided to define a range of program IDs for use with DMX512. DMX512 implementation- Program ID code 0x20-0x3F now represent the 512 channels of DMX512, in 16-channel segments, with a final command "0x40" used to COMMIT any updates to those channels (so the general logic flow is, a sender transmits a bunch of packets representing channel updates, then sends a final COMMIT command packet to instruct all listeners to make the new channel data active in whatever manner is appropriate) This is a little different from DMX512's ordinarily "streaming" oriented setup but I think it's flexible and should work well for other future projects. All packets with program ID 0x20-0x40 include the "Start Code" as their very first byte (and for the COMMIT command, i.e. 0x40, it's the only payload). The concept of DMX "universes" is enforced by sending the data to different nRF24L01+ 5-byte RF addresses. The listeners are expected to have AutoACK turned off so the address can act like a broadcast domain. For this code, I'm just using channels 1-3 as R, G, B data and setting all the LEDs in the strip that same value. Start Code 0x00 is used here. I've adapted my Grill Monitor's base station code to include a new "nrfdmx" CLI command that lets me configure channels 1-15 (for simplicity's sake) from a simple command. Very cool being able to login to my Linux server over SSH and changing the color of my lamp! Code for my nrfdmx implementation (including working slavenode code for the F5172 and simple sender code for the G2553, both using my nRF24L01+ boosterpacks)- https://github.com/spirilis/nrfdmx bluehash, pine, yyrkoon and 1 other 4 Quote Link to post Share on other sites
yyrkoon 250 Posted March 30, 2013 Share Posted March 30, 2013 Seems like a really cool idea. I wonder if there could be some other way of doing the same thing, but perhaps with something like a "water lens" so the light could be dispersed / aimed at a specific spot. Or something like multi-colored patterns from multiple lights / lenses slightly overlapped or something . . . Hell, I do not know just kind of "thinking out loud" here . . . pretty cool project either way. spirilis and bluehash 2 Quote Link to post Share on other sites
spirilis 1,265 Posted March 30, 2013 Author Share Posted March 30, 2013 That would be slick! I don't know optics very well but I guess the key would be the bottle's shape. Sent from my C3PO via Tapatalk Quote Link to post Share on other sites
yyrkoon 250 Posted March 30, 2013 Share Posted March 30, 2013 Just one quick idea that I thought of. If you took a bottle, and taped it so only a portion of it was left untapped / uncovered. That could help aim the light. Kind of what I had in mind when thinking of this just now, would be having something like a column of light aimed at the wall. You know going vertically. *shug* heh anyhow just more thinking out loud. Quote Link to post Share on other sites
yyrkoon 250 Posted March 30, 2013 Share Posted March 30, 2013 Here are a couple of ideas I saw on youtube, just searching around. Both are really cool ideas for projects. What I was thinking about when I started looking was the kids "carousel lamp" from the movie sleepy hollow( the one with Jonny Depp ). But the "CD LED lighting" video I just though was really cool too, Quote Link to post Share on other sites
spirilis 1,265 Posted April 1, 2013 Author Share Posted April 1, 2013 Ok having played with this lamp (now on my desk at work) for a while, I've come to the conclusion that when color mixing is needed, it's best to think of the blue LED as being 7-bit with the 7th bit always 0... i.e. 0x00-0x7F It is just so overpowering at >=0x80 values it's ridiculous! A quick test was to try making a light cyan -- 0x40FFFF (RGB) - This turned into a light blue. Try 0x40FF7F and it's exactly what I'd expect... a light cyan. Likewise try 0x40FFAF just for tests, it's more or less a light blue. (fyi my code does the RGB-to-GRB shuffle just before sending it out) Likewise a "soft" white is more along the lines of 0xFFFF5F or 6F, with 0xFFFF7F being a very *neutral* white and anything higher being a notably blue-ish high color temperature white. yyrkoon 1 Quote Link to post Share on other sites
yyrkoon 250 Posted April 13, 2013 Share Posted April 13, 2013 I dont know for this particular case, but i have often though RGB LED would be the best way to dial in lighting color for general purpose lighting. E.G. warm colors, or cold. etc. Either way I need to generate some income to justify the costs to test. Quote Link to post Share on other sites
mbeals 74 Posted April 14, 2013 Share Posted April 14, 2013 Seems like a really cool idea. I wonder if there could be some other way of doing the same thing, but perhaps with something like a "water lens" so the light could be dispersed / aimed at a specific spot. Or something like multi-colored patterns from multiple lights / lenses slightly overlapped or something . . . Hell, I do not know just kind of "thinking out loud" here . . . pretty cool project either way. Well you already have a lens or sorts. What makes a focused lens work is the fact different parts of the light wave travel different distances through the lens material, introducing the phase shift which focuses the light. So to specifically focus the light, you would need to either alter the surface of the jug, use something like a fresnel lens or introduce something else in the water with a different index of refraction (and somehow control it). You probably could use something like solid acrylic rod in the jug to act as light pipe to get some neat effects. The acrylic would be difficult to see in the water with the LED's off, but should give off a nice, translucent glow when illuminated. yyrkoon and spirilis 2 Quote Link to post Share on other sites
yyrkoon 250 Posted April 14, 2013 Share Posted April 14, 2013 Well you already have a lens or sorts. What makes a focused lens work is the fact different parts of the light wave travel different distances through the lens material, introducing the phase shift which focuses the light. So to specifically focus the light, you would need to either alter the surface of the jug, use something like a fresnel lens or introduce something else in the water with a different index of refraction (and somehow control it). You probably could use something like solid acrylic rod in the jug to act as light pipe to get some neat effects. The acrylic would be difficult to see in the water with the LED's off, but should give off a nice, translucent glow when illuminated. Well i was just thinking and typing at the same time, but what I meant really was something kind of like a flashlight head. but fully sealed and filled with water, used to partially "focus" light in a general direction, but also partially used to defuse the light( making it less harsh I suppose ). Gentle ? Something like that. I have lots of what I consider "cool ideas" like this, but, who doesnt ... right ? Maybe put something in this "lens" to agitate the water to get some interesting patterns ? Just more ideas . .. Quote Link to post Share on other sites
spirilis 1,265 Posted April 14, 2013 Author Share Posted April 14, 2013 I got a whole reel of LEDs now, 60W worth, and a PSU that should drive it, along with a second identical jug..... This may get very interesting Sent from my Android tablet using Tapatalk Quote Link to post Share on other sites
mbeals 74 Posted April 14, 2013 Share Posted April 14, 2013 Well i was just thinking and typing at the same time, but what I meant really was something kind of like a flashlight head. but fully sealed and filled with water, used to partially "focus" light in a general direction, but also partially used to defuse the light( making it less harsh I suppose ). Gentle ? Something like that. I have lots of what I consider "cool ideas" like this, but, who doesnt ... right ? Maybe put something in this "lens" to agitate the water to get some interesting patterns ? Just more ideas . .. If you add something to the water to scatter the light, it would diffuse nicely. If you make the particles small enough (~1nm) so that you are in the rayleigh scattering range, and you use a broadband LED, you should be able to get some cool effects. It would strip out the blue light and scatter it to the side...producing a red-orange beam. The forward scattered and side scattered light would also be differentially polarized, so there could be some fun with that too. For a vertical tank, adding an oil layer and introducing very slight agitation to create waves and ripples in the interface layer could also make some neat effects.... Quote Link to post Share on other sites
yyrkoon 250 Posted April 14, 2013 Share Posted April 14, 2013 Apparently you're ok with me "disarming" my LED(defuse), thanks for not ribbing me for this misspelling lol, I knew it was wrong, but kept looking at the proper spelling thinking it too looked wrong . . .hate it when that happens. You've got some cool ideas of your own too it seems Quote Link to post Share on other sites
mbeals 74 Posted April 14, 2013 Share Posted April 14, 2013 haha, I didn't even catch it until you pointed it out. I work in optics and environmental remote sensing, so most of my "ideas" come from teaching exercises or issues I've had in the lab. Quote Link to post Share on other sites
spirilis 1,265 Posted July 16, 2013 Author Share Posted July 16, 2013 So I made a remote control for this gadget and any other lamps I create using my "nrfdmx" protocol. Works pretty well, it has a rotary encoder from SparkFun (a coworker had it and gave it to me) along with a Bourns linear-taper potentiometer for configuring brightness. It uses an HSV colorspace and involves a little floating point math on the G2553. Rotary encoder flips through the hue, potentiometer configures value, pressing the pushbutton inside the rotary encoder flips between saturation 1.0 and 0.2 (to allow different color temperatures of "white"). The potentiometer code needs a little work though. The pot is generally linear taper, except near the far ends where it has dead spots, but the code doesn't seem to update correctly at times (whenever I move the pot fast) and it's quite clear to me now that I need to apply a curve to the brightness b/c currently just the upper half of the pot's range is practical b/c everything below that is too dim to bother. There's also a glitch in either the receiver code or transmitter where rapid updates cause the lamp to lock up and not receive any more until I power cycle it. That probably needs the logic analyzer so it'll be a task for a later date. There are 2 SPDT switches for configuring an "address" so I can use 1 remote to configure up to 4 lamps. It changes the DMX STARTCODE used OTA, but keeps the communication on the same 2.4GHz channel / 250Kbps bitrate. Pic of it in action: OSHpark mockup of the PCB: bluehash 1 Quote Link to post Share on other sites
timotet 44 Posted July 16, 2013 Share Posted July 16, 2013 very cool! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.