Wednesday, October 15, 2014

Insulated Temperature Controlled Chamber

For my crystal-growing I'd like to have better control over temperature so that I can cool solutions very slowly. I've been using a heavy ceramic dish and a hot water bath for this, but I want to try cooling rates of days or weeks. To achieve that I think I'm going to want heavy insulation, radiant barrier, and probably a small computer-controlled heater element.

As a start I'm using 2" pink foam with aluminum tape as radiant barrier on the inside surface:


The foam is rated R-10. I'll put a liter of hot water in this and log the rate of change to get an idea of how much it reduces heat loss over open air. That should give me an idea of how much power I'll need the microcontroller temperature controller to handle.

I'd like to be able to keep it as low as 0.1degC per hour while minimizing fluctuations, but at this point I don't have any idea how challenging that will be.

Update:

As described above I put a 1 liter beaker of hot tap water into the chamber and stuck a thermometer through the top down into the water. I recorded the temperature every 10 minutes for a couple of hours, then wandered off for a while and then came back and got a final reading: 


So I figure 1000L dropping 0.578C in 10 minutes is about 578 calories per 10 minutes, or 4.03 joules/second, 4 watts.

Room temp was 24C, and I was testing around 62C. The box surface is about 0.25 square meters, so that would be 4.03W/0.25sq.m, 16.1W/sq.m. R-value is ΔT/W/sq.m, so 38/16.1 = 2.36. The 2" pink foam spec is is R-10. Even with my shoddy construction I'd expect better than R-2.36.

Maybe that value is in RSI units. Wikipedia says the conversion from RSI to R-US is RSI * 5.68, so R-13.4. That sounds pretty reasonable considering the radiant barrier.

I might want to ramp the crystallization down to very cold temps, and it's a lot easier to just put the box in the freezer than it is to make a box that can cool itself, so the temp outside the box might be down at -20C. So, if I want to hold the box at 100C in a -20C environment, how much power do I need? Flipping the equation around and using the RSI value of 2.36: W/sq.m = ΔT/R, ΔT is 120C, so: 120C/2.36 = 50.9W/sq.m, or 12.7W for the 0.25 square meters of the box. Within my ability to measure that's linear scaling, which seems pretty reasonable from eye-balling the graph, which is also pretty linear over this narrow temperature range.

I'll give it some headroom and call the target 15W. On a 12V power supply I'll need to switch 1.25A. I've got a pile of IRF540N that'll be fine for that. My power supply is 12V at 3A, so my heating element needs to be between 4 and 10 ohms. Too low and I'll send the PSU into protection, too high and I can't get enough power out of it. That's probably another junk-box item.

Next up is electronics. I've got some old LM77 temp sensors laying around. They're not very accurate, but they'll be fine for a first iteration. 

Update:

Started prototyping the controller:


The chip is an LM75 I had laying around. It's only 9 bit with the LSB reporting 0.5C increments. That's fairly awful, but it's good enough to get started. I can swap in a better sensor later.

I dug up an old nichrome toaster element to see if it would work as a heater:


