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.

Simulating variable components with a microcontrolelr

Status
Not open for further replies.

loopy

New Member
G'Day,

A quick question - is it possible to simulate the behavious of basic electrical components (ie resistors, capacitors and inductors) using a microcontroller? By this, I mean is it possible to control a variable resistor/capacitor/inductor by a microcontroller?

Many thanks for your help,


Brad
 
Yes and no. You can't do anything without external components, pins always have the value of 0v or 5v with nothing in between. But yes there are ways to make a variable pseudocomponent, usually involving the PWM module. There are always a whole lot of catches in how that component can be used. It is not done much in practice, there are usually many far better solutions.

So, in theory or as a lab demonstration, yes. In practice, mostly no.
 
It depends on what you want to do with the component. If you want it to store or dissipate energy with it then Oznog is right - you probably could do it but it wouldn't be a very good solution.

On the other hand if you are building filters or other signal processing circuits from the components then its done all the time - though not really in the way you describe it. Digital signal processing takes an analog signal, converts it to digital and then does some processing on it and then converts it back to analog. You can simulate just about any analog circuit using DSP and replace that circuit. DSP isn't really used to replace a single component. Simulating the effect of a single resistor or capacitor is usualy more trouble than it's worth, but simulating the effect of a filter is fairly easy.
 
Thanks for the input guys! :)

I might explain more what I'm trying to implement here... I've got a bit of experience using DSP's, FPGA's and microcontrollers, but what I'm not that familiar with is radios. What I want to be able to implement is a variable bandpass filter... so say it accepts an input from an aerial, then the user can select a frequency and bandwidth to filter. I'd like it ro run into the microwave spectrum, so say any signal between 20GHz or so down to maybe 10kHz? So say you could set it to accept 720 kHz with a bandwidth of 45kHz, or maybe 12GHz with a bandwidth of 1GHz.

DSP's are great, but they obviously require an ADC, and I'm not aware of any that can sample a 20GHz wave effectively.

Cheers,


Brad
 
loopy said:
I might explain more what I'm trying to implement here... I've got a bit of experience using DSP's, FPGA's and microcontrollers, but what I'm not that familiar with is radios. What I want to be able to implement is a variable bandpass filter... so say it accepts an input from an aerial, then the user can select a frequency and bandwidth to filter. I'd like it ro run into the microwave spectrum, so say any signal between 20GHz or so down to maybe 10kHz? So say you could set it to accept 720 kHz with a bandwidth of 45kHz, or maybe 12GHz with a bandwidth of 1GHz.

That sounds like a spectrum analyser, and a VERY top end one, you're talking VERY complicated, and VERY expensive.
 
Yup, that's why I wanted to implement the whole thing myself. After down conversion, the idea was to then digitise it and run it through a DSP... end result would be a unit that I could interface with a computer to measure a particular spectrum, then do work on it - much like a Software Defined Radio, but capable of working over a much broader spectrum.

Cheers,


Brad
 
loopy said:
Yup, that's why I wanted to implement the whole thing myself. After down conversion, the idea was to then digitise it and run it through a DSP... end result would be a unit that I could interface with a computer to measure a particular spectrum, then do work on it - much like a Software Defined Radio, but capable of working over a much broader spectrum.

Good luck with it, I presume you have deep pockets? :lol:
 
Actually, yeah - the benefits of being a bachelor :)

Any ideas on the implementation? Or does anyone have any experience with Software Defined Radio?

Cheers,


Brad
 
loopy said:
Actually, yeah - the benefits of being a bachelor :)

Any ideas on the implementation?

Prrsumably in the same way as a Spectrum Analyser?, up convert everything to a very high IF frequency - there are a few DIY Spectrum Analyser projects on the net, which could be worth consulting?.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top