Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

advice regarding analogue input to microcontroller please

Status
Not open for further replies.
Pin 4 goes to +6V. Pin 11 goes to -6V. The GND connection is not the same as -6V.
The LM324 includes 4 opamps of which only one is being used. Check the datasheet for the pin connections.
the LM317 continues to fry, as does the pot
Are you sure the lower end of the pot is connected to GND, not to -6V ? The LM317 should have ~ 6V between its In and Out pins and passes 100mA so is dissipating 0.6W (i.e. well within its 2W rating) and will get hot. A heatsink is advisable.
If the LM324 is getting hot then there is a wrong connection. If wired correctly it only draws about 3mA.
100mA goes through the 4 Ohm pot, so it dissipates 0.4W max and needs to be rated at at least 1W.

The variable 4ohm pot in the circuit diagram appears to short the input to the wiper, is this correct?
The wiper is connected to one end of the pot. I don't know what your 'pins 1,2,3' refer to as the pot connections aren't numbered in my drawing.

As you said in post #10
Checked out the 100 ma and I think it will be ok.
However, if you want things to run cooler you could reduce the current from 100mA to 50mA by increasing R3 to 22 Ohms and R5 to 220k.
The LM317 dissipation will then be 0.3W and the pot will dissipate 0.1W max (so a 0.5W pot would suffice).

The 3k3 resistor is there to prevent excessive current if the output is accidentally shorted to ground, V+ or V- (but the LM324 includes overcurrent protection anyway).
 
Last edited:
Hi alec,

Thanks for the heads up.

Pin 4 goes to +6V. Pin 11 goes to -6V. The GND connection is not the same as -6V.

Yep, understood, it is (now) correctly wired.

The LM324 includes 4 opamps of which only one is being used. Check the datasheet for the pin connections.

Already checked and is correct. Op amp 1, pins 1,2, and 3.

Are you sure the lower end of the pot is connected to GND, not to -6V ?

The pot has been wired incorrectly, with the centre terminal (the wiper-pin 2) to ground. Also the centre terminal is not shorted to an outer terminal as per the diagram.
My undestanding of the diagram was that the centre terminal (pin 2) should be shorted to one of the outer terminals (pin 1), and that the other outer terminal (pin 3) should go to ground (not -6v rail). Hope this is correct.

Heat sink noted, thanks. The LM324 isn't hot.

The pot has no wattage rating, but it is wire wound and fairly chunky, so my guess is it should cope with the wattage.

However, if you want things to run cooler you could reduce the current from 100mA to 50mA by increasing R3 to 22 Ohms and R5 to 220k.

Alec, this is really useful and I will do that. Does that mean that if I increase R3 to 44 ohms and R5 to 440k the current is reduced to 25mA, with the pot dissipating .05W max?

Point about 3k3 resistor noted.

Many thanks, very helpful.

Phil.
 
Last edited:
Oops, got my maths wrong in post #21. Lost a '0' :eek:. At 100mA the pot dissipates 0.04W (so you might as well stick with that); at 50mA it's 0.01W.
The pot has been wired incorrectly, with the centre terminal (the wiper-pin 2) to ground. Also the centre terminal is not shorted to an outer terminal as per the diagram.
That won't matter. The pot is only being used as your variable resistor. The important thing is that one end of the pot goes to the LM317 output and the other end, and/or the wiper, goes to ground.
Does that mean that if I increase R3 to 44 ohms and R5 to 440k the current is reduced to 25mA
Yes, but the pot voltage to be measured is then only 0.1V so the accuracy of measurement is reduced. Wouldn't recommend that.
 
Last edited:
Thanks alec,

I'm waiting for a few components to arrive. I'll get to it this coming weekend.

Phil.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top