Tagged: Arduino

Beer spectrometer tests…

Here are some cool looking pics from my upcoming beer spectrometer project.

2014-09-25 15.40.10            2014-09-26 11.41.38-1

Advertisements

POV

So while waiting (and waiting) for the eventual arrival of the last remaining parts for the Luminous Loafers I have been filling my time with new projects. After seeing an excellent POV globe at the Brighton Maker Faire I decided I wanted to do that! Also it would be a good way to learn a few new things too.

So here is my first experiment with POV. Very simple, just an Arduino nano clone, 595 shift register and 7 white LEDs. The first step on my way to building the full volumatric 3D POV display I want!

POV HELLO

The result of me waving my phone around wildly hoping for a good pic…

Pendulum wave using the LOL shield

I have had a lol shield laying around for quite a while now and never really used it beyond the example sketches. It’s a great little glowy shield, especially as I love anything involving leds.

So I decided to write up a quick sketch to make something interesting to light up my desk as I work. Being a physicist I decided on a pendulum wave. It’s a nice demonstration of simple harmonic motion and pretty hypnotic to watch. Here’s a nice youtube video of a real one in action: Pendulum Wave.

For my sketch, each vertical column of leds represents my mass on a spring, and each column will have a shorter string. This is simply modelled and a nice derivation is given here. So it was just a quick job of writing up a sketch and here we go! Enjoy the video (apologies for the poor quality).

pendulum

 

Here’s the sketch if you want to have a go:

#include <Charliplexing.h>

void setup() {
LedSign::Init(); //Initilizes the LoL Shield
}

int p = 0, Hled[15];
int N = 50; // N is the number of oscillations individual oscillations on the first pendulum until the whole wave repeats
int period = 20000; // each time step is an interger incremented each loop
double amplitude[15]; // amplitude of each pendulum colomn

void loop() {

for(int x = 0; x < 14; x++){
for(int y = 0; y < 9; y++){
if(y == Hled[x]){
LedSign::Set(x,y,1);
}
else{
LedSign::Set(x,y,0);
}
}

for(int z = 0; z < 15; z++){
amplitude[z] = (4.5*(0.85+cos((2*3.141*(N+z))/(period)*p)))+0.5; // calculates the amplitude of each colomn
Hled[z] = int(amplitude[z]);
}
p++;

}
}