Sunday, July 29, 2012

GRRR


It's been almost three weeks since I tested the digital temperature sensor and then extended it using twisted pair ethernet cable. In that length of time, I've lost a lot of ground knowledge-wise. And the damn thing isn't working! It's not working, and I can't tell what I'm doing wrong. I can't even tell if I'm supposed to set the data pin to INPUT or not. The tutorial doesn't do it, but I can't see how it would work if they don't do it. I would reference the code I was using, but my computer ran out of battery and shut off without warning, and apparently I never saved my work, which boggles my mind. I'm very frustrated! I really don't want to remove my heat-shrink tubing and solder that I fought so hard to make. These wires are really tedious! But I'm going to do it because otherwise there are too many stupid variables to tell whether my code is right or not.

GRRRR!!!

Tuesday, July 10, 2012

Extending the digital temperature sensor

This was the really difficult part with my last analog sensor, which was analog. Anything beyond being plugged directly into the Arduino would cause the sensor to give me all sorts of unreliable readings. This digital sensor is supposedly immune to this issue, which is why it costs $4 instead of $2 like the analog sensor. The only thing I'm not quite sure about is the pull-up resistor that needs to go between pins 2 and 3 (basically connect pins 2 and 3 via a 4.7K resistor). I'm guessing it needs to happen where the pins enter the Arduino and not up near the sensor itself. Hopefully I'm right.

In terms of the larger plan, this step will allow me to measure the temperature of the water coming out of my sink, and the servos will adjust it to compensate for changes. Once it's all working, I should be able to move the apparatus to my shower! Of course, then I'll have to deal with waterproofing, loosening up the knobs so the servos can turn them, and a few other things.

But first things first: I'm going to extend the new digital temp sensor about 18 inches.

Update: I did it! Although I haven't tested it yet. I took two twisted pair strands from a solid-core ethernet cable, twisted them together, and attached the sensor to the end. It's a little stiff, but it should conduct really well. I'll let you know when I start testing it. The step after that will be to attach it to my sink!!

Monday, July 2, 2012

Digital Temperature Sensor!

A quick update: I've just gotten my new digital temperature sensor working! It's supposed to be better at transmitting over distances. It looks exactly the same as the analog one.

Sunday, July 1, 2012

It verks!!

I'm super excited to report that I did everything I set out to do!! I implemented multiple settings and also a new power supply so the arduino can finally function without the computer attached!! I'm totally psyched because it's actually useful!!


I'm totally living in the future!!

Getting the sink controller to be useful

In my last post, I had created a setup with a single switch that only had full-blast warm or full off. This doesn't encompass the full range of use for my bathroom sink, so I'd like to flesh that out a little more. I also found what I thought was the perfect power supply, but for some reason everything behaved very erratically, possibly due to de-coupling. This means that I may need to put capacitors between my power supply and my servos and/or arduino. However, this isn't a critical issue at the moment, as I can always just use the power setup I had previously. What's important at the moment is getting the apparatus to be useful.

If I can make it easier to get the right temperature using the device than it is manually, I will consider the project successful. I think that by having several of the most common settings rigged to buttons, I'll be able to achieve this.

I bought a breadboard and a bunch of clicky buttons. Each button will be one setting. After talking with Kerry, my first iteration of this idea will have the following settings:

  • Full cold - filling water bottles, rinsing a glass
  • Medium cold - putting a small amount of water in a glass
  • Low cold - wetting a toothbrush
  • Medium warm (full-blast hot to make it heat up quickly, then reduce)
  • Off

I'll need 5 pins as inputs, and I'll need to make a "state" that changes when each pin is activated. I had the issue before where pins that weren't getting an input would return random values, but I've just read about enabling the Arduino's internal pull-up for digital pins! This means I don't need to waste time adding pull-up resistors to all my pins. Thank goodness. Here I go!