Drive rlc circuit with arduino?

I'm trying to conceptualize the way I would receive a signal at a specific frequency and translate that into running an input on my arduino. Maybe I'd use the analog input, i dunno.

However, I'd like to try something before I get into that, and for some reason I can't find an online source to my question, or my vocabulary on the subject is so poor I can't put my query into appropriate search terms.

I want to drive an RLC circuit with a square wave, between 0 and 5 volts, coming from my arduino by turning an output on and off at the appropriate frequency. That's it. Is it possible?

I guess I'm asking, do RLC circuits work (or oscillate, whatever) when you send 5 volt square waves at them, between 0 and 5 volts.

Thanks.

If you want to drive something from an Arduino with a 5 volt square wave, look up PWM (pulse width modulation) and analogWrite() .

RLC circuit

Is this a practical application or is it related to school work ?

Yeah I suppose using the word "drive" would make people think the wrong thing. I'm not trying to power a motor, actually I want to make a radio.

I want to make a simple digital radio transmitter and receiver. I'd like to use one arduino to send, and one to recieve. I'm hoping I can turn on and off a digital output from an arduino and (if necessary, amplify the voltage between 0 and X volts) and broadcast it using an antenna or speaker and use the another antenna (or microphone) to pick up the signal.

But let's take one step back. I don't even want to send data on it yet. I just want to be able to send the signal from one, and detect the signal from the other. Of course, in radio, there's always noise you have to worry about, and I remember RLC circuits are supposed to operate at a given resonant frequency. I want to attach this to an arduino and basically just convert it into a digital input to tell the arduino "Hey, you're getting a signal, turn on your LED".

For some reason I always imagined that sine waves are what is always used to broadcast, and then they do FM or AM (or whatever kind of protocol) to send the data. But I don't wanna do all that. I just want to use a square wave because it's easy. Can square waves activate an RLC circuit? Specifically, a square wave between 0 and X volts. I guess RLC needs "alternating current" and I remember our physics teacher mentioned something like, "AC doesn't mean the voltage source goes back and forth between positive and negative, it just means that the voltage isn't fixed like in DC" and so I started wondering. I also considered, you can't actually send current THROUGH a capacitor, but you can charge the plates, and I wondered, do you need an alternating positive and negative sine wave, or maybe it's enough to just apply a square wave, maybe like how they use an explosion in one direction to power an engine.

Long story short, any ideas?

Thanks.

badixon:
For some reason I always imagined that sine waves are what is always used to broadcast, and then they do FM or AM (or whatever kind of protocol) to send the data. But I don't wanna do all that. I just want to use a square wave because it's easy.

But using sine waves (aka modulation) is exactly how wireless comms works. You cannot have wireless comms without modulating the signal by a sine wave - EVEN in digital wireless comms. A square wave will not do the trick.

badixon:
Can square waves activate an RLC circuit?

Yes, of course.

badixon:
I guess RLC needs "alternating current" and I remember our physics teacher mentioned something like, "AC doesn't mean the voltage source goes back and forth between positive and negative, it just means that the voltage isn't fixed like in DC"

That is a very bad explanation and I would push it out of my mind if I were you. An RLC filter doesn't necessarily need AC (as in what comes out of your wall), but needs some sort of time varying signal. This is a much better and more accurate way of thinking about what the input to the RLC filter is.

badixon:
you can't actually send current THROUGH a capacitor, but you can charge the plates, and I wondered, do you need an alternating positive and negative sine wave, or maybe it's enough to just apply a square wave

You do not need a positive and negative sine wave as an input to the RLC filter to get an output (as I mentioned before). You just need a time varying signal. You also need to understand that any signal (both periodic an non periodic) can be broken down into an infinite sum of sines and cosines (even if the signal only takes on positive values). For instance, a positive square wave output of an Arduino can be represented in both the time and frequency domain in the following way:

As you can tell, the square wave is comprised of sinusoids at frequencies 0, w0, 3w0, 5w0...... to infinity.

The RLC circuit will then act as a bandpass filter when fed by a signal such as a square wave. Below are graphs for the frequency responses of different types of filters:

BUT - here's what you should be doing instead:
You need to make or buy an oscillator/modulator circuit. This will allow you to take a digital signal from your Arduino (not necessarily a square wave - it could be anything you want) and then modulate the Arduino signal via a sine wave at a certain frequency and then transmit the modulated signal to the other Arduino's receiver. Next, you will need an oscillator/demodulator circuit to recover the digital signal from the sending receiver.

I would use an AM DSB-TC (Amplitude Modulated Double Side Band - Transmitted Carrier) setup. You could use the following block diagram to help design the transmitter circuit:
circuit.JPG

As for the receiver, all you need is an envelope detector, such as the following:

For more info on AM DSB-TC, check out the attached PDF.

All in all, I think you would be much better just getting one of these.

DSBTC_Notes.pdf (824 KB)

circuit.JPG

Bear in mind that the RF spectrum is crowded with users and therefore heavily regulated. For example, you don't want to start using a military frequency and suddenly have black helicopters swarming you. Generally, you are prohibited from using any significant transmit power without a license in most countries. I have actually seen the truck that they use to chase illegal transmitters here where I live. It showed up around the building where I once worked. We had been tasked with testing radios that were licensed for a different location. Our transmissions "walked on" someone and they must have complained. The boss was running around the building telling everyone to shut everything down.

Get yourself a free spectrum chart: :slight_smile:

