Showing posts with label soldering. Show all posts
Showing posts with label soldering. Show all posts

Monday, February 04, 2013

An Interlude: Confronting Demons and Skeletons

An Interlude: Confronting Demons and Skeletons

By Bobby Winters
I may have shared with you before the brain block I have with regard to soldering.  When I was a kid, I’d gotten a computer kit that required soldering.  I made a mess of it and it wouldn’t work. It cost a lot of money, and we didn’t have all that much.  So, in my shame, I put it aside.
Since I’ve begun playing with microcontrollers, it’s become clear to me that beyond a certain point I will need to know how to solder.  Breadboards are nice, but anything that’s not going to be taken apart eventually will need to be soldered together.  I’ve taken to a program of learning the manly skill of soldering.  I’ve confronted the soldering demon.
I will never be an artist.  Heck, I may never actually solder anything that works.  But I am beyond the “Oh my gosh, what a mess” stage.  It boils down to those three words people have been telling me all my life: “Take your time!” Yes, that’s it.  That’s the secret.  One must decide that soldering is a thing that one must do and then set out the preparations to do it.  
The first thing is to prepare a place.  You’ve got to have a place to do your work.  The second is to have all of your materials around you.  You need your soldering iron, its stand, a little wet sponge to clean your tip on, and--this helped me a lot--a desoldering iron complete with attached desoldering bulb.  I always do a better job writing when I have an eraser, so it figures I do a better job soldering when I have a desoldering iron.
All of that having been said, I’ve not been able to solder a heat sensor to the pc board yet.  I think that I’m frying them.  I hook them to my thermometer program and they read -196.6. I tried three times and got this result three times with three different ruined sensors--and I’ve tried using a alligator clip as a heat sink.  In the world of digital thermal sensors, I am now known as He-who-brings-hot-death.  I am now looking for conductive glue on Amazon.
On other news, I’ve gotten a skeleton for my ProtoCylon.  There’s a picture below.  My experience in opening the box and thinking about putting it together made me think of building the pyramids.  I knew it could be done, but thousands might die in the process. There were parts--nuts, bolts, wheels, motors, plates--but no directions.  I have got something screwed--such a versatile word--together, but it was interesting.  I suppose they thought it would be more interesting without the directions.




Monday, January 21, 2013

ProtoCylon: Telling the Temperature


ProtoCylon: Telling the Temperature

By Bobby Neal Winters
I remember reading old documents, ages ago, about the computing model that was in three parts: Input, Process, and Output.  I thought it was kind of goofy at the time, but I was younger and smarter then.  Now that I am old and stupid I’ve gained an appreciation of how separating a project into smaller parts--even into three parts--can make doing the project a reality. (When I was younger and smarter, I never actually did anything.)
Thus is the tale of teaching my ProtoCylon to tell the temperature.  It comes in three parts and there is a part where I grow just a little bit.
The Input part I referred to in my post ProtoCylon Senses. This involved the DS18B20 digital temperature sensor.  This is a tiny thing.  It has three pins like a transistor.  Heck, for all I know, it might be a transistor.  The power goes in one side, out the other, and the center pin is connected to the Arduino board.  You can check the wiring at this tutorial.
For the Output, I used an LCD display.  This required growth for me.  I will work with the most obvious part first. This display has 16 pins.  That is a lot of pins. This is eased a bit by the fact that four of them are used for power and one is just grounded out.  This leaves eleven, though, and that is nothing to sneeze at.  This wasn’t the major growth inducer, however.  No, the big this is that I had to solder--yes, solder--those 16 pins to a set of pins that would allow me to plug it into the breadboard before I could even start to hook up the rest. (I will leave out the part where I attempted to hook it up without soldering. Not a happy time.)
After I got it soldered, I hooked it up and it didn’t work.  This is becoming a theme with me, but I am learning from this and recovering quicker each time.  The first stage is not to allow myself to be crushed by each failure.  I stop, take a deep breath, let it out, and try to figure out where I goofed.  
One useful technique is to take it apart and put it together again--slowly from scratch.  For wiring up the LCD display, I recommend the tutorial at Adafruit Learning System.
In between the Input and the Output is the Process.  The process in this case involved the use of libraries.  Libraries are specialized functions that make using hardware easier.  While there is a young turk deep inside me that would like to write my own libraries, there is an old goat who would like to actually get something done without taking it apart electron by electron.  Therefore, I happily use the libraries.
In creating this project, I actually used my creativity to merge two programs.  One of these was a “Hello, world!” program for the LCD that was an example that came with my Arduino compiler.  The other was in the book Beginning Arduino by Michael MacRoberts. I lay claim to the creativity crown because I did have to modify their code mutatis mutandis for the project to work.  The completed project follows:


