The blog of 'The Arduino Guy' aka Mike McRoberts, author of Beginning Arduino.

05 November 2013

Turning an old PC ATX Power Supply into a bench PSU

Old ATX power supplies are an excellent and cheap way of getting a power supply that can generate 3.3, 5 and 12 Volts in a stable form and with high currents. It's also really easy to convert them into bench power supplies or to power anything that requires 3.3, 5 or 12 Volts. You can either obtain them from an old PC you have lying around, or one that a business is throwing out. Alternatively, they can be bought really cheaply from places like eBay.

Before you open up the PSU unplug it and leave it unplugged for several days prior to opening up the case. Yes, you heard me right. The power supply has great big capacitors inside that can store charge for a long time after you disconnect the power. Fail to do this and you risk getting a nasty jolt. Don't say I didn't warn you. If it's a brand new one or been unplugged for some time then you'll be fine. However, I take no responsibility for you getting a shock. Take precautions first.

Open up the case. Now chop off all of the plastic connectors. Now, the red wires are 5V, the yellow are 12V, the orange are 3.3V and the black is ground. You also have -5V on the white wire and -12V on the blue wire. If you wish to use these then fine. Check out the WIkipedia entry for ATX for the full diagram of outputs and wire colours: http://en.wikipedia.org/wiki/ATX

You will also need the green wire. This is PS_ON and needs to be shorted out by connecting it to one of the blank (ground) wires. Shorting the green wire powers up the device (when plugged in and turned on).  Alternatively you could connect this via a switch.

Optionally you can also use the grey PWR_OK cable to power up an LED (via a current limiting resistor and ground) to show the power is on.

For my conversion I used banana plug sockets. Banana plugs are usually rated for at least 10 amps which is more than enough for my usage but check the ratings for your own specifications. Drill some appropriately sized holes in the case for your banana sockets and push them through.

Bundle as many of the red wires together as you can and solder to the base of a red banana socket. This will be your 5V output. Any red wires unused can be cut off as close to the circuit board as possible.

