All posts by urishx

NiTi Light (1/2)

This post is mostly a technical documentation of a project I have done a few years ago, and have never been documented before. The reason for doing a write-up now is so I can have a step back and see where I am today, compared to a few years ago. Also, it might be interesting to others. I hope my wife, which designed the lampshade, will someday do a write-up concerning her design decisions.

The post concerns the first project I did which involved an embedded microcontroller. As such, it was both my first foray into programming and electronics, since about seventh grade or so (about 20 years gap). It was also done in a rush, and quite a few compromises were done along the way – some because of necessity, some because of not knowing any better.

NiTi lightup

About three years ago, my wife was working on her graduation project for industrial design studies, while I was going thru the sixth semester of plastic engineering. Her concept for the project was of a smart material lamp shade, using material change to infuse the object with transformation. After a long process of design exploration and experimentation, eventually my wife settled on a Nickel-Titanium (NiTi) alloy called NiTinol, which is remarkable as a shape-memory alloy. This means it can be set to a certain shape, to which it can “come back” after being deformed, and that effect is achieved through heating the NiTi alloy.

After settling on a material to work around, my wife than decided to construct a lamp, which eventually turned out to be a mock vase with LED-lit flowers. She also decided to use NiTinol in the form of wires. Those decisions made heating the NiTi wires quite a simple engineering problem: if the wire’s diameter, length, and resistance is known, it could be heated through resistive heating.

The electrical side was done in a bit of a rush, since the submission date was only a week after my exams were over. We decided to begin experimenting with the samples of Nitinol wire Aya had already purchased beforehand. The wire we had on hand was 0.5 mm diameter, 70°C phase change temperature. Aya’s design vision called for approximately 20 cm length of wire, with flower-like lampshades covering an LED module, set vertically in a clear plastic tube imitating a vase. In order to determine the power needed to raise the temperature of the Nitinol wire, we first needed to gain some understanding on the material properties.

NiTi light CAD mockup

A quick look at Wikipedia and some MatWeb gave me enough data to calculate the energy required to raise the temperature of the length of Nitinol wire by 45°C (ΔT = [phase change T] – [room T, approximated as 25°C]).

d=0.05 cm; l= 20 cm; ρ = 6.45 g/cc; C = 0.32 J/(g * K);  ΔT = 45°C

Erequired = ρ * π (d^2 /4) * C * ΔT * l = 3.65 J = 3.65 W * sec

Now, since the LED modules that were available to us at the time required 12.6 V, and P=I*V, I calculated the required current to get the desired temperature change, which will happen during 3 seconds:

I =3.65 / (12.6 * 3) = 0.13 A

As I found out later, this is a very simplistic calculation, and even taking a 9X margin of error did not produce satisfying results (I chose a 3 A transformer, which still did not get the 3 wires hot enough when used together). The calculation is simplistic in three significant ways:

  1. This calculation does not take into account heat loss to the environment.
  2. The calculation does not take into account losses due to sub-par electrical connections (I will get to that in a bit).
  3. This calculation really should have been differential.

As it is, the calculation simply states that in an isolated environment a current of 130 mA is required to raise the temperature of the NiTi wire by 45°C, as it is seen by the viewer on the onset of the temperature gradient.

Since I did not know any better at the time, I decided we were good to go, and went ahead with figuring out what was needed electrically to control the heating. A friend got me his old Arduino diecimilla, Which is an older design of the Arduino development platform, and a predecessor to the most basic, standard offering of today’s Uno. The board is based on an ATmega168 microcontroller, runs on 5 V, and enough inputs and outputs for controlling the heating of three NiTi wires, light up some LEDs, and read the temperature of the wires for some measure of control. But, I guess I’m getting ahead of myself. Basically, I told my friend about the project, and he thought I might be able to pull off what my wife wanted from this board. I actually have never heard of Arduinos before approaching this project, and had limited experience in programming. I also had very little knowledge in electronics, mostly soldering kits and guitar parts.

Reading through some examples I figured I would need a N-channel MOSFET, connected to the Nitinol wire’s ground as sort of a “tap”, while the input will be connected straight to the 12.6 V bus. This way, I could control the current flowing through the wire using one of the Arduino pins. I also found that the correct topology for connecting the MOSFET to the Arduino would be to connect a diode between the gate and emitter. Since I wanted some level of control over the temperature change in the Nitinol wires, I decided to incorporate a LM35 temperature sensor, which could be read by the Arduino using the analog to digital converter (ADC).

I than went and got a few irf530 MOSFETs, some 1N4148 diodes, and complementary LM35’s from the local electronics shop. Since I had both limited knowledge and limited time on my hands, I got the parts that were available locally, for which I could get the guidance of the store owner. I then began testing heating one of the NiTi wires, using PWM to deliver current to the MOSFET gate. The Nitinol wire was pre-shaped to straighten as it’s “remembered” (austenite) state using the procedure provided by the vendor, Kellog’s Research Labs, and deformed by hand when in it’s malleable (martensite) state. I then used AC screw connections to connect the NiTi wire to short conductors, since the shape changing of the wire means it cannot be soldered securely. Essentially, heat – cool cycles means the soldered connection will be stressed regularly, and will eventually come apart.

MOSFET and diode on breadboard

