About

An engaging ios app controlled lantern, actuated with shape memory alloy, with proximity sensing and lights.

Shape memory alloy is an alloy that "remembers" its shape when heated or a specific current is run through it. It also has a lot of force compared to its size. When actuated, the wire has a soft pleasant motion. This project was an exploration of how to use shape memory alloy and how to incorporate it into something visually appealling.

Explore the rest of the website to see our learning and process!

Systems

Our lantern was a combination of three subsystems - electrical, mechanical, and software. The electrical circuitry connects to an Arduino and breadboard. With the help of an external power source, current runs through the SMA and turns on the LEDs. We designed a web app that sends commands to the lantern through communication with a Raspberry Pi that send commands to an Arduino for different modes of actuation. For a more detailed description of each subsystem check out the links below.

Mechanical

We started working with wire and straws to mimic a geodesic structure but soon realized the wire and straws would require too much force to be moved by the thin SMA (0.005in) at the large lantern size we desired. SMA typically gives 5% displacement, so we started with moving small strips of paper, making a flower with four petals, housed in a laser cut box. As we moved onto thicker wire (0.012in) and coiling it, more force and displacement was provided to move to a full sized paper lantern. There were a few design constraints when making the lantern; one being that it had to be collapsable, another being that it had to be light enough to be actuated by the SMA, it also had to have the infrastructure to house the lighting and distance sensor, and lastly that it had to be able to let light shine through it.

After working with the SMA for a while, we realized that in order to stretch the coils back out from their actuated position, we needed to utilize gravity in our design. Thus we came up with a way to hang the lantern. We designed a small laser cut box just small enough to contain the wiring, arduino, and breadboard. Seeing as our initial idea was to have the lantern hang from the ceiling, we created a laser cut box that could both hide the wires and hang from an object.

Since we pivoted our project from having multiple lanterns to focusing on one lantern, we decided to redesign the structure from which the lantern hangs in order to give it more functionality and visual appeal. This included deciding on hanging the lantern from a base rather than from a ceiling. The base is made from a bent and welded, hollow steel tube attached to a steel base which is attached to a wooden box. The wires attached to the lantern are threaded through the tube and down through the base into the wooden box where the breadboard and arduino live. The external power source leaves through a hole in the side of the box. We also added a top and bottom to the lantern, made from laser cut MDF, to give it a more polished look and to add weight to help with the de-actuation of the SMA.

In order to make the final product look finished, a cap was laser cut out of MDF to fit over the end of the metal tube. This along with the lantern top and bottom and the wooden bases were painted black. We used a metal chain to attach the lantern to the lamp, which was for structural integrity and visual appeal. It runs from the lantern through the metal tube, into the base.

The final product is a fun and pleasing mix of a modern industrial style design and the calm almost whimsical feel of the paper lantern.

Electrical

Because our project is a standalone product, it required an external power source. Shape memory alloy actuates when heat is applied, in our project this comes from joule heating. This requires non-trivial amounts of current, in our final iteration about one amp. We also had to power an arduino, some LEDs and several other peripheral components. The shape memory alloy draws an order of magnitude more current than any of these, so we used it’s requirements to define the specifications of our power supply. We therefore chose a two amp, five volt supply. The length of shape memory alloy we used has an impedance of about 4.5Ω, so a five volt source supplies the correct amount of current without any additional circuitry. This allowed us to easily power our arduino using the same supply.

The lantern needs to actuate, and light up in response to a signal from an infrared distance sensor attached to the arduino. The arduino itself is sufficient to power the sensor, and it is connected directly to it. We use an N-type MOSFET to switch the LEDs’ low side. It’s gate is driven by one of the digital outputs of the arduino. It’s source is connected to ground, and several pairs of LEDs and resistors are connected in parallel from five volts to the transistor’s drain. The five volt rail we use for the LEDs and shape memory alloy is broken out directly from our supply to allow us to draw more current than the arduino can support.

We had initially used a power MOSFET to switch current across the shape memory alloy. However, it’s resistance when activated was of the same order of magnitude as the shape memory alloy, significantly reducing the amount of current we were able to run through it, and correspondingly the amount of actuation we were able to achieve. To remedy this we replaced the MOSFET switching the actuator with a Keyes SR1y relay module. The relay is used identically to the transistor, but when activated it presents almost no resistance. It’s signal, as well as the one controlling the LEDs, is generated in software on the arduino based on the analog reading of the distance sensor’s output.

Software

To provide the user of the lantern with an easy and flexible experience, the main interface is a tablet app with options to control the lighting and movement of the lantern. The software stack behind this interface consists of three layers: the microcontroller firmware running on the Arduino, a node.js web server that relays commands to the Arduino, and the iOS app itself.

Arduino