Thank you very much Power_Broker, that was a detailed and well informed answer. I will probably read it several more times.

That AM radio looks pretty awesome. It may, however, be more than I need.

Here's an idea on my usages:

Usage number one:

Underwater triangulation of the signal source. I want to have a submarine follow a signal being transmitted at one frequency. I was hoping I could use three sensors (mounted on the submarine) to pick up the source transmission and (since the sensors would be equally separated geometrically as a triangle) by making the submarine try to balance the amplitude to be equal among all it's sensors, this would naturally guide the submarine to face the direction of the source. Of course there would be more to this, but that is the most fundamental and basic premise.

Usage number two:

Sending 8-bit data to the submarine (maybe using a different transmitter and receiver than the one previously mentioned) to control various parameters. In other words, I don't need a lot of resolution for the transmission, it may only be controlling a very small list of parameters. Therefore 8-bit resolution would do.

Since this is underwater, I may be using sonar since radio greatly attenuates. Therefore, all my transmission and receiving instruments could possibly be piezoelectric speakers, which would be modified in some way to work better underwater (and be water-proof).

For usage number one, I don't think any modulation is required. But I would need to broadcast (I suppose a sine wave? does it have to be?) a signal, and would require a circuit on the submarine tuned to receive that frequency. If I could just broadcast a square wave (or sine if I must), then I could make an RLC circuit respond to that frequency on the submarine, and maybe use analog inputs of an arduino, and try and balance the amplitude of the source among three sensors, each connected to an RLC, all of which are plugged into analog inputs. Would that work?

For usage number two, I wanted to merely send one of two frequencies, one frequency could be the '1' and another frequency could be the '0' and have the arduino listen to these frequencies. After receiving 8 frequencies one after the other, this would be the 8 bit value. Perhaps I could use two simple transmitters, each of which are fixed at a specific frequency, and broadcast them (never at the same time) and have the submarine have it's own circuits to simply detect either of the frequencies (an RLC circuit plugged into some inputs maybe?). Or would you still suggest the AM transmitter?

Thanks.

Just to make sure one thing is clear - your RLC circuit is a special circuit called a "filter". You will be using it to filter noise from your signal before processing. In particular, your filter is a "band-pass" filter. You might want to google and do some basic research on how band pass filters work and how that relates to your project.

Did you look through the PDF I posted?

badixon:
For usage number one, I don't think any modulation is required.

False.

badixon:
But I would need to broadcast (I suppose a sine wave? does it have to be?) a signal, and would require a circuit on the submarine tuned to receive that frequency. If I could just broadcast a square wave (or sine if I must), then I could make an RLC circuit respond to that frequency on the submarine, and maybe use analog inputs of an arduino, and try and balance the amplitude of the source among three sensors, each connected to an RLC, all of which are plugged into analog inputs. Would that work?

That will work as long as you use modulation and also design your filter correctly. You can either use a simple sine wave or use a squarewave that is modulated by a carrier frequency. When sending EITHER signal, you should use an oscillator circuit to give as clean of a sine wave as possible (as opposed to using the Arduino to output the sine):

Sine Wave Generator:

Modulator Circuit:

badixon:
For usage number two, I wanted to merely send one of two frequencies, one frequency could be the '1' and another frequency could be the '0' and have the arduino listen to these frequencies.

What you are describing is FM (Frequency Modulation) and is a lot more difficult to decode on the receiver side as compared to AM DSB-TC. This will only make things harder.

badixon:
Perhaps I could use two simple transmitters, each of which are fixed at a specific frequency, and broadcast them (never at the same time)

Two things:
1.) If you use AM DSB-TC instead, you will not need two transmitters - the whole package can be transmitted on the same circuit.
2.) If you have two transmitters working on different frequency bands, they can transmit simultaneously without interference. The only reason to restrict transmission to a single transmitter (in this case) would be to conserve power.

badixon:
have the submarine have it's own circuits to simply detect either of the frequencies (an RLC circuit plugged into some inputs maybe?). Or would you still suggest the AM transmitter?

Again, with AM DSB-TC, you would only need one receiver circuit (and a very simple one I might add) to recover the signal. One other note: you will need the RLC filter on the "front end" of the receiver's envelope detector (if you chose to use AM).

For more info on choosing values for the components in the two circuits above, look here.

Also, take a look at this website.

Power_Broker,

Honestly, I'm a computer science student. Most of the things you've explained to me resemble some vague truths that I may have considered in the past. I'm so tailored to think of problems in terms of the digital, and that anything radio or op-amp-analog-computer confounds me. Plus I'm average at math and terrible at physics.

It will take me time to digest this, but I'm starting to get the hang of using chips as a black box (which is basically what an arduino is, since I don't fancy I know how the internal components work). But at least I have a good handle on algorithms, datastructures, and programming, so it's a much easier arena to just focus on programming and digital concepts. But I'd like to let the cost of the components make the decisions for me so I buy things that are cheaper.

Anyhow, I may ask questions later, but I really shouldn't without doing a fair share of reading, but I don't know if you'll see my posts in the future.

Either way, I just wanted to express my gratitude towards you in answering my questions, it is no doubt a good source of valuable knowledge.

Take care.

badixon:
It will take me time to digest this, but I'm starting to get the hang of using chips as a black box (which is basically what an arduino is, since I don't fancy I know how the internal components work).

There are ICs that you can buy that do the same work. For instance, I found this modulating IC. You can probably find a similar one for a sine wave generator.