I connected it to the desktop supply (which seems to be running 15V open-circuit, I may need to get in there and see what's going on with the regulation), and it runs at 13.7V and 2.05A, for 28.1W. That'll be perfect, I just need to put a MOSFET on to drive it and I should be able to hold the chamber at any temperature I like.

The insulated board it is wrapped around is 5 inches across which is just right to fit inside the chamber. I think that if I leave it on the board I can put it on one side of the chamber so that convection will prevent any stratification. I'll probably use one of the other toaster elements which is wrapped with all the turns on one side. I can face it toward the wall to create a chimney while avoiding radiant heating of the solution, That could definitely disturb crystal formation. 

Sunday, October 5, 2014

Crystals

Recently I've been playing around with growing crystals. It was always a fun and easy thing to do when I was a kid, so I thought I'd try some that are more interesting than the usual salt, sugar, alum, epsom, etc.

This is recrystalized acetylsalicylic acid, asprin, from OTC tablets. 10g pulverized, washed with cold water, vacuum filtered, then dissolved in 250mL of 75C water and allowed to cool slowly. Crystals approximately 3-5 mm in length. I will chill this and allow crystal formation to finish, then wash the crystals and recrystallize at a slower rate.


This is benzocaine, extracted from Oragel tooth gel. 0.5g of gel stirred in 15mL cold water until dissolved. Benzoncaine will form white flakes. Centrifuge and draw off supernatant. Add 20mL water and heat in hot water bath. A bead of molten benzocaine will form. Add sufficient water to dissolve the bead. Allow to cool and crystallize. Vacuum filter and collect for recrystallization.


This is what I think is probably salicyclic acid. 1g of OTC tablets, pulverized, heated in 20mL water until dissolved. When cooled the entire 20mL formed one huge crystal block, which was amusing. Melted again, added 10mL water and heated until acetic acid formed. Cooling produced fine, hair-like crystals, which I suspect are salicyclic acid (more research to do). Washed and vacuum filtered, will recrystallize to see if more pure crystals look different.


Update:

After filtering and cleaning a bit more (there were still some components of the asprin tablets in the solution which affected crystalization), I got some recognizable salicylic acid crystals:



I was hoping to get some more acetylsalicylic acid crystals, but I accidentally hydrolyzed them. I'll have to give that try again later. For now I'm bored with salicylic acid, needle crystals are hard to photograph. I think I'll move on to something else.

Update:

I had a couple of 50mL beakers with more ASA and SA crystallizing by evaporation. One had mostly SA dissolved in a small amount of isopropanol, and the other was water. They've been sitting for about 5 days doing nothing, and apparently just reached the point where crystals could form. They went from nothing to quite a lot of crystals very quickly.

This one started out with what I think is SA making little needles at the bottom. I left it to evaporate and a few days later this big block formed overnight. I'm not sure if it's ASA or SA. The size suggests ASA, but I'm not sure how completely I hydrolyzed this solution, so I don't know how much of each compound is left. I'm going to let it keep evaporating and see what happens.


This one is the alcohol. It's evaporating faster than the water, and it wants to crawl up the sides a lot more, so it's probably not as likely to make crystals that are as nice. I will probably let this one go for a while until the alcohol is mostly gone and then rinse the crystals and redissolve them in alcohol and try again but with slower evaporation.



Monday, February 24, 2014

Macro Images of a Chip

A friend from the Omaha Maker Group gave me an interesting chip a while back. Apparently it is some kind of optically sensitive chip, it has a clear case.


I thought it would be interesting to take some macro photos of it and see if I could capture some of the details of the die. I started out with just some simple shots with the kit lens and extension tubes.


Easy enough to see, but lighting was difficult with the chip as close to the lens as it was. You can see the wires and a little detail of the chip, and the lighting in this one gives a nice shadow on the wires.

I then switched to my long telephoto lens, extension tubes. This let me move the chip back from the lens a few inches, which made getting light in much easier. It didn't produce an image that was any more magnified though.


The chip is about 2.5mm on the short dimension.

From here I added a 10X macro expander lens and also a 10 triplet hand-lens to see if I could get any closer. This was difficult because it's a separate lens and can't easily be mounted on-axis with the camera lens. With a little fiddling around it came out ok. I can see a lot of details, though it's starting to get fuzzy around the outside, only the middle is relatively free of aberration. 


Here's a crop from that image. 


In the original photo the 2.5mm chip is a bit over 1100 pixels across, giving about 2170 nanometers per pixel. The narrowest traces are about 4 pixels wide, about 0.0003 inches. I'm not sure what the aperture was set to, but this is probably not bad performance for a first attempt. I'll have to do some reading and set up my equipment a little more carefully and see if I can sharpen this up a little more.

Edit: with a little more fiddling I got it down to 580 nanometers per pixel. Pretty sure I can take it farther, but I need to set up something to handle adjusting the sample position for fine focus. It's pretty fiddly. Also need to get some bright light onto it so I can see it in the live view. My dim desk lamp doesn't really cast enough light for this.

Saturday, February 22, 2014

Photographic Depth of Field

I was curious why a large aperture on a lens reduces depth of field. To investigate this I set my camera up with a macro extension tube and a subject with lots of depth.


The subject is a potassium sodium tartrate (Rochelle salt) crystal mounted in a brass holder, with a copper contact wire for detecting the crystal's piezoelectric properties. From the perspective of the camera, this setup looks like this:


This image shows a very short field, as is typical with macro photos that are taken from very close to the lens. The focal plane is about 10 degrees off of perpendicular from the surface of the coins, and intersects the subject about where the copper wire wraps around the crystal.

To understand why some parts of the image created when the aperture is large are blurry, it's helpful to visualize the paths the light takes through the lens. I used this simulator to make a simple diagram:


From any given point on the subject on the left, light passes through every point on the lens and is focused onto the camera's sensor. If you imagine a tiny bug with an equally tiny camera walking around on the big lens and taking his own pictures of the subject, you would noticed that depending on where he was standing, his photos would each be slightly different, sometimes from a little higher or lower, or one side or the other. We can simulate the bug camera photos by taking a picture through a pinhole placed in front of the lens.



Because the tiny bug camera has a really tiny aperture, all his photos will have very large depth of field, they'll be sharp all over. My bug-simulator has a fairly large pinhole, you can see it near the top of the image, it's about 2mm wide, so I won't get as much depth of field, but you can definitely see that much more of the depth of the image is in focus, compare to the image above and note how in these both the rubber band near the back of the image and the reeds on the edge of the coin are sharp. Here the bug is walking from one side of the lens to the other:




It's hard to tell in the still images, but the perspective is different in each shot, the angles all change a bit as the bug walks across the lens. It's easier to see this if you user a bigger hole so that you get a full-frame image instead of the circular shot, but it's harder to see the increase in the depth of field. Here is another example with a slot to let in more light. Left side from the top of the lens, right side from the bottom. 



Since the tiny bug camera can only collect a tiny bit of light with each photo, all those slightly-different photos will be quite dark. If we stack them all up to increase the brightness, we get the image we would get from the regular-sized camera. It's a bright, but only the parts that were all the same in the individual images will still look sharp in the combined image. The parts that were all slightly different will be all mixed together, making them appear blurry. 

That's exactly what the big lens is doing, stacking together thousands of different perspectives of the view all taken at the same time. We could get deeper depth of field in the image by using a smaller aperture, but that makes the image darker. To compensate we can increase the light on the subject, leave the shutter open longer, or use a more sensitive sensor.

To really see this effect, it's best to see it in a video, so check this out:


Tuesday, January 15, 2013

Wattvision Meter Reader

Just a quick note about the Wattvision electric meter reader product. I haven't seen one in person, I was just reviewing the website, but this looks like about the simplest solution out there right now. I still like the idea of the RF approach, but visually inspecting the options on the meter is a good option too.

It's a little spendy at $250, but I suppose that's not too bad if it gives you the online tools and such as well. I think that a maker could easily hack together the same system with an Arduino and Wifi shield or Rasberry Pi and Wifi for under a hundred. And I think a couple of AVRs and a cheap RF serial link could do the job for about $30.

Wednesday, December 19, 2012

Underfloor Vacuum

 As a fun afternoon project I decided to try turning an old retired vacuum into an underfloor vacuum system. The idea is that when I'm dust mopping in the dining room and kitchen, rather than picking up with a dust pan, I can sweep it into a vacuum intake on the floor. This probably is not any easier than using a dust pan, but it's more fun :)

