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.

Linear Ramp

Status
Not open for further replies.

mahfuzmatyaacob

New Member
Hey guys,

Im having a problem on designing a circuit that produces a linear ramp from 0V up to 6.5V, where u can actually control the ramp frequency. Can someone give ideas on this subject matter.
 
I'm unsure what you mena by 'ramp frequnecy', but I assume you mean 'saw tooth wave'. I believe a 555 timer chip can do this:

**broken link removed**

It uses the 555 in standard astable mode, but with a transistor to provide a constant current source to the charging capacitor. So it ramps up linearly. You can control the frequency simply by adding a pot to one of the timing resistors.

Blueteeth.
 
the ramp doesnt start from 0V. It start from 1.9V at the minimum value. Any adjustment i should make for the ramp to start from 0V up to lets say 6.5V?
 
Did you use the schmatic (second one down) in the link I posted?

That will start at 0V. If you wish to make it 'stop' at 6.5V the I suggest a comparator (LM393 should do) connected to pin 4 of the 555 timer. Connect the output of the ramp generator (pins 2,6 and 7) to the _ of the comparator, and use a voltage divider on the + pin. I do'nt know what your power supply voltage is but I'm sure you can work out the resistor values.

Then the output of the comparator, with a pull-up resistor to VCC should connect to pin 4 of the 555.

Your ramp output 0-6.5v will be the output of the 555 timer (pins 2.6.7). All this does is reset the ramp (discharge the charging cap) when the threshold of the compartor is reached...in your case 6.5v. It will then discharge the cap to 0v, and start to ramp again.

I will post a schematic soon if I have time.

Good luck.

Blueteeth
 
Blueteeth said:
Did you use the schmatic (second one down) in the link I posted?

That will start at 0V. If you wish to make it 'stop' at 6.5V the I suggest a comparator (LM393 should do) connected to pin 4 of the 555 timer. Connect the output of the ramp generator (pins 2,6 and 7) to the _ of the comparator, and use a voltage divider on the + pin. I do'nt know what your power supply voltage is but I'm sure you can work out the resistor values.

Then the output of the comparator, with a pull-up resistor to VCC should connect to pin 4 of the 555.

Your ramp output 0-6.5v will be the output of the 555 timer (pins 2.6.7). All this does is reset the ramp (discharge the charging cap) when the threshold of the compartor is reached...in your case 6.5v. It will then discharge the cap to 0v, and start to ramp again.

I will post a schematic soon if I have time.

Good luck.

Blueteeth
The ramp in the second circuit in that link will not go to zero volts except with small capacitor values, where the propagation delay of the 555 is not fast enough to turn off when the cap voltage reaches Vcc/3. With large cap values, it will oscillate between Vcc/3 and 2*Vcc/3.
Below is a sawtooth oscillator which does a pretty good job of ramping between 0V and 6.5V. It's actually two monostables which trigger each other.
The two 555s could be replaced with a single 556.

Mahfuz, if this is for your A/D test fixture, it will not approach 50MHz. You might get a decent ramp at 50kHz.:(
 

Attachments

  • 555 ramp gen.PNG
    555 ramp gen.PNG
    31.7 KB · Views: 530
Thanks Ron, but if i may ask, what is the purpose of that regulator? If its to produce a constant current, you already have the transistor for it? Mind sharing.. :)
 
mahfuzmatyaacob said:
Thanks Ron, but if i may ask, what is the purpose of that regulator? If its to produce a constant current, you already have the transistor for it? Mind sharing.. :)
Study the LM555 datasheet. The 555 has an internal voltage divider with two thresholds, one at Vcc/3 and one at 2*vcc/3. In this circuit, the ramp cap charges until it reaches the upper threshold, where an internal flip-flop gets reset, discharging the capacitor.
You want the ramp to reset at 6.5V.
9.75V*2/3=6.5V. Hence the adjustable voltage regulator.
 
Roff, I have tried to simulate the circuit you gave me, but it turns out to be errors on the connection. Is it because of my simulation program (PSpice) or what? Need you opinion on this. Attached the circuit diagram.
 

