Showing posts with label flicker induced hallucination. Show all posts
Showing posts with label flicker induced hallucination. Show all posts

20111003

Goggles Kits for VIA are Go !

Alright kids, as promised, flicker hallucination visor kits for VIA are packed and ready to go! We should have about 30 kits available at Assemble on Wednesday October 5, 4-7PM. There will also be drawdio kits and LED illuminated kites. The Visor kit is a sexy remix of the brain machine kit, which retails for $35. The Visor also cost that much to produce, but we're still looking for last minute sponsors to subsidize the Assemble workshop and bring that cost down a bit. The remainder of the kits ( about 50 in total ) will arrive by Saturday and will be available at the main event. Assembly instructions and additional information are hosted at www.treehovse.blogspot.com. If there are any extra kits, we've reserved a booth at the Pittsburgh Mini Maker Faire to make them available there. Let me know if you would like me to reserve you a kit. There also might be a very limited number of pre-built kits available, time permitting. By the way, this most excellent Visor cartoon has been brought to you by Austin Redwood.


20110929

The origin and properties of flicker-induced geometric phosphenes

A Model for the Origin and Properties of Flicker-Induced Geometric Phosphenes (PDF).

Many people see geometric patterns when looking at flickering lights. The patterns depend on the frequency, color, and intensity of the flickering. Different people report seeing similar shapes, which are called “form constants”. 

Flicker hallucinations are best induced using a Ganzfeld (German for “entire field”): an immersive, full-field, uniform visual stimulation. Frequencies ranging from 8 to 30 Hz are most effective. 

This effect is used by numerous sound-and-light machines sold for entertainment purposes. Some of these devices claim to alter the frequency of brain waves. There is no scientific evidence for this. However, the flickering stimulus may increase the amplitude of oscillations that are already present in the brain, to the point where geometric visual hallucinations can occur.

Figure 1. Illustrations of basic phosphene patterns (form constants) as they appear subjectively (left), and their transformation to planar waves in cortical coordinates (right).

How do flickering lights cause geometric visual hallucinations? Roughly, flickering lights confuse the eye and the brain, causing them to see geometric shapes that aren't there. The phenomenon is related to how bold patterns can create optical illusions, but in this case the pattern varies in time, rather than space.

Our hypothesis is that the flickering interacts with natural ongoing oscillations in visual cortex, exciting a specific frequency of brain waves. This increases the activity in visual cortex. This increase in excitability is similar to what occurs on some hallucinogens

The simpler patterns, like ripples and spots, are mathematically related to the Turing patterns in animal coat patterns. More complex patterns occur when these instabilities interact with the brain's pattern recognition circuits. For more information, including the mathematical details of the model, head over and check out the paper.

The theory predicts that low frequencies (8-12 Hz) are more likely to induce spot-like patterns, and that high frequencies (12-30 Hz) are more likely to induce striped or ripple patterns. Anecdotally, I have tested this on myself and find it to be approximately correct for a white flicker Ganzfeld stimulus. I also find that low-frequency red-green flicker reliably induces checkerboard patterns, and that red-blue flicker reliably induces an almost quasicrystaline pattern of triangles and hexagons.

Many thanks to Matt Stoffregen and Bard Ermentrout for making this possible, as well as the CNBC undergraduate training program. The paper can be cited as

Rule, M., Stoffregen, M. and Ermentrout, B., 2011. A model for the origin and properties of flicker-induced geometric phosphenes. PLoS Comput Biol, 7(9), p.e1002158.

 


 

Extras that didn't make it into the final paper:

Below is a variant of Figure 6 inspired by Robert Munafo's visualization of the parameter space of the Gray-Scott reaction-diffusion model. It shows how the evoked patterns vary depending on the flicker frequency (horizontal axis) and amplitude (vertical axis). Activity levels of excitatory and inhibitory cells are colored in yellow and blue, respectively.

It's computed by integrating the periodically-driven 2D Wilson-Cowan on the GPU. We drive the system with a uniform periodic stimulus, but vary the integration time step $\Delta t$ so that each location perceives a different frequency. The continuous simulation causes patterns to "spill over" into the nearby areas (where patterns are not spontaneously stable), so we didn't include this version in the paper.

Primary visual cortex isn't a perfectly square, periodic domain, and we also simulated patches resembling the shape of this brain area. Here, it was important to create a soft absorbing boundary, otherwise the sharp boundary itself promotes pattern formation. Horizontal and vertical stripes are stable, and this may account for why radial and tunnel-like patterns are slightly more common.