As is visible from the shot I took of the process (above), the breadboard did not withstand the heat provided by this rudimentary circuit, and melted slightly around the MOSFET pins – though the experiment succeeded, and I decided to move forward.

This has been a long write-up, and I can see now I’m not even near the end I intended, so in my next post on the subject I will go on further into how I got the NiTi wires to heat up under a bang-bang control scheme, my Arduino stripboard shield, and what I think I should have done differently in retrospect.

What’s on my mind, 07.04.18 edition

I kind of let the blog thing fade. I’m not a fan of documenting, I’m always thinking that what I think today might sound awful tomorrow, and that who the hell am I to actually come up with ideas, and similar debilitating thoughts. So I usually just don’t document. But… I set up this blog in the hope of actually writing down some of my thoughts, and I haven’t really used it yet, so… Here goes:

  1. I have this vision of building an easy to assemble and program DIY MIDI controller. This is supposed to be a modular system for musicians, DJ’s, sound technicians, etc., who don’t want to learn electronics or (even basic) programming. It’s supposed to be based on the Arduino platform for ease of availability and because lots of people have already heard of it. It’s supposed to be made up of several boards which will connect straight to the Arduino (shields, in the Arduino jargon), each providing a set of functions such as multiple buttons, multiple potentiometers, etc., and the programming will be done using drag-and-drop blocks, at the moment based on Ardublocks. I’ve set up a page for that on the site, and submitted it to the 2018 Hackaday prize. I’ve also set up a short poll in order to get an idea of the end users of this thing, or indeed if there are any. If you got here because of this description, please fill out the short poll, it might help me tailor the design to what’s actually needed, not only what I wish I’ve had.
  2. I think of learning more in-depth C/C++ for embedded design, since I think this is quite a big part of how I see myself moving forward, creating and making a niche for myself. Arduino is all well and good for what it is, but it’s mostly for easy no-brainer solutions. It’s not optimized code, physical space, and price -wise, and it constrains me to a single microcontroller ecosystem. I was thinking of both Microcontrollers and the C Programming Language and then going through Prof. Bruce Land’s AVR microcontroller lectures 2012 on YouTube.
  3. As long as I’m on subject: I’ve been looking at the “Maker to Market” videos from Adafruit / Ladyada. As I’m trying to design my own Arduino shields ecosystem, and electronics is not really my area of expertise, it’s a real eye-opener.
  4. I also need to get some basic Java understanding, for the Ardublock design. I still haven’t even searched for an appropriate introduction. Though I might just skip it, and go with just following the basic tutorials at the Ardublocks blog.
  5. On the topic of the Hackaday prize, I think of putting up something I’m more familiar with for the design stage. I have this idea for a research project which will be a continuation of the engineering project I did for my final year in college. The topic of my graduation project was the use of cellulose extracted from wheat straw as filler in polypropylene matrix. You can read the article if you’re creative about how to obtain your copy. The gist of my follow through is this: in the process of extracting the cellulose from the straw we got rid of hemicellulose and lignin, which both act as binding agents in the plant material. I think I can maybe reconstitute some of the lignin (which is more homogonous than hemicellulose) and use it as a natural binding agent for plant based composites, such as plywood. Going further with that, I think it would be very interesting to design materials for guitar top plates using discarded veneer cut-offs and some other plant-based honeycomb, for example craft paper or corrugated cardboard, bonded with another biodegradable material which is already a byproduct of waste products (our research showed most wheat straw was regarded as waste).
  6. Needing to vent some of my frustration and my creative side while working on engineering and design problems, I came up with an idea for a comics. Since I don’t know how to draw, I decided to do most of the work in Blender, which is a FOSS 3D animation program.
  7. I’ve also wanted for some time now to learn python, and since Blender has a python scripting engine, I think I’ll take Blender: Python Scripting on I’ll probably have to take some foundation course as well. The Blender: Python Scripting course suggests some course that’s already changed name or even content, so I’m still looking.
  8. Having gone through all these things – designing electronics, STEAM, the Maker to Market videos, puppeteering on Blender, python scripting – I thought of making a marionette controller for blender. I found some examples, namely what’s down at the end of this page, which make it seem feasible. It sort of goes as an expansion of the Arduino MIDI controllers, using OSC instead of MIDI, and using two accelerometers to get pitch, yaw, tilt, and (I suppose) direction – though that can be had with a magnetometer. Might be a cool little gadget I think.

OK, that’s it for now. Till next time I have a bunch of ideas needing to be written.

Engineering for the love of music – what’s that all about?

When I was about 13 I became fascinated with the design of electric guitars. My mother who is a librarian took me with her to a warehouse of a company that imported magazines from around the world to Israel. She took me there to look at comics, but I found there fascinating magazines on all kinds of subjects. There were firearms magazines, sewing magazines, magazines for car and motorcycle enthusiasts, and many other topics. The best magazines I found (and my mother bought me) were the fringe and wacky comics and musical instruments magazines. I love comics, but when I found the Guitar Shop and Vintage Guitar magazines, that was it. I was utterly fascinated by the sheer number of ways for connecting guitar effects for getting new and different sounds out of a single instrument. I was truly baffled by how many different people tried to innovate, and how what they did was unique, yet still maintained a link to the sounds of popular music. I really, really, wanted to make my own electric guitar. Continue reading Engineering for the love of music – what’s that all about?