Attachments

  • test_circuit.JPG
    test_circuit.JPG
    58.1 KB · Views: 373
mahfuzmatyaacob said:
Roff, I have tried to simulate the circuit you gave me, but it turns out to be errors on the connection. Is it because of my simulation program (PSpice) or what? Need you opinion on this. Attached the circuit diagram.
Do you get error messages from Pspice? What was the length (time) of your simulation? I don't see anything wrong with your schematic, except I would not set the pots to their maximum value. The pot to set the supply voltage (your Vin) actually needs to be about 30 ohms. For hardware, I would change the resistor in series with it to 680, or change the pot to 100 ohms.
I'm attaching the .ASC file for LTspice, which is what I used for simulation. You can just open this file with LTspice, and the schematic will appear, ready to simulate.
 

Attachments

  • 555 ramp1.asc
    3.4 KB · Views: 265
  • 555 ramp gen wave.PNG
    555 ramp gen wave.PNG
    13 KB · Views: 317
Ron,

Thanks dude, seems like i need to install the LTSpice software.. Haha have to learn on how to use it, but anyhow thanks for your advice. :) need to find LTSpice library since there are certain libraries that are missing when you gave me the file. Thanks man for the help
 
I seem not to understand how does the LTSpice works, i mean the subcircuit. Based on the file you gave me, the software cant detect the LM317 device. I went searching around the forum on how the subcircuit works and it seems like you guys are editing/creating some sort of file to be rename as .sub file. Hmmm, confusing..... :(
 
mahfuzmatyaacob said:
I seem not to understand how does the LTSpice works, i mean the subcircuit. Based on the file you gave me, the software cant detect the LM317 device. I went searching around the forum on how the subcircuit works and it seems like you guys are editing/creating some sort of file to be rename as .sub file. Hmmm, confusing..... :(
Sorry about that. :(
In the attached zip folder, unzip LM317.sub into C:\program files\LTC\swcadIII\lib\sub.
Unzip LM317.asy into C:\program files\LTC\swcadIII\lib\sym\misc.

I created that symbol. It doesn't come with the LTspice download, as you discovered.

You will have to close LTspice and restart it so the program can find these files.
 

Attachments

  • LM317.zip
    1.1 KB · Views: 203
Hey Ron, thanks man, it works properly.. I never used LTSpice before and that is why i dont seem to understand the way the software works. But i guess from the overview of it, i think that this software allows you to create your own device based on your own specification. Again, thanks man for the help.. Appriciate that :)
 
Oops, didn't get any email updates on this thread, but it seem Ron has done you a good service. Sorry if I went all quiet...ever since my pm inbox was full its been getting a bit twitchy.

BT
 
Re: LTSpice device creation/editing

Roff said:
mahfuzmatyaacob said:
Ron,

Wanted to know how actually you edit/create the device. Was trying to create new sort of circuit but all the device required aren't in the LTSpice library. Thats why i need to create new one (i guess). So how can i do that? If you wouldnt mind to share
What part are you trying to create? Do you have a spice model for it? It is possible to use some of their existing symbols, in some cases.
The process for creating a completely new symbol is not easy to describe. The help files tell you how to do it. I figured it out on my own, but it wasn't easy. If you really need to do this, I might be able to steer you through it, but please answer my questions first. Also - There is a **broken link removed**.

Ron,

I was trying to simulate this circuit that i've just attached in the forum (linar ramp). Basically, this circuit does the same as before (circuit that u gave me). So im thinking of checking the design of it and the functionality of the circuit. The problem that im facing right now is that most of the devices the circuit uses arent in the LTSpice model library. Thats is y im thinking of creating new devices to accomudate the models.

Was trying to message u but ur inbox is full. Hehehe :D

Rgrds,
Mahfuz
 

Attachments

  • Absolutely_Genius.pdf
    255 KB · Views: 353
Last edited:
Blueteeth said:
Oops, didn't get any email updates on this thread, but it seem Ron has done you a good service. Sorry if I went all quiet...ever since my pm inbox was full its been getting a bit twitchy.

BT

Haha no big deal, Ron has been helping me much on this particular matter. Thanks to him :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top