I'm Steve, and this blog is about what I'm working on or thinking about right now. At least it was when I wrote it. I'm guessing I've already moved on to something else. ;)
My good friend Joey Ramirez was heading up the School Maker Faire® at the elementary school and he asked if I’d like to present my Star Display as an exhibitor. I’m definitely a Maker Faire kind of guy, so I jumped right on board.
The two-hour after-school event was put on by Joey and the PTA, with the help of the Thinkery and the local robotics teams. Sponsors included: Pawsitively Healing Veterinary HouseCalls, Steiner Cleaners, and RG Orthodontics.
Our family’s been immersed in the local STEM and robotics groups for years, so there were lots of friendly, familiar faces. I was glad to show what I’d been working on recently, and I was impressed by what they had accomplished since we were here.
A few of the other exhibits and activities
Robotics
The robotics team hosted a nice interactive LEGO® robotics “play” area on their FIRST®FLL competition arenas. They also brought along two 3D printers that demonstrated the new equipment and skills they are using.
Student exhibits
Numerous school students presented their own tech and craft skills:
a giant rocket model made from PVC pipe
a plethora of Nintendo Labo projects
some excellent and arty craft glue projects
a flying Captain America shield made from cardboard and duct tape
The Thinkery
These exhibits were top notch and really got the kids involved in making:
Marble run chutes / sculptures on pegboard walls
Drawing with buzzy, wobbly, scribble bots
Building electric circuits that lit up and spun corks around like tops.
It’s a Major Award!
I was rather surprised that they handed out awards for the adult run exhibits, but it was a nice gesture on the part of the PTA. It made me feel like I’d won the science fair.
Wait… Doesn’t “coolest” override “coolest use”?
Well, it wasn’t a science fair, and maybe I didn’t really “win” after all, but I sure did enjoy it. I’m sure to be seen wearing my “winner” ribbon around town for at least 1.21 months. Thanks for the invite Mr. Ramirez, and thanks for bringing us all together to show our “maker” sides!
I wanted a fun project to freshen up my Python programming skills and I happened on this idea while putting out my Christmas lights for 2018:
Let’s make a new yard display using individually addressable LED pixels!
If all goes well, I’ll be able to replace my existing display of mini light stars with a string of these cool computer controlled LED stars. I might even be able to synchronize the display to music!
Pixels and Pixel Strips
I chose the WorldsemiWS2812B as the pixel component for this design.
Each pixel includes three internal LEDs (a red, a green, and a blue), along with a built-in controller. The controller can set each of the three LEDs to one of 256 brightness levels.
The 2812s operate from a 5 volt supply, and each has a data-in and data-out pin for the serial control protocol. The components are daisy chained by their ins and outs with only 3 wires needed between each pixel. I think less wiring means less chance for wiring problems.
I picked BTF-LIGHTING‘s IP65 strips due to their low cost and waterproof design. I really like the simplicity of the flexible strip.
I’m not sure if the components they use are actual 2812s, but they are compatible with the protocol. I’m using the black, 30 pixels per meter variety in this project. The strips can be cut at the pads and have a thin, double sided tape backing.
Star Layout
The layout was carefully planned with a few constraints from the old display. I wanted to keep a similar star size, have pixels at the tips, and avoid overlapping pixels in the middle of the star. I used a quick Scratch program to verify my layout ideas using “turtle” or “pen” graphics. I decided on a strip of 45 pixels, and cut it into five 9-pixel sections. Each section forms part of a ten pixel chord that includes the start of the next strip.
Star Strips
The BTF strips need a support structure to hold them in the star shape. I decided to design my own plastic strip that could be 3D printed, then assembled into the star shape. The ends of the strips snap together and have slots to accept zip-ties that securely hold the pixel strips in place.
I found a mail-order supplier on TreatStock and had my parts printed in ABS plastic. I unexpectedly specified 20% infill on the order, but that worked out OK with the strips being somewhat flexible for the woven assembly I wanted.
Raspberry Pi
There are plenty of choices for LED pixel controllers. For me, the Raspberry Pi works great. I have a Raspberry Pi model 3 B, so I’m using it.
I’m running Raspbian (AKA Debian Stretch) Linux. The Pi is inexpensive, and out of the box, it offers a bunch of learning opportunities with free, open source software and development suites. Included HDMI, USB ports, WiFi, and Bluetooth make this a stand-alone computer that runs from a 5V wall-wart.
BiblioPixel
I’m using Maniacal Lab‘s awesome BiblioPixel light programming system to run the display. Their open source Python3 code library is hosted on GitHub. The package supports multiple pixel types, is portable to multiple operating systems, and comes with a lot of example animations. They support pixel layouts for one-dimensional strips, two-dimensional matrices and disks, as well as three-dimensional cubes. The animations are customizable via project files written in YAML or JSON. I was able to start with their animations very quickly using their built in strip layout. I had my own animation ideas for this star, and was able to program my own animation in Python. More on that later.
AllPixelMini
There’s one more component between the Raspberry Pi and the pixel strips. That’s Manaical Labs’ AllPixelMini.
It’s a USB device that handles the serial protocol that updates the pixel colors. This frees the Raspberry Pi of that CPU overhead and allows other real-time event driven software to co-exist on the system (audio, mouse, GUI, etc.)
Wiring
In my setup, the AllPixelMini provides just the data signal (green wire) to the pixel strips (ignore the red wire above). A ground connection (white and black wires) is also required to make sure all the ground levels are common between the power supply, LEDs, and AllPixelMini. The All PixeMini gets it’s power (and ground) via the USB cable.
These 3-pin waterproof connectors work great for connecting the display to the power supply and AllPixelMini.
I plan on using the same connectors to daisy chain the stars and other display components when I scale this up.
Each 9-pixel strip is wired to the next with a 3-wire connection for 5 Volts, ground, and data.
The strips have solder pads on the back that let you keep the waterproof covering stuck to the LED side.
I also added adhesive lined heat-shrink tubing after soldering to keep the connections waterproof for outdoor use.
Power Supply
Each star of 45 pixels draws 1.66 Amps at 5V with all the LEDs of each pixel at full brightness, and 32mA in the quiescent “off” state. I’m using a 60 Amp, 5 volt supply driving the 5V rail of the LEDs directly (black and red wires connected to power supply above) without feeding power through the AllPixel Board. There’s plenty of power left for expansion, and the fan on the supply does not turn on with this light load.
Emitter Animation
When I first imagined the star display, I was thinking of the way firework streamers looked. You’ve probably seen animations that use particle systems to simulate fireworks. The firework explodes with glowing particles being emitted from a point. The particles stream down, flicker and fade before they burn out. This animation is similar.
The Emitter() animation is a one dimensional particle system for BiblioPixel. The animation is written in Python. My Emitter() class inherits from BiblioPixel’s Strip() animation class. You can find my GitHub repository here. Manaical Labs has also included it in their repository.
The Emitter() class has lots of parameters to control the particle effects, and the source code contains docstrings describing the parameters. Definitely check that out. The parameters can be overridden in BiblioPixel’s YAML or JSON project files. Here’s emitter_demo.yml for the demo in the video.
Each strip can have multiple emitters with programmable positions and velocities. Particles can be emitted in either or both directions. Moving emitters and particles can wrap at the end of the strip. The emitters can be invisible or have color.
Emitted particles move away from the source starting at the full brightness of a color that’s randomly selected from a palette. The brightness then varies in a random manner. The random variations are chosen from a list built at class initialization. The default settings should make the particles “sparkle” and fade. The distribution of brightness variations is adjustable.
Brightness Deltas
The Python code for plotting the histogram is here.
Individual particle velocities are random with adjustable constraints. Particles have a range and won’t go beyond a specified distance in pixels. from their emission point. At a given frame step, an emitter can start multiple particles. The starts_at_once parameter controls how many can start. The starts_prob parameter controls the probability that a particle will actually start. The variance in particle velocities lets particles overtake each other as they travel down the strip. Particles can hold a brightness level below zero and then randomly come back up above zero becoming visible again. Another effect is flares. The flare_prob parameter specifies the probability that a particle can immediately return to full brightness before resuming random brightness variations.
The particles are rendered onto the strip “screen” at each animation step. A loop goes through all the strip’s pixels and sees what particles or emitters are visible from that spot. If no particles are visible, the background color is used. The aperture parameter controls the “visibility” distance. If the distance to a particle is outside the aperture distance, it does not contribute to the pixel. The colors of the visible particles are then blended based on their distance to the given pixel. Particle positions, distances, and apertures are all floating point values. Small aperture values can cause blinking when a particle or emitter becomes invisible between the pixel locations. Larger aperture values will spread a particle’s color across multiple pixels.
See More
Check out this part of the star display demo to see all the parameters in action:
Selfie showing the DIY filters I made for my binoculars. Of course I can’t see anything dimmer than the Sun though them. 🙂 I used the same construction technique as I did for the telescope filters. The cool eclipse mirror is the one that hangs in the art niche in our hallway.
When I showed these filters to my dear son, he commented that he didn’t think they looked very professional. At that moment I had a very “professional” idea…
8/5/17 Update
Some “Sun Shades” for the binocular eclipse filters!
When you are facing the sun for long periods of time, you might benefit from an extra bit of shade. Hence, the shielding disks I added. As I manipulated the binoculars to adjust for eye distance, I realized the disks were kind of “eclipsey”, so I decided to put sun and moon images on them. Well, that simply wasn’t enough drama, so I added faces. The sunglasses idea just tries to bring some sanity back to the whole thing. Totally professional! I can not wait until I whip these out in public! I might need a piece of white “tape” to hide that crack between the glasses halves.
After seeing something similar on line, I built this gizmo out of 1/2″ PVC pipe and cable ties. It should help me align to the Sun by maximizing the bright spot in the middle of the shadow. The bottom tubes keep the top tube aligned with the scope tube.
Better than the toilet paper tube ideaZip-tie constructionZip-ties in placeUse an index card to check the aimIt needs to stick out beyond the filter
I set up the scope to see how the filters worked. This is the Celestron 90GT that Santa brought us for Christmas in 2014. It looks a lot like the $189 model from Costco. So far so good. There is a filter on the main scope and one on the smaller spotter scope near the eyepiece.
First Light for the New Solar Filters
First light through the new solar filter I put together. This somewhat unimpressive shot of our star was taken on my Samsung Galaxy S7 pressed against the eyepiece of the Celestron 90GT with my DIY filter on the objective end.
I’m still working on a few things here. First, the focus isn’t great because I need some shade out there so I can see what’s going on. Second, I’m still trying to figure out how to use the solar align feature of the NexStar controller, and the Sun keeps drifting out of frame while I mess around with the camera. Third, with this high magnification, the slightest breeze, camera movement, or hand shake blurs the image. I’ll try lowering the tripod so I can sit on a stool or chair for more stability. This is all stuff that can be worked out. No show stoppers.
I’m happy that the 20mm eyepiece makes the Sun’s image just about fill the view. It seems possible to observe surface details with this setup. I have a 4mm I’ll try, but that might be too much zoom for a steady photo. I’m considering a 30mm or 40mm to pull back a little bit more to gain some margin for alignment error and to see more corona during totality.
Testing with the extension tube and T ring on the DSLR remains.
Standard Scope Eyepiece Setup
I’m working out how to go from the standard setup (pictured above) to one with a camera attached. I hadn’t seen any specific “do it this way” descriptions for the 90GT. The silver tube is the focus tube. It moves in and out of the telescope to set focus. At the pictured distance, the 20mm eyepiece (also pictured) gives a sharp image to my eye. That image can also be photographed with a smartphone against the eyepiece. The next few photos will show the information that was unknown at the time I bought the extension tube and T ring for the camera.
Using the T Ring by Itself
This camera setup is probably the simplest, and likely best. Slide the diagonal mirror assembly from the back of the scope’s black focus tube end. You’ll be left with a T42 threaded end. Ignore the extension tube that came in the camera adapter kit and just screw the T ring onto the T42 threads. Then you can put the camera on the adapter’s bayonet end. This is the focus tube distance for this configuration.
D7100 on the T Ring
This shows the camera mounted on the focus tube end. I used the camera’s “live view” to keep the mirror up and show the Sun on the display. I found a 1/50th of a second exposure at 640 ISO gave a pretty good image. The sun fills about half the vertical in the DX frame of my D7100. That’s about ideal. I need more experiments with exposure and ISO on the filtered Sun as well as the moon. The moon will help get the right exposure during totality. Since the 90 degree mirror is not in this setup, it’s kind of hard to see the display on the back of the camera when the scope is pointed up and the back of the camera is facing the ground. At higher latitudes, the angle won’t be as extreme. I might want to use an HDMI cable to run to an external monitor (analogous to the Baja setup). That’s going to need an extension cord or inverter depending on where we are.
Finally, the camera is heavy, and the tracking motors won’t hold it. I’m going to need to figure out how to put a counterweight on the opposite end of the telescope tube.
First Light with the D7100 (click for larger image)
This is an unaltered shot from the first test of the D7100 on the back of the scope. 640 ISO and 1/50s
There’s still a focus issue due to the fact that I can’t see the screen very well outside in the daylight. I’m going to have to use some kind of hood or monitor. I also forgot to cover the viewfinder hole again. I bet the light leak from that messed up the contrast some. It could also be due to the cloud passing in front and other atmospheric haze.
Finally, my CCD is filthy! All this lens changing and stuff has really put a lot of junk on it. I see specks on the mirror and CCD when I peer inside the camera. Some of the specs could be on the scope lens too. Guh! I’ll work on cleaning that all up.
Using the 90° and the T Ring
Here is an alternate configuration that uses the extension tube and the 90 degree diagonal. This makes it easier to see the back of the camera when the objective is pointing up. You start from the original setup and slide the eyepiece from the 90 degree diagonal assembly. Then you add the extension tube and T ring. Then you drop the eyepiece into the extension tube and tighten the screw to hold it in. Finally, attach the camera. Again, I’m showing the focus tube distance for focusing on the Sun. I put a bunch of marks on my tube so that I’d know some good places to start hunting focus. The setup has a hard time holding the heavy camera. The whole setup seems pretty strained and sloppy. I expect I’d need to add more weight to the objective side than with the focus tube end setup.
20mm Eyepiece in the Extension Tube
Here’s the eyepiece nestled in the extension tube. With the diagonal and the 20mm eyepiece, it gives about 3x more zoom at the camera CCD than with the “direct T ring on the focus tube end” setup. The sun’s disk is about 1.5x the vertical size of the DX frame on my D7100.
Objective End
Here’s what the input side of the setup looks like. I found I had to angle the main filter so it wouldn’t block the finder scope. I kept getting close to lining up the Sun in the finder scope and then losing the Sun in the finder due to the shadow from the big filter. What is going on? Doh! That was a little frustrating.
Side note: When you are out working on this stuff, make sure you put on your sunscreen. No matter what you do, you’ll end up facing straight into the Sun for a long time!
OK, so I got tired of trying to squint into that little finder scope while getting fried by the Sun. I did figure out if you put a piece of white paper on the ground, and look for this image, you’ll be pointed right at the Sun.
So now I’m thinking of making a simpler finder scope with just an empty toilet paper tube that the Sun shines through when it’s lined up.
Oh…
Wait for it….
Take a picture of yourself through a toilet paper tube and pretend you’re the Sun!This shot may have been altered. 😉
I assembled some cardboard frames to hold sheets of the filter material and attached them to tubes of cardboard that will go over the telescope and finder scope ends that will be pointed toward the sun. Finally, the tubes are set in rigid foam blocks to it able to withstand some handling over the coming years. It’s the same technique I used in 1991.
My T ring and extension tube also arrived. They should allow me to connect my camera to the 90GT telescope.
I’ll be set to take some Sun pictures tomorrow. There’s no eclipse, but I might see some sunspots.