• 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.

12/24V square wave oscillator from 100 to 2000Hz

Status
Not open for further replies.

martino

Member
I'd like to build an oscillator able to work with 12 or 24V power supply.
The output is a square wave of variable amplitude up to nearby the power supply voltage in the range of 100 to 2000Hz (precision is not an issue).
The load capability should be at least 100mA.
Regards,
 

spec

Well-Known Member
Most Helpful Member
I'd like to build an oscillator able to work with 12 or 24V power supply.
The output is a square wave of variable amplitude up to nearby the power supply voltage in the range of 100 to 2000Hz (precision is not an issue).
The load capability should be at least 100mA.
Regards,
Hy martino,

Welcome to ETO.

I see you are from Italy- one of my favorite countries. Care to tell us which part of Italy and put it next to 'Location' on your user page so that it displays in the window next to your posts.

Can you tell us what you are driving with the square wave output. This information is important as the output will need protection if an inductive or capacitive load is being driven.

Also what is your preferred approach:

(1) Build the circuit from fundamental components: resistors, capacitors, diodes, transistors, and chips.

(2) Use two ready made modules.

I have considered both approaches and (2) would be easier, and cheaper.

spec
 

martino

Member
Than You Spec,
my city is Torino in the North of Italy.
I need to drive the inputs of 5 or 10 PLC connected together to test it. The load will not be inductive but mainly resistive. The true load will be 30mA nearly, but i specify 100mA as a precaution.
 

martino

Member
Thank You Spec, but i d'ont understand what of the proposed solutions, can work with a power supply of 12 - 24V.
 

AnalogKid

Well-Known Member
Most Helpful Member
There are a couple of different ways to do this, even with the 100 mA output requirement. But first,
1. Is the supply only 12 V or 24 V, or is it variable between 12 V and 24 V?
2. Is the squarewave output always equal to the supply, or is it variable from 0 V to the supply voltage?

ak
 

spec

Well-Known Member
Most Helpful Member
Thank You Spec, but I don't understand what of the proposed solutions, can work with a power supply of 12 - 24V.
I have designed a circuit that operates from a supply of 12V to 24V. The supply voltage will define the amplitude of the output square wave: if the supply is 12V the square wave output will be 12V peak to peak, if the supply is 15V the output square wave will be 15V peak to peak and so on.

The frequency of the square wave will be adjusted by a potentiometer and will not be affected by the supply voltage.

If you would like the circuit to operate in a different way please say and I will see what can be done but you will need to define exactly what you want.:)

spec
 

martino

Member
Thank You AK,
1. the supply is 12V +/- 10% or 24V +/- 10%. Is not variable between 12 - 24V.
2. the output is equal to the suply voltage. A variable output from 0V to supply voltage should be much appreciated and useful to evaluate the input sensitivity of the PLC.
 

spec

Well-Known Member
Most Helpful Member
I have just re read your opening question and realise that I may have misunderstood the requirement.

How would it be if the circuit operated from a fixed 24V supply and the output square wave could be continuously adjusted by a potentiometer from 0V peak to peak to 24V peak to peak?

The frequency would also be adjustable by a potentiometer as previously mentioned.

spec
 

spec

Well-Known Member
Most Helpful Member
I have just re read your opening question and realise that I may have misunderstood the requirement.

How would it be if the circuit operated from a fixed 24V supply and the output square wave could be continuously adjusted by a potentiometer from 0V peak to peak to 24V peak to peak?

The frequency would also be adjustable by a potentiometer as previously mentioned.

spec
Update. Our posts crossed: your #8 post above answered my question.
 

Tony Stewart

Well-Known Member
Most Helpful Member
I'd like to build an oscillator able to work with 12 or 24V power supply.
The output is a square wave of variable amplitude up to nearby the power supply voltage in the range of 100 to 2000Hz (precision is not an issue).
The load capability should be at least 100mA.
Regards,
I gather you do not have a signal generator which can supply the 3 to 10mA per LED opto load in the target PLC,with suitable current limiting R.

If you are looking for EMI immunity, lower V and R is better at the same current and will give faster rise times with pullup R on remote. Fall time will be the effective ESR of the switch to ground ( MOSFET or Bipolar)

There are a hundred ways to do this depending on your access to parts. Whatever is best depends on the accuracy you desire. Normally you follow std specs or use a variable drive to determine threshold and then double the current for margin to allow for IR LED aging and noise immunity. So 3 mA may or may not be adequate depending on device.
 

AnalogKid

Well-Known Member
Most Helpful Member
A variable output from 0V to supply voltage should be much appreciated and useful to evaluate the input sensitivity of the PLC.
How variable? If it never has to go below 1.5 V, then this reduces to a low-dropout regulator making a variable voltage level and an oscillator with a PNP switch on the output.
Max output - Vpower - 0.5 V
Min output - 1.25 V - ish

ak
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
Hey guys: Idea. Why not drive the shutdown pin of an LM317?

It would go as low as 1.2V and you would need a supply about 3 V greater than the actual output. So 28 V minimum for 24 volts to 1.2V out.
 

AnalogKid

Well-Known Member
Most Helpful Member
Hey guys: Idea. Why not drive the shutdown pin of an LM317?
Because it doesn't have one?
It would go as low as 1.2V and you would need a supply about 3 V greater than the actual output. So 28 V minimum for 24 volts to 1.2V out.
A 1.25 V Vmin doesn't sound like "shut down" to me. I thought about using a 317 for the variable output level part, but the 3 V overhead is too great to do what he wants (without more information from the OP). That's why I suggested a LDO circuit.

ak
 

Tony Stewart

Well-Known Member
Most Helpful Member
still seems like a poorly defined driver .
is it +/-30mA or +0/-30mA
or 0 to 30mA variable or just 0 to 24V variable p-p? @ 30ma
or Vol<1V and Vol=Vcc?
 

spec

Well-Known Member
Most Helpful Member
Hi martino,

Here is a circuit I have done for your pulse generator:

spec

Issue 3 of 2016_09_01

2016_09_01_Iss1_ETO_PULSE_GENERATOR_VER2.png
NOTES
(1) The circuit has not been optimized and toleranced yet.
(2) The NMOSFET and PMOSFET are in a single pak: type NXP PHC21025.
(3) The output square wave can be set from 0V to supply voltage -1V (0V to 11V with a 12V supply).
(4) Unless otherwise stated, all capacitors are ceramic, X7R dialectic, +-10% or better, 20V working or higher.
(5) C26 is a low ESR aluminum or aluminum polymer electrolytic capacitor of 20V working minimum.
(6) C25 (timing) is a metal film capacitor of 20V working minimum.
(7) R4 and R5 must be mounted on the MOSFET gate terminals.
(8) Unless otherwise stated, all resistors are metal film, 250mW or more, +-5% or better.
(9) The schematic symbol for the LT3080 is not correct. IN and VCONTROL on the LT3080 should be connected together and are represented by IN on the schematic symbol. SET on the LT3080 is represented by GND on the schematic symbol.

DATA SHEETS

(1) LM555
http://www.ti.com/lit/ds/symlink/lm555.pdf
(2) LT3080
http://cds.linear.com/docs/en/datasheet/3080fc.pdf
(3) NMOSFET & PMOSFET
http://www.nxp.com/documents/data_sheet/PHC21025.pdf
 
Last edited:

Tony Stewart

Well-Known Member
Most Helpful Member
still seems like a poorly defined driver .
is it +/-30mA or +0/-30mA
or 0 to 30mA variable or just 0 to 24V variable p-p? @ 30ma
or Vol<1V and Vol=Vcc?
Should it be variable amplitude X to 0V or X to V+ (12 or 24) ???

most important.. Define your load. normally it is just an optocoupler LED.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top