USB temperature sensor - Page 1
Forum section: electronics / projects

author: gxti
author_rank: Frequent Contributor
timestamp: August 13, 2010, 12:13:48 am
content: So apart from a 100-in-1 electronics kit I had when I was little, I've done nothing with electronics, and after running across Dave's blog I got the itch. I pulled some parts from said kit and played with them and made LEDs flash and all that, but I want to make something useful, if not cost effective. So I'm building a USB temperature sensor.Here's what I've got so far:http://partiallystapled.com/~gxti/circuits/2010/08/12-project.pngOn the left is a LM35 temperature sensor, in the middle is a MCP3301 ADC with SPI output, above it is the reference voltage, and to the right is the FT232RL USB interface which I am going to use to bit-bang SPI instead of dragging in a microcontroller. Vdd should be 5 volts considering it will probably (eventually?) leech off USB.If anyone could point out what I've done horribly wrong, or even what might improve precision, I'd be very grateful. I'm not worried about everything to the right of the FT232RL as I'm actually getting a Sparkfun breakout board that has the USB port on-board -- no sense trying to solder SMT parts on my first real project. However, I am worried about the reference voltage (U1), and whether that together with D1 will allow me to accurately measure somewhere in the ballpark of -0.3 to 0.8 volts (corresponding to -30 to +80 degrees Celsius). I don't know much about ADCs but I'm assuming that Vref corresponds to the maximum positive voltage measurable, and I'm not sure whether what I've designed can measure (small) negative voltages.Thanks for any tips or corrections!

author: jahonen
author_rank: Super Contributor
timestamp: August 14, 2010, 06:46:22 am
content: You might want to move some pins, /RI and /CTS are inputs on FT232R. Also, the ADC is somewhat redundant. It is easier to use just a SPI-interfaced thermal sensor if it is just the temperature you are interested. Bit-banging is very slow on USB due to fixed frame timing, but I guess that is not a problem here.Regards,Janne

author: DrGeoff
author_rank: Frequent Contributor
timestamp: August 14, 2010, 07:08:17 am
content: Using a microcontroller with a USB port (eg PIC, AVR) and an I2C or SPI temp sensor (eg LM75) would also be a simple solution.

author: migsantiago
author_rank: Frequent Contributor
timestamp: August 14, 2010, 04:03:22 pm
content: Quote from: DrGeoff on August 14, 2010, 07:08:17 amI completely agree. The USB stack is very easy to implement on PICs for example.

author: gxti
author_rank: Frequent Contributor
timestamp: August 15, 2010, 12:44:04 am
content: QuoteIn bit-bang mode they're all configurable. The choice was completely arbitrary, though.QuoteAh, but that's no fun at all. I chose to go this route so I had at least a little analog stuff to play with, and hopefully it'll be a little more (needlessly) precise than low-end digital sensors. If I were going to go the all-digital route I probably would have chosen 1-wire instead, since I can hook up many sensors and poll them all through the same interface. In fact, I'll probably do something with them sooner rather than later.Is the voltage reference at least right? That is, will it put 1.2V on the Vref pin? That's the only part that I'm totally clueless about. But the parts are already on the way, so at least I'll be able to experiment soon enough.Thanks for the input, all.