The Arduino interacts with the electrical circuitry via two pins: one for the SMA wire, one for the LEDs (using PWM to vary brightness) and one to read from the distance sensor. The system keeps track of the respective program states of the lights and wire, polls for commands over the serial interface, and updates the electrical pins accordingly. To use the serial interface most efficiently, we encoded commands into just 5 bits: 2 for the motion state, 2 for the light state, and one as a flag to indicate a request for the current status.

Web Server

We use a lightweight Node/Express server to relay HTTP requests as commands over a serial port to the Arduino. The server takes care of validating the input, provided as a JSON payload, and converting it to the corresponding bitfield before sending it to the microcontroller. The server runs on a Raspberry Pi, so all the computing hardware is housed in the lantern enclosure.

Tablet App

The iOS app sends commands via HTTP over WiFi to the web server. The modes available to the user are on, off, or pulsating, which can be applied to the lantern motion, the LEDs, or both. The light can also be configured to mirror whatever command is sent to the lantern, and the whole system can be configured to respond to sensory input (it remains on as long as it detects something within range of the distance sensor).

Libraries

Source Code

The Arduino code and Node server can be found here: https://github.com/sammyers/poe-controller-server

The source for the iOS app can be found here: https://github.com/sammyers/PoE-UI-Prototype

Process

Sprint 1

During this sprint our goal was to obtain shape memory alloy, research it and see if it was a viable way to actuate motion in an engaging project. We quickly learned that SMA is not a common resource, but luckily, one of our professors, Brad Minch, had some extra wire that we were able to experiment with.

Since none of us had experience working with SMA the first step was learning what needed to be done to actuate it. We learned that SMA comes in all sorts of different diameters, and each diameter has a different resistance per inch of wire and also a different amount of force. The thicker the wire the more current it requires as well as the longer it takes to actuate it. Thinner wire has less force but is able to actuate faster and expand faster because it cools faster. No matter the size of the diameter each wire requires more current than the arduino can provide.

After this circuit worked, we used some thicker SMA and attached it to some paper and were excited to learn that it could actuate the paper. Checkout the video below:

We came to the conclusion that SMA was a viable and interesting material to use to actuate our lantern or sculpture.We also made some lantern prototypes that could potentially be integrated with the wire in the next sprint. So we placed an express order for two different sizes of SMA to actually start creating our project.

During this sprint, the software subteam worked on developing a skeleton UI for the iPad app, which involved getting familiar with Swift and researching HTTP libraries.

Sprint 2

Our goals during this sprint were to get more wires actuated in the same circuit and try to get more actuation on a structure more significant than a slip of paper. The first step was to attach the wire from the first sprint to one of the lantern prototypes we made during the past sprint. Simply attaching the wire to the top and bottom of the lantern provided no actuation.

Next, with some research into other people's projects with SMA we discovered a technique where people would "sew" the wire into the paper. With this technique we were able to get a small scrap of paper to move but again, when we sewed the wire into the lantern there was no actuation. Below are two of the methods of sewing that we tried.

figure

Another method we tried was sewing the wire to paper using thread, however, when the wire is actuated it is hot, so it burned the thread. At this point we realized that most likely the sewing technique was not going to work.

Since we still wanted to see if we could get multiple SMA wires working in parallel, we pivoted away from the lantern and focused on getting some wires to actuate paper together. One of the breakthroughs we made during the process of actuating multiple wires at the same time, is that contrary to some of the documentation we had read online, it is possible to solder a piece of SMA to copper tape and then solder another wire to the copper tape to make an electrical connection. The reason we made this breakthrough is because we ran out of jewelry clamps that we were using previously to crimp the SMA to other pieces of wire. Below is a video of our final deliverable for Sprint 2. The actuation is done by attaching the wire to the box and the top of the paper. We were also able to integrate the web app with the SMA so it was actuated when pressing the button on the interface.

One of the challenges in this sprint was testing the data pipeline within the software stack, particularly in serial communication between the Arduino and the web server. Because the server itself is tied to the serial port, generating debug output without passing it directly to the server is impossible, removing the easy crutch of "print statement debugging".

Sprint 3

During this sprint, we wanted to see if making a coil out of the SMA would bring more actuation. Also, we wanted to incorporate lights and sensing into our circuit so that we could have our MVP.

If SMA is heated enough in a certain shape, then when it cools down it will stay in whatever shape is natural but will return to the overly heated shape when slightly heated again (or the correct current runs through it). This concept allowed us to make a coil out of the wire. The process to do this involved wrapping a .012" SMA wire around a screw and then heating it with a lighter. When the wire cooled down we stretched it out but when we ran current through it it went back to being a coil. The motion of going to a coil provided a lot of actuation as you can see in the following videos:

