A Quick Cheap DIY Soldering Fume Extractor.

working

I often do a lot of soldering in enclosed spaced. I’ve known for a while that the fumes aren’t exactly good for you, so today I decided to do something about it. Here I’ll share instructions on how to make a quick and easy fume extractor from parts you may already have around the house (except the filter).

Materials

Below is a photo of the materials I used.

IMG_20140202_221539

  • 12 v powersupply rescued rescued from something I threw out long ago.
  • 5 1/2″ x 4 3/4″ piece of plywood from my scrap box (card board or foam core will work equally well)
  • 120 mm fan taken from an old computer
  • an HRF-H1 sized HEPA air filter (Its important to get a true HEPA filter to get the most smoke removal).
  • 6 rubber bands from grocery store produce.

Instructions

Conveniently,  the HRF-H1 air filters are almost exactly 120mm wide so they can be directly fit to the computer fan.  A lot of similar DIY instructions on the web have you laser cutting a rack or holder, which is nice but I don’t own a laser cutter, do you?

To start, rubber-band the fan to the filter with the flow facing into the filter (usually the air flow comes out the side of the fan with the logo sticker on it).

IMG_20140202_222306

 

You’ll notice that there is still a large gap between the top of the fan and the rest of the filter.  To remedy that cover the rest of the filter’s face with a sheet of plywood or cardboard.

IMG_20140202_222405

 

Finally you can solder you power supply leads to the fan.  In my case the fan had a male and female molex connector attached so I cut off the male connector and soldered to my power supply.   This way the power supply unplugs and the fan can be reused should I decide I need it.

 

 

node.js v0.10 broke my udp multicast listener

I recently updated from node 0.8.xx to 0.10.xx and found out that the following code will create an exception.

dgram.js:381
 throw new errnoException(process._errno, 'addMembership');
 ^
Error: addMembership EBADF

After some searching I found this issue, which shows that they changed bind(port,[addr]) to be asynchronous.   The solution is to change

udpsock.bind(port);
udpsock.addMembership(mcastAddr);

to

udpsock.bind(port,null,function(){
  udpsock.addMembership(mcastAddr);
});

I hope this helps someone else.

JST Battery Connectors

I’ve been playing with lithium polymer (LiPo) battery powered projects lately (more to come about that) but I’ve been frustrated trying to decode all the “standard” connectors people use for these.  Of particular annoyance are the JST connectors, which may refer to many different connectors.

At first I thought there was only one JST connector but it turns out that JST stands for Japan Solderless Terminal and they make a ton of connectors.  It seems to me that the two pin JST connector people usually talk about is the red one.  For the life of me I still can’t figure out what this one is officially called but it is sometimes referred to as the BEC, so named because it is often used in Battery Elimination Circuits (I’m guessing).

A “JST” connector

Like I said there are a lot more JST connectors though and probably the most common is the JST-XH, which is used my many multicell battery makers as a balance connector.  I found a great forum post talking about yet two more JST connectors and one Molex connector.  In case something happens I saved the important photo:

several JST and one Molex connectors

Lastly, there is one more JST connector.  The JST-PH, which is what sparkfun uses for all their 1S LiPos.

A through hole mount JST-PH receptacle

For higher current there is a well documented array of connectors out there for which this is a good reference.

AVR Studio 6.0

Edit (8/9/2014): I’ve added links to atmel studio version 6.2

UPDATE (10/23/2013): The newest installer as of  is here: AVR studio v6.1 build 2730

One thing I really hate is when you have to go through a registration process just to get “free” software.  As it turns out, Atmel doesn’t change its download locations.  So as of today here’s the latest version of avr studio 6.0:

 

main installer:

http://www.atmel.com/Images/as6installer-6.0.1843.exe

http://www.atmel.com/images/AStudio6_2_1153.exe (w/o .net)

current patch:

http://www.atmel.com/Images/as6installer-patch-6.0.1882.exe

 

Fixing the up! 3d printer

A few weeks ago our UP! pp3dp (personal portable 3D printer) broke.  It would usually print one object while cold but fail on the first couple of layers of the second consecutive object.  Eventually it started making a bad smell so I opened it up to see this.

Two melted jumpers

Two of the jumpers that shunt power from a power trace to — another power trace (all in series) had melted.  These jumpers seem to have no purpose but to fail since they could have easily been replaced by a solid trace; I still have no idea why they’re the way they are but the x-object rep called them “fuses” which is unsettling.  I should note though that x-object’s support was excellent and they provided me with a photo of the original board without melted components to help me trouble shoot.

The original board in good shape. (photo: x-object support)

Apparently, we have one of the earlier models of the UP! printer (V8 or V9 I’m told) which means that the mainboard is no longer available as a replacement part.  Because of this repair was my only option.  I followed the trace from its origin, the power connector, to its destination (past the jumpers) and soldered on a piece of 22awg wire to replace the burned trace.

The red wire bypasses the two jumpers.

I then cleaned up the burned jumper, which was not so easy.

Melted jumpers removed

Finally, I added two new jumpers in place of the melted ones just incase they connected a trace that I couldn’t see through the burned and melted plastic.

New jumpers installed

After reinstalling the board everything works great again.  The area around the two melted jumpers still gets warm, but to no hotter than 40-50C, so I think it should be fixed for good.

Raspberry Pi i2c/spi setup

UPDATE-UPDATE: The standard raspbian distro now comes with full support out of the box.

UPDATE: adafruit now has an rpi distribution that is up-to-date and prebuilt with spi and i2c working.  you can get it here: http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/

 