Do the same with the yellow wires for 12V, orange wires for 3.3V (I didn't require these on my PSU as I am using it to power my astrophotography equipment which only needs 5V and 12V. I did however leave some orange wires inside, just in case.) and then black wires for ground. If you wish you can also use the white for -5V and blue for -12V.

Optionally solder a switch and LED to the grey PWR_OK wire. Also solder the green PS_ON wire to ground.

Make sure all of your connections are solid and then wrap electricians tape around any exposed wires. Screw your case back on and power up. VoilĂ , you now have a stable bench PSU able to provide nicely regulated voltages at high current. Check the outputs with a multimeter prior to use.

I've heard of people building the outputs into their desk for easy access, which is a great idea if you do a lot of electronics. My conversion is going to be used to power my astronomy equipment such as the motorised mount, filter wheel, camera, dew heaters, USB hub and so on. I can get rid of the numerous power supplies I need to power these and use this single PSU for them all. As I have used banana plugs, which can be daisy chained by inserting into each other, I can power as many 12v or 5v devices as I wish from the one PSU.

The following advice about this project has been offered from Brad Levy:

Using an ATX supply as an inexpensive powerful lab supply is a good idea, but there are a couple of things you need to watch out for.

Many ATX power supplies are not designed to be operated with less than a certain minimum load. If run with a load lighter than that minimum load, the supply may shut down or may output voltages outside the regulated range. The minimum load specification varies depending on which version of the ATX spec the supply adheres to.

The early ATX supplies (circa 1995) had a minimum load requirement of 1 amp on the 5V line and 0.3 amp on the 3.3V line. This can be achieved by loading the 5V line with a 5 ohm 5 watt power resistor, and the 3.3V line with a 10 ohm 2 watt power resistor.

The ATX12V spec v1.1 (circa 2000) specifies a minimum load of 0.1 amp on the 5V line and 0.3 amp on the 3.3V line. This corresponds to a 50 ohm 1 watt resistor on the 5V line, and 10 ohm 2 watt power resistor on the 3.3V line.

The ATX12V spec v2.2 (circa 2006) specifies minimum load currents of 1 amp on the +12V line, 0.3 amp on the 5V line, and 0.5 amp on the 3.3V line.  A 12 ohm 16 watt power resistor (such as TE Connectivity p/n 7-1625966-9 ) would suffice on the +12 line, with a 16 ohm 2 watt resistor on the 5V line and a 6.2 ohm 2 watt resistor on the 3.3V line.

For other versions of these and other supplies, check the supply manufacturer's specification for the minimum load ratings.

I've rounded down resistor values and rounded up the resistor power ratings above to give a little bit of margin and reasonable life. Don't forget that a 12 ohm 16 watt power resistor is going to get warm in the continuous operation, so should be mounted in air flow.

The other caution is to add a fuse or circuit breaker in series with each of the output jacks.
The ATX supplies are designed to be able to provide a lot of power - 20 amps or  more on the 5 volt line, for example, which is likely far more than your intended load. This is enough to allow a miswired circuit being powered to seriously overheat or start a fire. (Think how hot a 100 watt light bulb gets - some of the ATX outputs can double that power.) You should use a fuse or circuit breaker value in comparable to a little more than your expected maximum load.

-Brad
www.bradlevy.com

03 November 2013

Vacuum sealer for my sous vide cooker

If you have read my previous post you will know that I recently made a digital temperature controller to turn a cheap crock pot into a sous vide cooker. Well, I got myself a cheap vacuum sealer from eBay for use with the sous vide cooker recently. It arrived
The same model vacuum sealer I bought.
the other day and it works very well. It works by sucking the air out of the bag and then a heated wire seals and cuts the bag leaving you with the food sealed inside.

The reason I purchased it was when I first tried the sous vide cooker it was obvious that having the food in  a vacuum sealed bag would make life much easier. The first time I used the cooker I put the steaks into a normal gripseal bag, tried to suck out as much air as possible and then put it in the cooker. Not ideal, but the best I could do whilst lacking a vacuum sealer. As I knew the seal wasn't perfect I left the steaks in for two hours instead of one to make sure they were cooked through, They were cooked perfectly and tasted amazing, but the outside had dark and pink patches prior to frying. Also, the bag filled up with air again and the bags eventually floated.
Vacuum sealed steaks ready to go in the sous vide cooker.

For correct sous vide cooking the food should be vacuum sealed so that the water bath is able to get its heat to every part of the meat.

The picture on the right shows two steaks that I did today in the vacuum sealer. They will be cooked in the sous vide cooker later today for dinner so I will be able to compare how these cook compared to the first time. I will also try cooking them for a shorter time period this time around as they are vacuum sealed and so the heat will transfer to the meat more efficiently. I have also bought a cheap steak this time, the cheapest one I could find in the thickness I wanted. On the first steak I cooked even the parts that are usually chewy were soft and tender so i'm convinced that steaks done the sous vide way will always be soft and tender even if the original steak was on the tough side. I will let you know what they taste like later today once they are inside my belly.




21 October 2013

DIY Sous Vide Cooker Project

I had seen plenty of websites or videos of people making their own sous vide cookers so thought I would give it a go myself. If you don't already know, sous vide is a method of cooking food in sealed bags in a water bath with the water held at a very precise temperature. The food is cooked for a long time and means the food is cooked perfectly evenly throughout instead of cooked well on the edges and not so well in the centre. A perfect steak for example would be the exact shade of pink you wish from edge to centre. As a huge steak fan and having had some fantastic steaks in expensive restaurants but been unable to reproduce them at home I wanted to try this out.

I already had a slow cooker and at first intended to hack it for temperature control. But after using an Arduino and a DS18B20 temperature sensor I was able to determine it was capable of reaching the target sous vide temperatures easily and beyond. So I decide to make an external temperature controller box instead. I was originally going to use an Arduino and a relay, but found out you can buy temperature controllers cheaply on eBay for a lot less than the cost of an Arduino and a relay. So I bought a cheap PID temperature controller for about £10, a project box and a few other parts and set about making the unit. 

These units are fully controllable with either a high or low temperature setting, temperature alarms, time delays and so on. They are very easy to wire up (despite the crappy instructions you always get with Chinese made electronics).

The steak I cooked on the very first time I used the unit was cooked perfectly throughout and was, without exaggeration or bias, the most tender and delicious steak I have ever had outside of a top London restaurant. Even my partner, who was very sceptical about the whole thing, admitted that the steak was the most delicious she had ever had and was very impressed. For a total cost of around £35 I have made my own sous vide cooker and cooked an amazing steak without shelling out the £100's it would normally cost to buy a domestic sous vide cooker. I will definitely be cooking all of my steaks the sous vide way from now on. 

A lot of people use rice cookers instead of slow cookers as the thin walls mean you are able to control the temperature more precisely. If I didn't already have a slow cooker I would have purchased a rice cooker. However, the slow cooker works extremely well also. 

As I made an external controller instead of hacking the slow cooker this means the cooker is still fit for purpose and is still safe. Also, I can plug anything I want into the unit and give it temperature control, such as a heater, fridge, freezer, home brew kit, aquarium, etc. 

I've made a video (see below) that shows the full build and if you want further information then contact me on Twitter, G+ or Facebook using one of the methods listed at the end of the video.





04 October 2013

Telescope Focus Controller - Part 1 - The Idea.

One of my hobbies is astronomy and more specifically, astro-photogaphy. I have a pretty sophisticated setup with a computerised GoTo mount with a cooled CCD camera, motorised filter wheel, guide camera, etc. Most of the gear is automated and can be controlled remotely (i.e. it is out in the cold while I sit in the 'control room' indoors and operate it. however, the one thing that still has to be operated manually is the focuser. I have no choice but to focus the kit out in the cold then come indoors. Not only will automating the entire kit make it more comfortable to image when i'm at home, but it will also save a lot of time and time is precious when doing astro-photography, especially in windy and rainy old England.

Me & my astro gear - Brecon Beacons Astrocamp, Sept 2013
Now a commercial motorised focuser isn't cheap. They can cost a lot of money and most of the cost is unnecessary. After all, it is simply a stepper motor attached somehow to the focus knob and then controlled with a 'box of tricks' connected to a PC. So in the hacker spirit I decide to make my own. I had an old 3.15v Sanyo stepper motor somewhere that I scavenged from a printer or scanner or something so decide to use that. I also had an Easy Driver 3.1 board (i've also got Adafruit motor shields and the official Arduino Motor Shield).

As the completed product needs to be small and light I went for the Easy Driver motor control board as it is tiny and easy to use. 

So far I have hooked it up to the motor and have it stepping in tiny 1/8th microsteps. The next stage is to create a control box with knobs and buttons to select the motor speed and to focus in and out (Stage 1). This will also have a USB interface so I can connect it to a PC and control it from software (Stage 2). This will have a temperature sensor so it can automatically compensate for the changing temperature throughout the night as the telescope cools down and heats up. 

Once I can control it from a PC I can then operate it remotely over VPN and sit in the warm whilst imaging. 

Stage 3 of the project will be to write some ASCOM complaint drivers for the device so I can hook it up to either FocusMax or my imaging software (APT & MaximDL) so the focussing procedure can then be fully automated.

As you can see in the picture I am providing the motor with 6.2 volts. The motor is a 3.15v motor. However, that's 3.15v per coil and so double that is needed to get it going. Powering it with just 3.15v volts and it goes nowhere. When running continuously it was using about 500ma. 

Next I am going to make a hand control unit. The plan is there will be a knob to select the step speed and number of steps. Then buttons for focus in/out, another for selecting continuous operation or one iteration of number_of_steps and another for selecting either speed or steps. This will be displayed on either a 7-segment display or an LCD. 

Below is an example video showing the motor in micro-stepping mode. it is doing 1/8th micro-steps controlled by an EasyDriver 3.1 motor control board. The motor is a 3.15v Sanyo stepper motor salvaged from a printer or scanner. I am running it at 6.2v (3.1v per coil) and have dialled down the ED3.1 so it is being given no more than 100-150mA. Any less and it stalls and any more and it gets too hot. This current is enough to give me the torque I need. Next I am prototyping the circuit and testing it out. I will post an update soon.




Sous Vide Cooker Experiment

So, if you haven't already heard of Sous Vide cooking I'd highly recommend reading a bit about it. In a nutshell, it is cooking food in a water bath at a certain temperature with the idea being that the food cooks slowly and evenly resulting in a perfect steak, or whatever it is you are cooking.

sous vide cookerWith a steak for example, you will usually have a temperature gradient across the meat resulting in a pink centre and increasingly darker and cooked meat towards the edge. With sous vide cooking, the steak is cooked exactly to your specifications throughout the meat evenly. You then finish off the crust of the steak quickly with a blowtorch or in a pan.

However, sous vide cookers for domestic use are very expensive indeed. But, with a bit of time and not a great deal of effort you can make your own for a fraction of the price. Many people hack slow cookers, crock pots or rice cookers into DIY Sous Vide cookers. I happen to own a slow cooker that rarely gets used so I thought I would see if I could repurpose it into a Sous Vide cooker to make the perfect steaks.

So the first thing to do was to find out if the slow cooker could reach the temperatures necessary for cooking sous vide style. Typically you want temperatures ranging between 50-60°C for the perfect steak and up to 80° for other items. So I had a DS18B20 temperature probe lying around so I hooked it up to an Arduino and set it to take a temperature reading every 5 minutes and print that to the serial monitor. That way I could see over time how long it took to get to temperature and if it could reach at least the temperatures necessary for a perfect steak.

Over the next 2 hours the cold water I put into the pot was heated slowly up to around 65°C so I knew it would be ideal for how I like my steak (rare). I decided to leave it on overnight and see just how hot it got. The next morning the temperature was just over 97°C, which was a surprise.

So, I now know that the cooker can be used to cook meat sous vide. All I need to do next is to create a control unit that keeps the water bath at the exact temperature necessary. I will work on that at some point in the not too distant future and will give you all an update.