This is the code:
/*
The uses temperature sensors to take the temperature
and outputs it to an LCD display.
I fused two programs by other people and modified them.

The first was:

The LCD Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/LiquidCrystal

The second was from Begining Arduino by Michael MacRoberts
*/

// include the library code:
#include
#include
#include

#define ONE_WIRE_BUS 3

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress insideThermometer, outsideThermometer;

void setup() {
 // set up the LCD's number of columns and rows:
 lcd.begin(16, 2);
 lcd.clear();
 // Get the temperature sensors running.
 sensors.begin();
 sensors.getAddress(insideThermometer,0);
 sensors.getAddress(outsideThermometer,1);

}

void loop() {
 //Get the Temperatures
 sensors.requestTemperatures();
 //Print it on the first row, i.e. row 0
 lcd.setCursor(0,0);
 printTemperature(insideThermometer);
 //Print it on the second row, i.e. row 1
 lcd.setCursor(0, 1);
 printTemperature(outsideThermometer);
 //enjoy the weather for one second
 delay(1000);
}


void printTemperature(DeviceAddress deviceAddress){
 //Get the temperature
 float tempC=sensors.getTempC(deviceAddress);
 //print it out.
 lcd.print("TempF:  ");
 lcd.print(DallasTemperature::toFahrenheit(tempC));
}

Sunday, February 12, 2012

Attacking the Soldering Demon

Attacking the Soldering Demon
By Bobby Neal Winters
I may have mentioned in an earlier post that I have demons which have kept me from pursuing the world of electronics: the Demon of Lack-of-Self-Confidence; the Demon of Fear-of-Loss-Money.
Chief among my demons up until now has been the Soldering Demon.  I ran into this demon while trying to put together a kit for an RF-modulator for an ELF computer.  I had never soldered before, but I figured I would try.  The directions which came with the kit were as encouraging as they were racist and sexist: “These parts are usually assembled by teenage Mexican girls.”
I kid you not.
It turns out that the teenage Mexican girls out did me.  Instead of an RF-modulator I created a one-and-a-half by two-inch rectangle of lead or tin or what-the-hell-ever.  Money was tight in those days growing up, so this failure carried a huge load of guilt.
Time rolled forward and a tried to fight the demon by getting electronic kits for my older daughters.  The oldest one was game.  She could handle hot glue like a pro, and I figured it was just a small step from there to soldering.
Wrong.
We tried a telephone kit.  I figured that since she wanted a phone in her room that this would be an incentive.  We got started, but we couldn’t follow through.
The problem is that there is actually something to be learned.  There is a certain amount of patience, a certain amount of hand-eye coordination, and a certain amount of skill that only practice can bring.
Roll time forward again.
As a part of my continuing Zombie Apocalypse Crystal Radio quest, I came upon directions for a Three-Penny Radio. This takes the crystal radio one or two steps further by introducing amplification. The problem is that it required a bit of soldering, but this was turned into a virtue by making the soldering simple.
We did this late yesterday afternoon.  We’d put together a solar cell kit earlier and this had gone well.  I thought we could start on the Three-Penny Radio by just doing part of it, but Lydia wanted to push on.  This was a mistake because I hadn’t had a chance to look over the directions.  [The directions on the site are complete, but they’ve not been idiot-proofed as we shall see.]
We soldered it all together, stuck the earpiece in our ears, and nada. Nothing. Simon and Garfunkle’s Sound of Silence done for real.  It was then that Lydia exercised an amount of discretion that I didn’t have until just a few years ago.
“Let’s fix this later, Dad.”
So we put it away.
Went to bed last night, church this morning, ate lunch, and took a nap.
When I woke up, Lydia was gone.
I went to the table and compared what we’d done to the picture in the instructions.  The two were different.  
I then did what you do when you solder something incorrectly.  I un-soldered it and re-soldered it.  I put the battery in it, put the earpiece in my ear, and heard the beautiful sound of static.  With a little tuning, this was replaced by music.
I rock.
I am now waiting for Lydia to get back to receive her assessment.