Close
0%
0%

Resin-in-resin

Resin-in-resin is a Raspberry Pi with a display completely encased in a block of clear epoxy, but still able to be updated and used.

Similar projects worth following
This is a completely usable Raspberry Pi 3 with a 320x240 display encased completely in epoxy resin.

It has a Qi wireless (induction) charging coil and battery to keep working while you hold it and a magnetic switch to turn it off for charging (or when you just don't want it shining in your room).

The whole thing is deployed and managed by resin.io, meaning that the software can be updated or changed and you can interact with the device remotely as long as it's connected to a WiFi access point. (WiFi only as the Ethernet port is filled with epoxy!)

The full cost is a bit less than $200 USD (but could be substantially lower if you have components already, especially old USB cables or Qi charging hardware).

(At some point I really need to pair a Bluetooth mouse and keyboard with this...)

See notes in project logs about battery expansion and do your own research before building if you include a battery!
  • 1 × Raspberry Pi 3 Small ARM-based Linux computer
  • 1 × Adafruit PiTFT display 320x240 color display
  • 1 × Adafruit PowerBoost 1000 Charging/power distribution and battery control circuit
  • 1 × Magnetic contact switch Simple magnetic reed switch (usually used for window and door switches)
  • 1 × Lithium polymer battery 2500 mAh battery

View all 11 components

  • Battery expansion

    Ronald McCollam06/09/2017 at 18:29 0 comments

    Some people have brought up very valid concerns about battery expansion in this project. I'm working with some ideas on how to easily add an external battery rather than keeping it inside the block of epoxy, so I'd suggest doing something similar if you want to build a project like this yourself.

    The epoxy is about an order of magnitude more thermally conductive than air (meaning heat dissipation is not really a problem -- the unit will stay cooler than it would outside of the epoxy due to the greater surface area of the block) but there could still be some potential outgassing issues. So if you build this, do your own research and thinking about the battery.

  • Mass Production

    Ronald McCollam05/16/2017 at 21:13 0 comments

    My colleague Sonya agreed to pitch in and help make a few more of these! We headed over to the Cambridge Hackspace and got to work.

    She was thrilled to mix epoxy.

    After getting the base layer of epoxy down, we got to work on wiring, which actually is more fun.

    Cutting up a perfectly good USB cable never stops feeling weird though.

    We experimented with using a heat lamp to cure the epoxy as it was quite cool in the hackspace where we were working.

    Lessons learned:

    • Make 100% certain that the induction coil is lined up properly with the bottom of the mold. If it goes in at an angle it can be very difficult to get a charge.

  • Going wireless

    Ronald McCollam05/13/2017 at 21:51 4 comments

    Now that I knew that I could cast a Raspberry Pi and display in epoxy and have it still work afterward, my colleagues and I started brainstorming about how to improve it. We knew we wanted to get rid of the one remaining cable, but we weren't sure what the best way would be.

    We talked about a few ideas: inductive charging, leaving flat metal pads flush with the epoxy, or maybe a pair of pins or small sockets. We decided to try inductive charging first as it was the only truly wireless/contactless solution.

    I had a few Qi charging pads lying around from phones with this capability, so I got a Qi receiver coil (and a handy power regulator and battery charging circuit from Adafruit). I threw a battery in as well because if you're going wireless, you might as well make something you can pick up and hold while it's working.

    I fumbled around a lot while testing out that circuit -- trying to keep a multimeter lined up with it while keeping the coil lined up with the charging pad was a huge pain! It finally occurred to me that I could just tape the coil to the charging pad while I was working on it and things went much more smoothly from then on.

    My intended design was to have a micro USB cable in the power input of the Pi, strip the ends of that and solder them directly to the power regulator, and plug the battery in to give it portability. So I started by verifying that that setup worked.

    I had to strip the inner wires of the USB cable with a small knife as my wire strippers wouldn't go that small. (Somehow cutting up a USB cable felt... wrong. It wasn't that tough to do physically but it was emotionally difficult!)

    Everything worked just as I had expected. But there was one more thing I needed to try: starting up from a completely dead battery. Without any external way to disable the Pi, it would have to run until the battery died every time it was charged.

    This turned out to be bad news. The Pi would power up when put on the Qi charger, but the 500mA that it provided wasn't quite enough to boot up with the display attached. It would start booting, get partway there, and then die (right about the time it tried to initialize the WiFi, I think.) After watching it struggle for 10 minutes and not make it all the way on, I realized I would have to include a power switch so that the battery could charge for a few minutes before turning on the Pi. (Handily, the functionality to turn off the device pulling power but still allow the battery to charge is already provided by the charging circuit I had.)

    This was disappointing because I wanted to have this thing completely sealed, but a single switch flush with the outside wouldn't be the end of the world.

    I got everything laid out and hot glued in place so it would stay that way while I put it in epoxy, but it was getting to be too late in the day to start casting it so I decided to wait for the morning. This turned out to be the best idea I'd had so far!

    I headed out to see a movie with a friend of mine and chewed on the problem on the walk there. I had a feeling that there must be something that would keep me from having to put a power switch on the outside. I thought about various circuits involving solar cells and flashlights, or photoresistors... but then I realized I had a magnetic reed switch sitting in a pile of parts at home! As long as the magnetic field was strong enough to work through a centimeter or so of epoxy I'd be all set!

    The next morning I ripped out the switch and replaced it with a reed switch and started casting.

    This was way more elegant than the physical switch and would be easier to keep lined up in the epoxy to boot. I was thrilled when it worked!

    The only hiccup I ran into this time was that the epoxy loosened the hot glue enough that it didn't all stay in place while setting up. So I had slightly skewed components at the end. But that was okay with me, as I had a working, totally sealed Pi! It's hard to overstate how cool this was. :)

    The magnetic switch worked perfectly too, letting...

    Read more »

  • Casting a Pi

    Ronald McCollam05/12/2017 at 15:44 0 comments

    Now that I knew that my epoxy wouldn't dissolve an LED or catch on fire when I stuck wires in it, I felt confident enough to try it out with a Raspberry Pi. I found a cheap silicone mold on Amazon to use. You can find a lot of molds for jewelry, candles, and chocolates, but they tend to be too small for something like a Pi. I managed to find one for making bars of soap that was just about the right dimensions. I'd rather have had it another cm or so larger on each dimension, but it was big enough that the Pi would fit even if it were a bit tight.

    Casting worked a lot like the LED I did originally, though with me mixing the epoxy much slower this time. I started with a thin layer in the bottom of the mold which I let set for about 3.5-4 hours. Then I poured a tiny bit of epoxy in, gently set the Pi on top of it, and drizzled a ton all over the back. I made sure that I got epoxy into the USB and Ethernet ports so that there wouldn't be a huge air bubble there at the end.

    At this point I hadn't yet come up with the idea of making it totally wireless, so I just snaked a USB cable out of the back to provide power. It just extends out of the mold to stay out of the way here.

    After letting that set for another 4 hours, I got a last layer of epoxy ready to pour. On a whim I decided to throw a resin.io sticker in to make the back a bit more interesting.

    Then I let it set overnight. I made a small aluminum foil shield and set a radiant heater next to it as it was a bit cooler in my house than the epoxy instructions recommended. This seemed to work very well and caused the epoxy to set up a bit faster than I expected.

    The next morning I peeled back the mold and tested it out. Luckily it fired right up!

    There were a few small bubbles in the front (which weren't really able to escape from under the flat display) but the back was crystal clear. The bubbles at the front are something I'm still working on resolving; I might eventually try doing one of these face up, though the corners don't turn out quite as nicely on that face. But they look way worse in a photo than they do in reality, so I'm reasonably satisfied with it for now.

    Lessons learned:

    • Stirring the epoxy very slowly is definitely the way to go!
    • Gentle heat helps it cure a bit faster.
    • A hair dryer can help with larger bubbles but smaller ones are more finicky.
    • Plan 3D layering ahead of time! The sticker would have looked way cooler if I made an extra layer and had it "floating" a bit more.

  • Initial epoxy tests

    Ronald McCollam05/11/2017 at 13:40 0 comments

    After doing some research and ordering a bunch of epoxy, I wasn't 100% sure that what I had would work. It might have some interaction with the electronics, not bond properly, be conductive, shrink too much or put out too much heat... there were a lot of open questions.

    So rather than start with a full Raspberry Pi, I went with something a bit smaller and cheaper. I decided to embed a single WS2812 LED in a block of epoxy.

    I made a "mold" out of some clear packing tape in a rough square. I poured this in two parts: first a base layer, which I let mostly harden over the course of 4 hours or so, then put the LED and wires in and poured a layer on top. (You can see some of the tape "mold" in these pictures of it drying.)

    Doing this was useful beyond just for testing whether the epoxy would work for electronics. You can see that the blob of epoxy I ended up with is very frosty, not terribly clear at all. This is especially true of the first layer at the bottom. There's a clear line between the first and second layer because the first one is so bubbly and frosty. It's especially visible once I took the tape "mold" off later.

    I learned here that even though the epoxy instructions say to mix thoroughly for a long time, what they really mean is to mix for a long time but very slowly. I wasn't stirring particularly fast (maybe half the speed you'd stir something while cooking) but it still introduced a lot of bubbles. The key in the future would be to mix as slowly as I could to minimize those bubbles.

    Anyway, once it was hardened came the moment of truth: would the LED light up when I put power to it?

    It worked! Now I knew I was ready to try the real thing.

    Lessons learned from this stage:

    • The cheap table top epoxy I had works well for embedding electronics.
    • It's important to mix the epoxy very slowly to not introduce air bubbles.
    • Packing tape works as a mold but will deform somewhat as the epoxy sets up, so I'll need something a bit firmer for a nice product.

  • Idea and research

    Ronald McCollam05/10/2017 at 21:58 0 comments

    I've wanted to build something that makes a Raspberry Pi "inaccessible" for a long time. I work at resin.io where we make it possible to safely deploy and update code on embedded devices "in the field" where you might not have direct physical access to them. If you can't easily get to it if you mess up a deployment or update, then it becomes really important not to "brick" a device!

    It finally occurred to me that what could be more inaccessible and "embedded" than being actually embedded in clear epoxy? A rock hard brick of resin with a computer in the middle of it is about as inaccessible as you can get!

    I did a lot of research up front on different materials, trying to find what was clear and safe to use on electronics. Finding something truly clear was the first challenge until I found the magic phrase "water clear epoxy". Apparently it's "water clear" that means "really actually clear and not just kinda translucent" if you're in the materials business.

    Once there I started looking for materials that were safe to encase (or "pot") electronics. They existed but they were all very expensive and would cost me in the neighborhood of $150 or more to encase a single Raspberry Pi. On the other hand, there were plenty of materials intended for covering counter and table tops that would cost me $15-20. So I decided to start there and see what happened.

    The interesting bits I learned at this phase are:

    • There are a lot of types of resins and epoxies out there. Some of them shrink when they dry and some get extremely hot while they set up.
    • Fortunately, most of the cheapest epoxies are also the ones that don't put out much heat and don't shrink too badly. Epoxies intended for home use are best (and also don't put out a terrible odor).
    • "Water clear" is the magic phrase to find clear epoxy.
    • Clear epoxy is not electrically conductive but is a good conductor of heat, so it's great for electronics.

View all 6 project logs

  • 1
    Step 1

    Get the parts

    Grab the equipment needed. For simplicity I made a wishlist on Adafruit that contains all of the electronics. (I'm not associated with them in any way other than as a happy customer; feel free to get similar parts elsewhere if you have a preferred provider.)

    The only thing you'll need aside from the electronics is a mold and some resin. I got a square silicone soap mold from Amazon. The mold I linked to is just barely big enough for all the components to fit in snugly and leave a tiny amount of epoxy around the edges. If you use something else make sure you measure carefully to be sure it will fit!

    I also got the resin I used from Amazon, though you can likely get any similar epoxy from a craft store or home improvement store. Look for something intended to coat tables or counters. The 16 ounces (just shy of 500 mL) is enough to make one of these, but it's pretty close. If you haven't done this before, I recommend getting a bit more epoxy to experiment with first. (Or to make other cool projects after!) It's not expensive and you'll be much more likely to get a great result if you play around with some small, simple casting first.

  • 2
    Step 2

    Prepare

    Get a nice work area ready. You'll want plenty of space to assemble everything as well as paper towels and gloves -- epoxy is sticky!

    It's a step everyone wants to skip, but making sure you have everything laid out and ready to go will help you to not panic when you have epoxy curing and you're not sure if you're really doing this right or not.

  • 3
    Step 3

    Epoxy: Layer 1

    Mix and pour the first layer of epoxy. Follow the directions for your particular epoxy to mix it properly (mine is a simple 1:1 ratio).

    Do this slowly so you do not introduce bubbles. It's a good idea to do it in a clear container so you can tell when the epoxy turns from cloudy into clear. (Hint: wait until you can see something with fine text clearly through the epoxy, then stir for like another 3 minutes. You want this stuff to be really mixed.)

    When pouring, use just enough to make a thin layer in the bottom of the mold.

    (Creepy lighting is optional.)

View all 12 instructions

Enjoy this project?

Share

Discussions

rav wrote 05/16/2019 at 22:00 point

Thanks for posting this. Just curious - How was the WiFi performance once potted? I am planning to do the same, but am concerned as a lot of epoxy manufacturers don't mention it.

  Are you sure? yes | no

Tisham Dhar wrote 07/11/2017 at 10:56 point

Did you figure out switching ? May be a NC reed switch with a magnet to switch it off.

  Are you sure? yes | no

Dean Collins wrote 06/02/2017 at 14:27 point

This could one day be the oldest Raspberry pi out there - it could end up on some old guy's cane in Jurassic Pi ;0)  

It would have been a nice touch to use a vacuum pump to degas the resin, that would have stopped bubbles. Still an fantastic project though I love it. 

Maybe adding gesture controls would make a great showerproof media system.

  Are you sure? yes | no

Elliot Williams wrote 05/12/2017 at 11:34 point

Very timely.  I need to waterproof a toy for the bathtub, and was thinking "brick of epoxy".  Still haven't decided on how to charge the battery. Induction is probably the most obvious, though I'm also leaning toward just letting a couple of wires dangle and not sweating it.  Or maybe hot glue...

Have you tossed the Pi in water yet?  

  Are you sure? yes | no

Ronald McCollam wrote 05/12/2017 at 15:25 point

I haven't tried it in water yet, though that's definitely on the list of things to experiment with!  I'd love to have an underwater display sitting on my desk.  If I do that I can't decide if I want a screensaver of swimming fish or just a little desert scene :)

  Are you sure? yes | no

Dan Julio wrote 05/11/2017 at 16:50 point

Neat!  A bit of computing history preserved.  In 1980 a youthful version of myself encapsulated a 555-based 4 LED blinker in epoxy.  It's been running continuously since then.

I wonder what rechargeable battery technology would have the longest life.

  Are you sure? yes | no

K.C. Lee wrote 05/11/2017 at 15:12 point

Have to be careful that epoxy curing reaction is exothermic, so you have to make sure that the temperature does not damage the components.  e.g. Lithium battery doesn't burst into fire.  Might want to consider LiFePO4 chemistry battery as it has a much higher temperature tolerance.  Shrinkage might cause problems with LCD.

http://www.relionbattery.com/blog/3-essential-lifepo4-battery-features-that-promote-product-safety

  Are you sure? yes | no

Ronald McCollam wrote 05/12/2017 at 15:27 point

Yeah, that was definitely a concern -- the biggest worry I had was in damaging the battery and causing a fire.  I was careful to select an epoxy that is very low temperature.  I haven't measured the heat output of it during curing but it's low enough that I can't feel it even with my hand barely above the epoxy.  In fact, it won't cure at all if the ambient temperature is below 75F/24C so it might even be endothermic.  (More research would be a good idea!)

The battery I picked was mostly a matter of convenience as these were easily available and cheap.  I might experiment with others at some point in the future.

  Are you sure? yes | no

TheotherMike wrote 05/11/2017 at 08:54 point

"Battery, live Long and prosper!".

  Are you sure? yes | no

Ronald McCollam wrote 05/11/2017 at 13:27 point

Hah, for sure.  That's the part I'm most worried about.  We'll see how long it lasts!

  Are you sure? yes | no

TheotherMike wrote 05/12/2017 at 09:09 point

Two fingers crossed ! ;-)

I think you should definitely use a vacuum pump (a vacuum cleaner combined with a pressure cooker might work already: "Loop 5x{pump-wait-purge-wait}") to get rid of the bubbles in the awesome big block !

  Are you sure? yes | no

Ronald McCollam wrote 05/12/2017 at 15:29 point

I've thought about a vacuum pump for removing bubbles, but I'm leery of adding any more pressure to the screen.  I have damaged one already (which I'll write up in a log soon) I think through normal epoxy contraction, so making that any tighter might be a bad idea.  Still, getting rid of the bubbles would be nice...

  Are you sure? yes | no

Greg Stephens wrote 05/28/2017 at 01:21 point

If you'd like to limit the bubbles without using a vacuum pump.. I'd recommend using a static mixer to mix the epoxy rather than stirring it.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates