Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Home Biological Research Lab


#1

Well I did it. I built a biological lab under my house.

Immortality%20Backround%202

Time for some bragging. I did the epoxy resin countertop myself, for several thousand dollars cheaper than one ordered from a scientific provider. I poured the concrete slab and covered it with more epoxy resin. I built the walls using 2x4’s and siding from Home Depot. Got the laminar flow hood for a couple hundred - cheapest one online from NuAire is several thousands. The most expensive part of the entire setup is the hexagonal glass, which had to be custom ordered. I built frames for the glass which also houses LED strips that create backlighting. I built the wall mounted computer using Newegg. Dual monitors - both DVI instead of HDMI. Sloppy mistake, but it’s easier to use a converter cable than to send them back. The lighting consists of APA102 4-pin LED strips from pololu and Adafruit, roughly 4 feet per glass piece and another 30-40 feet combined for the bar lighting on the wall and under the countertop. Had to do a lot of chopping and soldering. The signal cables transition to CAT5 which run along the walls, meeting up behind the computer where two wireless raspberry pi zero’s are located. Using SSH and github to transfer and run code from the main computer to the pi’s.

Does it look awesome? Yes. Was it expensive? Not as much as it could have been. Do I have an ego problem? Most likely. Also, my explanatory videos seem to be pretty bad so far.

But please ignore that, because I could use some help with python coding. I am almost done with a mouse enclosure. One of the components is to use APA102 LED lights with a raspberry pi zero wireless controller to automatically set daytime/nighttime cycles.

I was able to use datetime.datetime.now to grab the current time, and then compare it to a specific hour to produce a true/false result. However, I don’t know the syntax necessary to simply send a single signal to the LED strip to change the color. I’m using parts of the example code:

MY_CYCLE = colorschemes.Solid(num_led=NUM_LED, pause_value=4, num_steps_per_cycle=1, num_cycles=1)
MY_CYCLE.start()

This produces a flashing effect every 4 seconds when the condition is evaluated as true (when time is past 7 AM). Ideally, I want to set the light to be a % brightness fade-in relative to the time, but I can settle for manually programming in various % brightness using a system of if statements checking against the current time.

The general schema should be:

if time is < 7 AM, turn strip off
If time is > 6 AM and time is < 7 AM, set strip to 20% brightness, white
If time is > 7 AM and time is < 8 AM, set strip to 40% brightness, white
If time is > 8 AM, set strip to 60% brightness, white

And then the same thing for nighttime, but reverse.

Another thing, is it possible to control two APA102 strips from the same pi simultaneously? I tried splitting the signal, but it’s kind of iffy. Oh, and I haven’t been doing any voltage adjustments. That might be important. I tried to use the voltage adjustment chip, but I connected the power wrong and it partially melted the breadboard. I have another chip but I’m reluctant to hook it up. It seems to be working with the native voltages so far. When I try to split the signal three ways, it has major problems.

Hoping to get some help on this. I’m trying to do some simple mouse experiments to reconcile 70 years of calorie restriction research as part of the larger pursuit of biological immortality.


#2

Cool lab! Thanks for sharing.

It looks like are you trying to modify some example Python code that you found; I recommend contacting the author of that code.

Yes, it should be possible to control two APA102 strips through direct connections to the same Raspberry Pi. However, each APA102 LED is individually addressable, so it might be easier to just chain your strips together and control them from a single SPI bus.

-Jon