Shop OBEX P1 Docs P2 Docs Learn Events
MCP3202 connection with LM34 not working — Parallax Forums

MCP3202 connection with LM34 not working

Hello Everyone!

I was using the LM34 with the ADC MCP3202 for the temperature measuring project given in the parallax website : http://learn.parallax.com/project/temperature-measuring .
I had connected everything as specified in the circuit diagram given in that project. However when I downloaded the spin program, given in the project, and tried to view the temperature in the Parallax Serial Terminal, it kept on showing 0 degrees. I ran it in the Propeller Quick start Board.

I measured the LM34 output and it was giving the right volts which was 800mV according to the room temperature which is caliberated as 80 degrees Fahrenheit.

How do I know if my ADC converter is working? Should I connect the circuit using a Propeller Project Board?

Thanks !

Naziba

Comments

  • The odds are that you have mistake in your circuit somewhere. Have you tried using a pot to vary the voltage to the ADC input and tried both inputs? Or you can jump a wire from the VDD of the board to an adc input pin. That should give you a maximum reading. Look for stuff like the adc chip pointed the wrong way. Check for proper voltage on all the supply pins to the ICs etc. Try a different adc if you have one. Try using different pins on the Prop.

    When I get really stuck, I rip the entire thing apart down to the very last wire and put it together again.

    Good luck!
  • Jonathan wrote: »
    When I get really stuck, I rip the entire thing apart down to the very last wire and put it together again.

    Same here. I make sure and use a different section of the breadboard.
    I've been surprised how often this approach works.

  • Thanks Jonathan and Duane!

    So I do not need to attach a amplifier across the LM34 output and the MCP3202 channel ?

  • No need for an amplifier if you use the circuit you provided in the first post.

    May a picture of your setup would help us troubleshoot the problem.

  • I was just wondering if you checked the pin out of the mcp3202. Are the power and ground wires on the correct pins. I always printout the data sheet for any device I"m working with. Are you using the correct pin called out in the spin code for the Adc Try measuring the voltage in and out of the adc with a multimeter
  • kwinnkwinn Posts: 8,697
    edited 2015-09-08 14:17
    Naziba, one thing I do to make building a prototype simpler is to take a screen shot of the chip outlines from the data sheets and use them with a paint program to lay them out and draw the wire connections. Nice thing is it's easy to do, simple to correct mistakes, and you can color code the wiring. You can also flip the chips if you are wiring on the bottom of a perf board.

    For the MCP, make sure pin 1 is pulled low or is driven low when you are reading data from the chip. Usually won't work if it is floating. Of course you also need to check power, ground, clock, and data connections as well.
  • Thanks Bob. The Adc is fine.

    Kwinn how do I make sure the CS pin is low? Do I have to change the code?
  • kwinnkwinn Posts: 8,697
    The downloaded code should work without changes, and the MCP3202 object should be setting P23 low and high as needed to read the adc. Check the connection from P23 to pin 1 of the MCP3202. A scope to look at the signal would be best, but a meter or led may also work. What equipment do you have?
Sign In or Register to comment.