Even though there was significant actuation in these examples, when integrating the coiled wire with the lantern and circuit, there was significantly less actuation. We theorized that this was caused by the transistor not being as good at transmitting current and the fact that the wire deforms a bit each time it heats up. However, we were satisfied to see some movement of the lanter due to a hand wave in front of the IR sensor. Unfortunately, in this sprint, even though we got one light integrated in the circuit, the larger grouping of lights that we made needed more power that we were unable to get from the Arduino. Here are videos of our final deliverable for sprint 3:

One of the major software challenges during this sprint was dealing with timing of two-way serial communication. We wanted the Arduino to be able to respond to commands or report the status, but the node-serialport library doesn't have a synchronous way of listening for data over the serial connection after sending data. Rather, it fires events asynchronously upon receiving data, which have no explicit link to the context of the original message. We solved this by implementing a callback queue for serial port responses. Upon sending a message from the server (as part of an HTTP request), a callback with the enclosing context of the request is pushed into the queue. When the next data event is fired, the callback is removed from the front of the queue and invoked with the incoming data as an argument. This allows for an HTTP response to be synchronously returned to the client.

Sprint 4

During our last sprint, our goals were to work on increased actuation of the lantern and aesthetics.

In the last sprint, we hypothesized that the lack of actuation was due to the use of a transistor. We had this hypothesis because the wire would have significantly stronger actuation when directly connected to power than when regulated by a transistor. To combat this, we changed our switch mechanism for the SMA to a relay. After this change the SMA had just as much actuation when attached directly to power as when it was attached to the circuit. The increased actuation of the wire made the actuation of the lantern much more perceptible. Another aspect that helped with getting consistently good actuation from the SMA was that we finally stopped using a desktop power source (that was kind of broken) to getting power from a wall socket. The consistency of the 5V from the wall socket made it so that the SMA would not overheat and deform from its coil shape.

Taking the feedback from sprint three, we decided that the system would be more visually compelling if the lantern were hanging from part of our system. Therefore we moved to a design that was a bit more reminiscent of a lamp combined with a lantern. This involved bending a metal tube into a lamp base shape.

The tube was then welded to a metal base, which was put on top of a wooden box which housed all the circuitry. A wooden base and lid were also made for the lantern.

In this sprint, we introduced a lantern design that we prototyped during the first sprint. This design also contributed to the increased visual appeal when the lantern actuated because it causes the lantern to rotate.

Significant challenges were encountered attaching the lantern to its base/lid. Simply gluing the lantern to them did not look very nice, so we designed a new base and lid with slits and cut small slits in the lantern as well. Then we glued the paper lantern into the wooden housing. This proved to be both strong and better looking than the original method.

This sprint also saw the software controller switch from a plain ASCII encoding of commands representing a single on/off state to a more flexible and compact bitfield format. This actually made it easier and more predictable to test the serial communication, since every exchange consisted of exactly one byte.

Checkout the videos of our final lantern working with sensing and the app!

Budget

Item Notes Price
Muscle Wire 10 .005" diameter pieces, 10 .012" pieces and shipping from SparkFun $43.64
IR Sensor Obtained from class, price is an estimate. $30
Arduino Already owned. $20
Raspberry Pi Already owned. $35
Bread Board Already owned. $6
Paper Obtained for free, price is an estimate. $10
MDF Obtained for free, price is an estimate. $10
Plywood Obtained for free, price is an estimate $15
Metal For final sculpture $26.24
Miscellaneous Aesthetics Supplies Fasteners, chain, spray paint, washers $13.02
Final Budget includes actual money spent and estimated prices $198.90

Team

Nina Tchirkova

I am a sophomore at Olin College studying Engineering with Computing. I like to be outside, be active and do improv. My goals were to learn about shape memory alloy, systems integration and teaming. Throughout this project, I learned a lot about how to test and design circuits. Specifically I learned how to use a table top powersource, transistors.

Ezra Varady

I am a student studying electrical engineering. My goals were to build a piece of art, and learn about shape memory alloy. Shape memory alloy is a really exciting material. I find the similarity to biological motions exhibited by its actuation really beautiful. I wanted to make a sculpture using it that I personally appreciated, as a compliment to the more technical work I do in my other classes.

Aurora Bunten

I am a sophomore studying Mechanical Engineering at Olin College. My goals were to create a beautiful yet functional sculpture. I wanted to learn about shape memory alloy and to get better at fabrication and design. I especially enjoyed how I got to improve my welding and working with metal skills.

Rachel Hwang

I am a junior at Wellesley College studying Physics. Throughout this project, I wanted to learn about shape memory alloy and use it to better understand electrostatics and magnetism. I also wanted to improve in design and fabrication while integrating systems.

Sam Myers

I'm a junior studing software engineering and computer science. I brought experience building software interfaces to the project, and my main goals were to work on integrating a deep software stack and improve my skills at mobile development. This project was an excellent opportunity to work on something physically aesthetic, which was a new and interesting challenge.