This is an update of my original HoloClock project. It's sorta like a Polaroid camera for holograms! The last one used WiFi, which tends to underperform in noisy wireless environments. This one uses Cypress' PSoC BLE kit, which performed well even at a crowded conference.
What are we making? These awesome little 3D images!
ProgrammingFirst, download all the requisite software – you can get it bundled with all the examples in one big tasty .zip file, or if you already have the software installed, just get the "CY8CKIT-042-BLE Kit Only Package (Kit Design Files, Documentation, Examples)".
Open up the PSoC Creator interface. You'll see the Start Page tab open; on the left side, under Examples and Kits, hit Find Code Example..., then select BLE...FindMe.
We're going to make some pretty minor modifications to the code. Of course, you can skip ahead and download the code I've provided at the end of this tutorial.
Basically, in your "TopDesign" schematic, add two output pins for an indicator LED (which will turn on when the laser does, to show you what's going on) and for the laser itself.
Then, assign these to pins 0.0 and 0.1; they are basically interchangeable, since they'll both turn on at the same time in our code.
In main.c, you've got a few alert levels defined. In "MILD" and "HIGH", right after the line where you turn the RGB LED to blue, add code that turns these pins ON. Then, add a CyDelay() of 30000 ms for MILD (a quick test flash), and 900000 for HIGH (a full 15-minute exposure). After the delay, set the pins OFF.
Create a main.h file and define those on/off variables: ON as 15 and OFF as 0. (The RGB LED takes 0-255 PWM values, so these aren't already set up.)
Physical setupWe're using an NPN transistor to provide 5V power to the laser, regardless of what the PSoC's digital pin provides.
Connect these with jumper wires:
- Laser's power wire : 5V power pin (V5.0)
- Transistor's Drain leg : Ground (GND)
- Transistor's Base leg : pin 0.0
- LED's positive leg : pin 0.1
Also, solder:
- Laser's ground wire : NPN transistor's Source leg
- LED's negative leg : Transistor's Drain leg (why use two Ground pins if you don't have to?)
Now, when you toggle the pins HIGH, the laser and LED will turn on!
Finally, download the CySmart app to your phone.
* You may need to update your Bluetooth dongle. You can get the current .hex file from the BLE kit page as well. Then, follow Gagan's directions to run the update.
Try it out!When you plug the assembly in, the RGB LED will turn green for 30 seconds. That's your window to connect with it, after which it'll turn red and you'll need to reset the board (there's a hardware button for this). While the LED is green, fire up the CySmart mobile app and look for the "FindMe" Bluetooth presence. Tap it and wait to connect, then scroll over to the "FindMe" option on the left. Pick an alert level from the dropdown, and watch your laser switch on wirelessly!
Woohoo!
To expose a hologram:
- Put your object(s) in place, opposite the laser diode – with it OFF!
- Drape the whole thing in lots of black cloth
- Stick your head under and place the glass plate in front of the objects.
- Plug in the PSoC and dongle; open CySmart on your phone and pair with the FindMe beacon.
- Scroll left and select the FindMe application. Set the alert level to HIGH.
- ...Sit still and wait!
I'd like to...
- Make everything fit underneath the clock: For aesthetics, and so I don't have to cover the board's LEDs to keep them from leaking into the clock
- Add more weight: Thinking of simply gluing pennies to the bottom.
- Redirect the laser beam with mirrors: This is one thing I should've carried over from the original kit. If you shoot the beam square at the glass plate, you make it difficult to see the hologram without glare from your light source bouncing off. Plus, you set yourself up for Newton's rings, which can be caused by light bouncing around inside the glass plate (from surface to surface)—wreaking havoc on the hologram, which wants unidirectional light. Better to have it shine down from an upper angle.
By interference is the hologram created, and by interference it can be destroyed. Watch out for light leaks and ricocheting light from all directions (so, keep the inner surface matte).
Comments