I just got my Raspberry Pi last week and it took me an evening to get the SPI and I2C working (thanks to some great people who wrote drivers!).  I had to dig a decent amount to find the best way to get I2C and SPI working on my RPi.  To help, I’ve decided to collect the links I used to get the default Raspberry Pi Debian image to the point where I could get SPI and I2C working.

Summary:

  1. Start with the latest Debian image
  2. Update firmware on SD card
  3. Install Chris Boot’s 3.2 kernel with drivers precompiled
  4. run ‘modprobe i2c-dev’ expose /dec/i1c-0

More Words:

I used the debian squeeze image found here dated 19-4-2012.  Unfortunately there are no kernel drivers for SPI and I2C in the default image, which I find strange since the coolest part about the Raspberry Pi is the available GPIO.

Chris Boot has done an excellent job of collecting/writing SPI and I2C code and precompiling a kernel so you don’t have to.  One thing to note though is that his kernel puts the pins into I2C mode and SPI mode by default (at least at the time of this writing).  As mentioned on Chris Boot’s page, you need to update the “firmware” on your Debian image (not you cannot brick your RPi doing this, worst case is you reimage your SD card)

The easiest way to update the firmware is with hexxeh’s firmware updater.  For me this was not without issue though.  Chris Newland has a good description of the issues and how to get it working.  For me I needed a reboot between step 3 and 4, so if its not working, try a reboot.

Using SPI:

So far I’ve actually been able to get everything I’ve needed done though reading and writing /dev/spi0.0 and /dev/spi0.1, which chooses chip select 0 and 1 respectively.   Below is example python code to read from the MAX1113 ADC.

def readadc(channel):
	if channel == 0:
		cmd = chr(int('10001111',2))
	if channel == 1:
		cmd = chr(int('11001111',2))
	if channel == 2:
		cmd = chr(int('10101111',2))
	if channel == 3:
		cmd = chr(int('11101111',2))

 	####note this will actually bring CS high between write and read
	####which may not work for all devices but it works with this device
	#write to ADC to choose channel
	f = open('/dev/spidev0.0','w')
	f.write(cmd)
	f.close()
	#read from ADC
	f = open('/dev/spidev0.0','r')
	data = f.read(2)
	db = bytearray(data)
	#data format 0-0-msb-x-x-x-x-x-x-lsb-0-0-0-0-0-0
	value = (db[0]<<2) | (db[1]>>6)
	return value

Using I2C:

for I2C I’ve been using the i2c-tools package, which can be gotten with apt-get:

rpi:~# apt-get update
rpi:~# apt-get install i2c-tools

The important commands installed by 12c-tools are i2cdetect , i2cset, i2cget

Other (better) methods for SPI and I2C:

The other ways to get at spi and i2c are either directly from the kernel space, which if your reading this you probably don’t want to do, and through system calls.  I haven’t needed either method yet but if you want something to search for I believe you need to use the ioctl() system call.  I’ll post an update once I need more advanced control and have figured it out.  There is also an smbus (another name for i2c) library for python, which I haven’t tried yet and i’d be willing to be there is already an SPI library as well.

Battery charger/power supply

I like to check out sparkfun’s website from time to time, not because I buy a lot there, but because they do a lot of work filtering the the thousands of ICs out there down to a handful that cover many of the things you’d want to do in a small project.

The other day I came across a pretty nifty board there that they call a LiPo Charger/Booster.  It basically allows you to charge a lipo in circuit while supplying either 5v or 3.3v.  The thing I found odd was that the power supply IC used (TPS61200)  seems okay for 5v output (it’s a boost converter with a second mode that allows it to down regulate) but it’s only about 70-80% efficient at 3.3v out(fig 1).  Contrast that with a LDO linear regulator and your efficiency is 80-95%(fig 2) depending on state of charge(weighted average is roughly 90% if the back of my envelope is correct).

Figure 1: a lipo spends >80% of its charge in the 3.5-4v range (when being discharged at <1C)

Figure 2:A LDO linear regulator is actually very efficient when vout just below vin.

The next thing I thought was odd about the charger/power supply was that Sparkfun‘s low voltage shutdown was set at 2.6V, which is extremely low.  A lipo is usually considered dead below 3V and damaged below 2.5-2.6 V so while this is a technically okay shutdown voltage the battery could easy self-discharge below that if left alone for too long (especially if left plugged in since the shutoff circuit needs a tiny amount of current too).   As you can see from figure 3, a reasonable shutdown voltage can be as high as 3.3-3.5v while still discharging >90% of the battery’s capacity.

Figure 3: A typcial Lithium Polymer discharge curve

 

Because I want one of these boards and because of the problems I described above, I figured that it would be best if I made my own.  Here’s what I came up with.

 

 like the Sparkfun part, it can charge off of USB or from a header.   Unlike the SparkFun part it only outputs 3.3V (all I need) and is more efficient, which means longer battery life and less heat generated.  Also, I managed to route the entire PCB on one side of the PCB, which means that  it could me safely glued to the back of a battery pack or case without worrying about weather or not you’re damaging traces.  That also means that you can, in principle make this PCB at home (though it uses some small SMT parts) without having to line up two layers on a PCB.

I’ll probably add a few mounting holes and change the design around but I thought I’d put it up now or else I may never.  I’ll try and keep this page updated when I change the design.  You can download the eagle files here.

 

First post!

Welcome to my blog.  If you’re reading this hopefully there’s more content so please read something else.  If not, this is where I plan to document most of my projects both original and not.  I also plan on putting helpful notes here for personal and public reference.