Sunday, January 20, 2013

ProtoCylon Senses

ProtoCylon Senses

By Bobby Winters

I’ve spent the last week on a voyage of discovery in which I’ve discovered myself the same as I’ve always been.
Let me explain.  
Last weekend I tried to get a UltraSonic distance sensor hooked up to my Arduino Uno.  The procedure is easy to find on the Internet.  I wired it, and it didn’t work.  I required it, and...it didn’t work.  In my reading of the reviews in the process of buying this sensor, one of the reviewers had complained the one he bought was trash. I figured I’d had a bit of bad luck, so I bought another one.  Yesterday, I wired it up again.
It worked great.
Then my curiosity got the better of me, so I plugged in the other one to the same wiring.  It worked too.  It had been miswired the first time.  
Now, I am fully capable of screwing up that badly.  I admit that freely.  In my fiddling around, I discovered that one of the jumper wires I had been using was bad.  This is a possibility that hadn’t occurred to me before.  In math your results don’t just go belly-up because your pencil has a crack in its lead.
This is a practice where the real world will check your work for you.
Another project I’d been working on from Beginning Arduino was to connect temperature sensors.  The sensors I’d purchased for this were DS18B20 sensors. You get 10 for that price.  I worked through the book, and, having learned my lesson, I wired the boards painstakingly. I hooked it up and discovered it was 285 degrees centigrade in my house. (For you non-metric types, water boils at 100 degrees centigrade.)  I discovered my error when I looked further in the book and discovered the DS18B20 are a different type of sensor and must be wired in a different way and require a different library of functions to operate.  I hooked them up, and got the temperature down to 85 degrees centigrade.  I changed a resistor in my wiring and it came down to 74 Fahrenheit.
Like I said, the real world checks your work for you.

No comments: