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.

ifil

New Member
Hi,

I have a microcontoller which requires a 1k min to 10k max variable resistor to access its analogue input.

The variable resistor I wish to use goes from about 0-4 ohms!

Is it possible to/how do I "amplify" the resistance from 4 ohms to 10k so that I can use this variable resistor?

Hope this isn't a really really stupid question :).

Any help/advice appreciated.
 
WE have a section for uC questions but to answer your question you can't use the resistor you have. Unfortunately there is no easy way around it. I assume you are placing a voltage across the variable resistor and feeding the output (variable Resistor Wiper Arm) into the ADC input of the uC. That 4 Ohms would severely load your source voltage also.

Ron
 
If you explain what you are trying to do we maybe able to suggest a solution.

Mike.
 
Hi Ron and Bob,

Thanks for the quick responses!

The microcontroller is a Highly liquid midi unit.

I want to use one of the analogue inputs which will accept 1k to 10k variable resistor, which when varied, will control volume or pitch.

The variable resistor I have will measure up to 4 ohms (I am seeking a higher value for the material I am working with), but wondered if there was a solution in electronics by , in effect amplifying or "stepping up" the resistance,in the same way a darlington pair amplifies a signal. maybe voltage divider, a wheatstone bridge or some other mechanism that gets me to use the analogue range of the midi controller.

I am stuck with the material I am working with (it has other properties apart from its electrical resistance).

Thanks for your input, much appreciated.
 
You can use it by passing a small current through it (100mA if possible) and then you would get 0-400mV out. This could be amplified with an opamp and fed to the ADC input. However, 100mA maybe too much for it or may interfere with it's other properties.

Mike.
 
Sorry but after your good explanation I don't see it working with what you have. :( There is no simple way to amplify a resistance as in the analogy you used. Just won't work. However, both 1K and 10K pots are pretty common and inexpensive.

Ron
 
Thanks both,

Mike I'll check out if the material will handle 400 milliamps tomorrow. (Midnight here in UK at the moment!). But your suggestion is on the right lines.

Ron, understood that there a millions of 1-10k pots out there, the application has to use this material, making it into a traditional pot will destroy its other (necessary) properties.

Thanks again, I'll post again tomorrow.

Best,

Phil.
 
Hi Mike/Ron,

Checked out the 100 ma and I think it will be ok.

I guess the only way to prove it will be to set up a test.

Could you point me in the direction of an op amp and circuit that will do the job, please?

I'm right at the limits of my electronics understanding already, (sad but true).

Any further advice much appreciated.

Cheers,

Phil.
 
Based on Pommie's 100mA suggestion, here's a circuit which I think should do what you want. I have simulated a LM317 regulator IC having a 12 Ohm adjustment resistor to create a 100mA source. This 100mA is applied to your resistor simulated here by U3/V3 (as V3 goes from 0 to 1V the simulated resistance goes from 0 to 4 Ohms). The voltage across U3 (0 to 400mV) is applied to an op-amp with a gain of ~ +10. Because the voltage being measured is small any input offset of the amp needs nulling. U2 (a 100 Ohm trimmer) handles that. Because of amplifier non-linearity close to the negative rail the amp is operated with dual polarity supplies (+-6V, non-critical).
 

Attachments

  • ResistanceProcessor.gif
    ResistanceProcessor.gif
    21.4 KB · Views: 156
  • ResistanceProcessor.asc
    3 KB · Views: 126
Hi Alec,

Many thanks for your input, much appreciated!

Do you know of anyone who could build this for me, either on the forum or elsewhere?

Cheers,

Phil.
 
Do you know of anyone who could build this for me, either on the forum or elsewhere?
Sorry, I don't. Where are you based?
 
Hi all,

Thanks for your input everyone, much appreciated.

I may have found someone to build the circuit for me.

My next question is; can anyone recommend software that turns alec's circuit diagram into a pcb layout to aid assembly?

Thanks again,

Phil.
 
My next question is; can anyone recommend software that turns alec's circuit diagram into a pcb layout to aid assembly?
You could use the free 'Eagle 5 Lite.'
 
Hi everyone,

Got the made up board based on alec's circuit diagram today.

Problem: the LM317 began to fry as soon as I switched on.

I had a look at the soldering and noticed a piece of solder shorting to pin 7 of the LM324NS, which I have cleaned up.

I also noticed that V+ and V- on the LM324NS were not connected;

I assume that they should be connected but I'm not entirely sure which pins they represent.

My guess is V+ is to pin 4 from the positive rail, and V- is to pin 11 (Ground) but which is actually the negative rail.

I may have got this completely wrong, if someone could give me a little guidance.

Thanks ,

Phil.
 
Hi Phil

My guess is V+ is to pin 4 from the positive rail, and V- is to pin 11 (Ground) but which is actually the negative rail.

You have it correct. Pin 4 is + and pin 11 is ground for single supply operation.

Ron
 
Hi again,

I have connected the V+ and V- on the LM324NS as suggested, but the LM317 continues to fry, as does the pot I'm using for testing temporarily.

I have noticed 2 other possible causes;

The 3k3 (R6) resistor is missing. I will get one tomorrow but I can't think that this would cause frying.

The variable 4ohm pot in the circuit diagram appears to short the input to the wiper, is this correct? So pins 1 and 2 are shorted and pin 3 goes to ground?

Any help appreciated.

Regards,

Phil.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top