Videos of simulation:

Here is a video of the striped patterns emerging on a rectangular domain

 

 

And the hexagonal patterns:

 

Here is the stripe pattern again, transformed into perceptual coordinates:

 

Emerging patterns are associated with a "critical wavenumber", which sets the spatial scale of the instabilities in the model.  If you visualize the amplitude of the Fourier coefficients of the 2D system as patterns emerge, you see that isolated peaks in spatial frequency appear (along with their harmonics). The example below is for a striped pattern:





20100911

The Hazards of Ze Goggles

Kenna - Hell Bent (Official Music Video). Watch more top selected videos about: Kenna


Long term effects of ze goggles have not been adequately studied. Possible side-effects may include persistent visual artefacts, vocabulary reduction to "whoa", "dude", and "groovadelic", and loss of your human essence. Pregnant and nursing mothers should avoid use of ze goggles. Use in moderation. Protect your vital bodily fluids.


20100529

Do it Yourself : Trip Visor

Thanks to a dumpster diving friend I had come into possesion of a pair of welding goggles, as well as some white translucent plexiglass. So, the old hallucination goggles project was adapted for this new, awesome, rugged, form factor.

Step 1 : electronics :
I chose to use an Arduino Pro-mini, two RGB LEDs for the goggles, and a 4 character multiplexed 7 segment display.

Step 2 : draw a circuit board. I like to use a generic drawing program so I can put graphics in the copper pattern. Some PCB drawing software will also allow this, although not all PCB fabrication services will do custom graphics. I skipped out on the current limiting resistors for the blue and green channels, since the supply voltage is actually lower than the LED driving voltage. I still needed them for the red though. This kind of design is very general, as you just need to get some LEDs to blink in a controlled manner. The circuit looks like this :



Next, transfer pattern, etch, drill, clean. It is easier to wire this up on a breadboard and then transfer it to a radioshack protoboard, to save on the hassle of making your own board. Here is a tutorial that I loosely followed, and here is a previous post where I practiced the technique, and below is the finished result. I made the traces from the Arduino to the LED display a too narrow, and unless you're careful this design requires clean up after etching.


I was wrong to try to drive this circuit from coin cell batteries. These batteries do not put out enough current to drive the LEDs. I worked around this by adding a 2xAAA battery pack to the interior of the goggles. If you copy my design, bear this in mind and adjust accordingly.


My friend laser cut white plexiglass to replace the tinted glass of the welding goggles. This is a square cut that could also be accomplished with a saw. These goggles have a slot for a piece of plexiglass on the inside, and another piece on the outside, with 7mm clearance in-between, so it is straightforward to sandwich the LEDs between two sheets of plexiglass to create diffused light. Position the LEDs approximately in the center of the visual field in each eye, so that when you look at them through a pane of the white plexiglass, they line up as if they were one diffuse source. I used standard connectors for indicator lights and power buttons in PC cases to connect the LEDs, and a rocker switch from an old Ikea lamp, to finish off the connections.


This is more durable than past designs, since it doesn't have a separate part for the driving hardware and the goggles, connected by a failure prone cable. Reminds me of this. I can actually toss this one around without breaking it.



20100228

Drop-Day 2010 Tech

I figured I'd start writing this up on the return flight from Drop Day, so I'm typing here at an odd, cramped, angle from my flight back from LA to Pittsburgh.
Drop-Day was a fine production, a victory for both hobbyist physical computing, and the forces of democratic freedom. I was impressed with the stark giant white cube dance floor with the, as Biff describes, lovecraftian monolith as a centerpiece. Something about the smaller size and the fog machine made people actually want to dance this year. The sensory rooms were excellent, although some of the code running the party never got off the ground. There is something uniquely appealing about a party that crashes, and requires rewriting of computer code and recompiliation on the fly. In addition to projected visuals ( Kanada, Perceptron, Cortex, Live and recorded video feeds, and other trippy renderings ), we had a few Alumni constructed blinkylights. Keegan completed a most excellent glowing octahedron, Suresh completed a rather nice modification of a commercial lamp, and I constructed several more pairs of goggles. I have spent most of my time travelling ( and very little sleeping ) this weekend, and it was well worth it. However, I doubt I'll be traveling back any time in the next five years. Others travel from much further away (London, Fairbanks) to go to this party, which should give you an idea of how important this party is to Dabney alumni.
RGB controlled diffuse illumination lamp :
Suresh successfully modified a modern style diffuse diffuse illumination lamp for controllable RGB color. He even designed and ordered a custom multi-layer board for the thing. I will try to track him down and see if designs and photographs are available anywhere.
CCFL octahedron :
This project was a wire-frame octahedron, approximately two feet on each edge. An octahedron can be viewed as 3 intersecting squares, once for each of the x, y, z, axes. In this design, each axis was assigned a specific color. The octahedron was constructed using two standard cold cathode fluorescent lighting tubes per edge, driven by black-box driving hardware that is powered by 12V DC. 12V is switched to the various edge drivers using darlington arrays controlled by an AtTiny2123(?), with 12V pulled from a modified desktop computer power supply. The skeleton of the octahedron itself was build by cutting wooden dowels to size, drilling a hole through each end, and joining the ends with zip-ties. The lights and driving hardware was also secured to the skeleton via zip ties. A great effect of the hue rotation on tie-dye style patterns is to cause the location of edges to appear to shift as the color changes and alternatively illuminates different parts of the pattern.
Revised goggles :
The goggles you see in these photographs still use the same old LEDs in ping-pong ball design, stripped down and controlled by an AtTiny13a. I would not recommend this design, as technically the chip is unable to source more than 60mA, where the goggles may require up to 120mA. Offhand the AtMega(4,8,16)8 chips are the only ones I can think of that can source sufficient current, and since they can hold more elaborate programs might be a better choice for future designs. Additionally, although the AVR micro-controllers can function at a range of voltages, the nonlinear V-I curve of the LEDs means that attempts to balance the white-point using resistors must be in the context of a well defined voltage ( preferably a constant 20mA current source, but that takes up board space ). Additionally, I was surprised that the internal resistance of coin-cell Cr2023 batteries limits them to approximately 0.3mA continuous draw. Although the much higher mean current draw of ~20mA for the goggles can be supported, this will cause the battery voltage to drop during operation and the LED white-point to drift. Eventually the voltage falls below the operating voltage of the AtTiny. The coin-cells will recover after about ~30 minutes of rebound. We're still seeing some problems with party-durability but hopefully refining the PCB board design and construction can improve on this. Building the goggles is incredibly annoying and I doubt I shall be constructing any more by the old methods for some time. I'm still a bit baffled as to how someone magically managed to repair solder connections and rebuild the connector on one of the goggles in the middle of the party, but ... thats Dabney house for you.
Laser Spirographs and Monolith-Monitor tower with EL wire :
I don't have good documentation on this at the moment, other than this system crashed a lot during the party, but was still super awesome.
Thanks to everyone who made this happen, it was great to see you all again.
 
 


20090902

Do It Yourself : How to Build Hallucinogenic Goggles

This post will describe how to construct a pair of goggles which can be used to induce geometric visual hallucinations (1 2 3) via strobe light patterns. This tutorial should be accessible to anyone familiar with Arduino, and I do not cover details of the electronics design. These goggles can be constructed for 25 to 50 dollars, depending on how good you are at scavenging parts.

WARNING : this and similar projects have been known to induce seizures in susceptible individuals.


Device Summary

This device consists of three major components : a physical interface to provide the visual stimulation, electronics to control the physical interface, and code which governs the behavior of the interface. The physical interface consists of ping pong balls in swimming goggles with LEDs inside. The electronics are an Arduino pro-mini, and a few additional interface parts. The code is Arduino SDK C style driver code.

Component 1 : Physical Interface
Update : This later post suggests there might be an easier, faster, and more durable way to construct the goggles. The design posted here works fine, but is tricky and time consuming to make, and also fragile.

parts :
  • 4 to 10 Ping pong balls
  • 2 RGB LEDs, frosted clear casing (this is important, sand down the outside if not frosted)
  • 2 4x1 male headers, .1" spacing
  • 2 4x1 female headers, .1" spacing
  • 1 8x1 female header
  • 1 Dolfino medium sized silicone adult swim goggles ( had to buy in a 3 pack )
  • 2-3 ft of elastic ribbon
  • 3-4 ft of ribbon cable, only 8 channels required. Other cables with 8 channels also work.
Description :

Ping-pong balls, cut as if by a plane penetrating approximately 15% of the ball diameter, and rejoined with with smaller section inverted to form a cup like structure. RGB LEDs are affixed via solder to male headers which penetrate the corner of the ping pong balls (near the joint of the two sections). Light is emitted from the LEDs, reflects off the back of the larger section of sphere, and creates uniform illumination in the smaller cup. Two ping pong balls are nestled in a modified pair of swimming goggles. A ribbon cable connector is affixed with female headers which interface between the male headers on the spheres, and the male header output from the electronics. Note that logos or text printed on the ping pong balls can usually be removed with acetone ( nail polish remover ).