Also, I figured that rather than using the regular vacuum bag, I would experiment with using a vortex bucket to collect some of the trash, rather than filling up the disposable vacuum cleaner filter bags. I have no idea what it takes to make that work, but what the heck, I'll take a stab at it. I've been thinking a dust collection system might be a good project for the workshop, and if a swirly bucket like this works, it would be easier to dump than a shop vac.

I started with a Gamma Seal bucket lid. This is a fantastic product for anyone who reuses 5 gallon buckets. It's a ring that seals tightly onto the bucket better than a regular lid, but the entire center is threaded so it's easy to unscrew it to get to the contents. I figured I'd fix the lid to the ceiling, run the hoses in through the central part, and then when I need to remove the bucket part, I can just unscrew it and leave the lid and everything attached to the ceiling.

The inlet has to be tangent-ish to spin the air, with the outlet in the center, so that hopefully the heavier particles will fall to the bottom before the air exits and goes to the vacuum. I cut out a pathway through the lid for some PVC tubing.


However, I couldn't have the end of the pipe sticking up where it would run into the ceiling, or pinch the hose, so I used the table saw to make it more flexable:


I bent it to the right shape and fixed it in place with some aluminum duct-sealing tape. Most of the lid is held together with this tape. If it all works like it's supposed to I might epoxy it down at some point. Until then the tape will be fine.

To mount the lid I cut a 2x4 to go between the floor joists and drilled a hole for the outlet.


The Gamma lid ring goes on the bucket. Takes a hammer.Not looking forward to taking that thing off again.


The assembled lid with hoses goes on the ceiling. The inlet hose goes through a hole in the ceiling and comes out underneath the front of the dishwasher. For another project I'll make a sheetmetal collection hood with an inlet about half an inch tall and 10 inches wide this will poke out just under the kickplate at the base of the dishwasher.


Finally, the vacuum cleaner. I don't know if this is going to work, so I'm just hanging it with plumbers tape. That should avoid coupling too much noise to the floor.


Obviously I still need a way to turn on the vacuum, which is in the basement, when I'm sweeping in the kitchen. So, X10 appliance module to the rescue. I have a number of wireless X10 controllers that I can use to switch the vacuum from the kitchen. So far so good.

