Analog switch bit?

Is there a bit that can act like an “analog switch”?

More specifically, I’d like a bit with an analog input, analog output, and a trigger input:

  • When triggered, the bit passes the analog signal from its input to its output.
  • When not triggered, its output is low (or user-selectable between low / high).

Another way to think about this is like an SPDT relay.

Here’s my use case: I want to sample the room temperature every hour, and use the cloud bit with an IFTTT recipe to send the time / temperature to a spreadsheet.

I’ve tried using the IFTTT cloudBit trigger connected to the Google drive (add a row to a sheet) action. But the problem is that this logs continuously, since the temperature sensor causes the cloudBit input to always be “active”. This logs way more data than I need, and fills up the spreadsheet too quickly.

I’d like to put the “analog switch” between the temperature sensor and the cloudBit input. Then I could use the cloudBit output to trigger the switch for a few seconds each hour (through another IFTTT recipe).

Thoughts?

Hi there, @dabono. :slight_smile: Have you tried using the Arduino bit?

Hi @JackANDJude,

I considered the Arduino bit, but: 1) I don’t currently have one, and 2) it seems kind of like overkill for this application :hammer:.

I’m also considering using a roller switch between the temp sensor and cloudBit, and using a servo motor to activate the switch. But that’s getting into Rube Goldberg territory.

I did some research over the weekend and found that Mouser electronics sells several analog switch ICs. It might be interesting to try hacking together a custom bit to see if it works (it might also be useful to other people).

Thanks for the suggestion, and still interested in hearing other solutions :smile:.

Hi there @dabono,

I have been thinking a few days about a possible solution for your project…
Last year I made a bitlab submission for a (SPDT) relay bit.
See: http://littlebits.cc/projects/relay-bit-a-safe-connection-to-other-systems

Maybe this bit could be used in your temperature project…
I tried a few things and finally I made the following circuit:
It is built up with the relay bit, a tempeature sensor and the cloudbit.
I added the number bit and the RGB led, only to check the cloudbit input and output in the circuit itself.
The input of the cloudbit is connected to the temperature sensor output via a protobit where the middle connection (the SIG line) is removed. The connection is made by activating the relay bit. One normally open contact connects the temperature data to the cloudbit input.
The output of the cloudbit is connected to the input of the relay bit, so activating the cloudbit via the internet will trigger the relay bit and then the temperature data is sent to the cloudbit and can be seen on the internet.

see the following pictures and a little movie on Youtube:
Hope this is what you need…

This is the circuit:

This is the principal diagram:

and this is the video showing the temperature data via cloudbit control.
I suppose this can be done via IFTTT also…

This is the relay bit, assembled on a perf board:

UPDATE:

With a slightly different setup it can be done with only one protobit.
USB power - Temp.sensor - protobit - cloudbit - relay bit.
See:

.