Tools :
  • one minute epoxy
  • superglue
  • soldering iron
  • solder
  • sharp razor
  • scissors
  • medium to fine sandpaper
  • wire cutters
  • tweezers
  • pin
  • toothpick, etc. for mixing and applying epoxy
Instructions :

Construct (2x) ping pong ball shells which are mirror images of eachother:


  1. Imagine the section cut by a ray displaced 34-40 degrees from vertical and rotated around the z axis. Alternatively imagine the section of a circle cut by an arc of 70-80 degrees. This partition defines the sizes of the large and smaller sections which form the spherical diffuser. You will not be able to cut both sections from the same ball, since material is lost in cutting, and a 1-2 mm edge is required for overlap to bond the sections together. Additionally, neither side should have a company logo on it, since this will ruin light diffusion. Ping pong balls have a ridge where the two halves are joined in manufacture, avoid cutting through this ridge since it will create an uneven joint that will prevent the balls from being re-assembled. I don't have exact measurements, but on my model the diameter of the circle at the interface of the two sections is 1.365"
  2. Prepare the larger section first, as described above. With a razor, cut a crude circular hole in the ping pong ball, perhaps circumscribing the logo if one is present. Slowly and carefully expand this hold by cutting around its circumference with a pair of fine scissors. Stop approximately 2mm from the final desired hole. At this time lightly sand the hemisphere on a flat piece of medium to fine sandpaper to create a fine, flat interface.
  3. From a new ping pong ball, prepare the smaller section. Cut the ball crudely in half using a razor, then carefully trim one half down to the intended size of the smaller section, plus 3mm.
  4. The smaller section should rest in the larger cup, and be large enough not to fall inside. Do not glue the sections together yet.
  5. Using a pin, create evenly 0.1" spaced holes for the male header in the larger section as shown. You may want to practice on a spare bit of plastic first. Insert the short end of the male header through these holes, and super-glue the header in place. Trim the LED leads so that the LED rests as shown, and bend down the last 2mm of leads to align with the inner header pins. If you do not have frosted housing for the LEDs, lightly sand the exterior of the LED with fine sandpaper. Clear housing creates light that is too focused for uniform diffusion in the eyepiece. Tin both the LED leads and the header pins in advance. Solder the LED onto the header from the inside; do not to melt the plastic. Super-glue the smaller piece into the large piece to make a finished eyepiece. Once the super-glue thoroughly hardens, you may want to finish the joint in the plastic with additional careful trimming and fine sanding ( don't sand through the joint )
  6. The final pair of eyepieces should be mirror images of each other, which is just a matter of correctly positioning the LED leads :

Construct ribbon cable connector:

EDIT : this is a terrible, tedious, way to build a cable. The correct way involves some sort of headers that are actually designed to clamp into ribbon cable, or using these little header connectors that use pins which clamp onto the wire (pins sold separately ?). I will post a writeup if I build a pair using better technique.


I found that it was important to have a separate cable that would disconnect from the goggles under force. This prevents the inevitable accidents from destroying the tediously constructed eyepieces, and modularity makes the whole thing easier to repair. This step is open to improvisation. Here is what I did :
  1. Tear a band of 8 lines from a section of ribbon cable. The cable should be as long as you would like the strap from the electronics to the goggles to be. I think 3-4' is fairly good.
  2. Cut the ribbon cable diagonally such that the spacing between the lines matched the 0.1" spacing of the 8 pin female connector
  3. Strip 2mm bare wire of each line
  4. Solder the line to the 8 pin female connector. Tinning the contacts in advance helps.
  5. Apply 1 minute epoxy to the contact, to provide both insulate and structural stability. Make sure there are no shorts between lines before you do this.
  • EDIT : Hot glue works better here, for a number of reasons. Hot glue remains flexible once cool, which allows for smooth transfer of strain on the cable without breaking the contact. Epoxy hardens, which results in an inflexible interface which slowly cuts and degrades the cable. Breaking of the cable, as well as squishing of the ping-pong balls, seem to be the two most common failure modes of this design. If anyone knows of any commercial connectors that would be better for this design, let me know.
  • Tear the line in two for ~1.5', creating a split from 8 lines to two ribbons of 4 lines. Prepare 4-pin female headers similarly to the 8 pin female header, in a symmetric fashion as pictured below. I used a clip that came with the swimming goggles' strap to stabilize the point where the cable splits in two.
  • The assemblage of this connector cable with the eyepieces should have the indicated pinout at the 8 pin female header :

  • Modify swimming goggles and complete physical interface assembly :

    1. Locate suitable swimming goggles. This is harder than it sounds. The only goggles I found suitable were the mid-sized silicone pair in a three pack of Dolfino goggles. The goggles must be of a correct size to snugly fit the eyepieces, and be able to deform to the circular shape of the eyepieces. The goggle must also be able to hold together with the lenses removed. Many goggles are bridged by an attachment to the lenses, rendering them unsuitable. Ideally, you would also be able to affix a strap to the goggles even with the lenses removed. Due to the limited availability of suitable goggles, this step may require improvisation.
    2. Remove the lenses. In the pair I used, the lenses were held in with a weak silicone glue. It was difficult to remove the lenses without damaging the goggles. Superglue proved effective at repairing large accidental tears in the silicone goggles
    3. Attempt to insert the eyepieces. If necessary, create an opening in the silicone to feed the male headers though. I used either a razor, or a hole-punch, depending on the thickness of the silicone. Insert the eyepieces.
    4. Create a head-strap. I used elastic ribbon, threaded through the hole used for the header pins, held in place by plastic loops, and super-glued back on to itself. One end was folded and kept free to adjust tension.
    5. Attach ribbon cable headers to the eyepieces, check that you have oriented the ribbon cable pinouts correctly.
    6. If the eyepieces are loose, optionally super-glue them in place to the goggles. Note that this will make repairs and maintenance more difficult.


    Component 2 : Driving Electronics

    Parts :
    • 1 Arduino pro-mini ( and FTDI breakout for programming ) (other options 1 2 3 4)
    • 1 6x1 right angle male header
    • 1 8x1 right angle male header
    • 2 12x1 straight male headers
    • 6 Resistors for the 6 LED channels as determined by your board voltage and LED datasheet (voltage, current) specifications. Use this handy LED resitor calculator. For 3v boards, a resistor may be un-necessary for the (green, blue) channels.
    • hookup wire
    • 1.5"x2.5" radioshack protoboard
    • Battery Pack
    • Power Switch
    • optional : LED displays, pushbuttons for a hardware user interface. I used a 16 segment display for some of my models, and a couple designs have pushbuttons to cycle through the various strobe light patches.


    Description

    There are probably a million and one ways to make 6 LEDs blink quickly in a controlled fasion. You can drive your LED goggles however you wish. I used an Arduino because the programming interface is easy to use. I also hope to figure out the serial interface to the arduino so I might write a control sketch in processing, for real time tweaking of the waveform patterns. My construction consisted of an arduino board, with the 6 pulse-width-modulation ( PWM ) output pins attached to the LED goggles. I also attached a 16 segment display and some push buttons to the design, but you can experiment with whatever features you wish.

    Tools : Soldering iron, Solder, Soldering accessories

    Assembly of an example control board :
    1. Since the arduino chip rests on raised headers, and the 16-segment LED display has ~1.5mm clearance, we can hide some of the circuitry underneath these components. Since this is a 3 volt board, I only needed 56ohm resistors for the red channels. Your LEDs and board may have different constraints. Also solder on the 6x1 right angle male header to the Arduino pro-mini serial FTDI interface ( I think thats what those 6 pins are called anyway ).
    2. We then solder in place the arduino chip and LED diplay. The LED display is set up for multiplexing, so the corresponding segments of each digit are connected, and the display is driven by alternately drawing both digits, controlled by switching on and off the common cathodes. Since I was short on pins, several display pins also double as input pins for the switches. Every so often, the sketch switches the display pins into read mode and polls the state of the buttons.
    3. I used a lot of tedious surface-mount style wires on the back to keep the design clean. It took some practice for me to get used to this type of soldering. Attaching the battery pack and power switch is not shown.


    Assemble All components :

    This is open ended, Experiment !. Prototype your design on a larger Arduino and breadboard. Tweak the driver code to your preferences. Make a more permanent device using your favorite prototyping technique ( Or design and order a custom PCB ! Please tell me if you do, I'd probably buy a couple! ).







    Component 3 : Code

    I've put some files up on Sourceforge

    Arduino sketch

    ( and here, another example adapted for the AtTiny13a)


    20090625

    Almost new content

    This is a different model that my adviser invented ( he does all the math ). it looks about the same as the old model.