Sunday, December 16, 2012

Zen Toolworks 7x7 Home Switches and Sanguinololu

I've been spending some time upgrading the Zen Toolworks 7x7 mill. I glued in some home switches and wired everything up to to the  the Sanguinololu, and glued some split-loom onto the machine to route wires through. That all came out pretty nice. I mounted the board with some hook-and-loop on the back of the X axis, and placed the switches where the moving parts would contact them.

Here is the back of the machine, showing the Sanguinololu and wiring.



Here are the home switches, Z, X, and Y, respectively.




I was having some trouble getting software onto the Sanguinolol, it wasn't responding to the serial port. I loaded Triffids Teacup firmware on it using the Pololu AVR programmer, and it started sending the initial 'start' and 'ok' messages, but nothing after that. After fiddling with it a bit I hooked up the Bus Pirate in RS232 mode to check at the AVR pins to see whether the messages I was sending were making it through. They were not. Using the Bus Pirate to inject data directly at the AVR pin made it work as it should. This confirmed what I suspected, there was a bad connection between the AVR and the FTDI chip. I touched up the appropriate pins on the FTDI chip, and it started working normally.

So now it's time to start getting into software to convert designs into parts. In the past I used the DOS-based TurboCNC program to control my machine, and previously I was running this machine using it. However, I didn't want to be tied to an old computer with a parallel port, so I decided it was time to move to a USB-connected external board, which is where the Sanguinololu comes in.

I had the option to use a number of Sanguinololu-compatible firmware packages, and I've started with Teacup. I had Kliment's Sprinter on it previously, but I switched to Teacup when I couldn't get Sprinter working (because of the bad solder connection). Now that I've put the effort into configuring Teacup, I'm kind of hoping I don't have to try a different one. Unfortunately, Teacup doesn't support G2/3 arcs, which kind of sucks. I may switch back to Sprinter or something so I don't have to decompose all my arcs into line segments. This would work, but because the ramp acceleration mode does a full start and stop for each segment, it would be very slow. RepRap acceleration mode would get around this, but it's kind of a weird mode that requires the software generating the gcode work a little differently. I'd like to use Grbl, but I'm not sure if it is compatible with the Sanguinololu. I'll have to look into that a little closer.

One of the nice things about TurboCNC is that it has a fairly rich set of gcode commands that make it easy to run existing gcode files that include features like loops, printing messages to the screen while it waits for you to switch tools, tool offsets, fixtures, etc. Teacup doesn't have these, and I kind of like those features. 

So, to address this, I've taken the TurboCNC source code, which is normally compiled in Borland Turbo Pascal under DOS, and pulled it into Delphi7 and generally torn it into itty bitty bits. I removed all the UI code (which was based on a third party library that worked similarly to the TurboVision UI package), and eliminated all of the stepper code, and kept mostly the gcode handling routines. I replaced the calls to step-generation routines with calls that output basic gcode commands, which allows Teacup to handle the step generation. I've also added an OpenGL-based tool-path viewer, so it's easy to do a dry-run and see if it looks sane. The viewer will track what has been sent to the machine, but it doesn't yet watch for the block-completed messages, so it isn't very smart about knowing where in the list of queued commands Teacup is. This really only shows up when making long moves, but it would be nice if I could make it more precise.

At this point it will handle some gcode features that Teacup will not (loops, gotos, etc), and does not decompose arcs into line segments (I'll have to add that as a feature for completeness, as much as I'd prefer to have it in hardware), and showing messages while waiting for the user, but it's still missing some of the more advanced features that I want it to have. In particular I'd like to get it working with a touch probe. 

Here's how it looks after running a simple sample file:


For testing purposes I just have it output the generated gcode to a text file that I feed to the machine with a debug terminal. And, since I don't want to get it mounted with a cutting tool yet, I figured I'd make a little ballpoint pen attachment that fits in my Dremel Flextool holder:




While I was looking around on the web for something I ran across the TkkrLab wiki, where they are building pretty much the same setup as I've got here. In fact, I was surprised to see a link at the bottom of the page back to my flexshaft mount blog post :) It looks like they've run into the same problem with Teacup not supporting arcs. I'll have to keep an eye on their progress and see if one of the other options works for them.

Anyway, here's the mill running the sample file:

If you compare to the tool path preview in the screenshot above you can see where it skips the G2/3 arcs. Other than that it's working fairly well. At this point I probably need to spend some more time working on my Windows derivative to TurboCNC, and maybe see what I can do about evaluating other firmwares with arc support.