Circuit Design Help

Hello wondering if anyone can give me some guidance im on my own here with no higher education of any sorts and not a electronics specialist anywhere this far down the country for help.

I'm trying to create an astable square wave oscillator from a 555 timer giving as close as possible to 56khz now i've calculated the values i need and built the circuit as well as designed it and tested it on an oscilloscope however im getting conflicting results.

I do realise that there will be slight capacitance in my long jumper wires however i ran out of cable and had to make do with what i have (roll on pay day) but im sure i shouldn't be getting these results, bare in mind my scope is a Hantek 6022BE and i cant afford a good quality bench top oscilloscope so no hate on that front please (Saving currently don't tell the MRS).

My values are...
R1 18K
R2 120K
C1 0.0001uf
C2 0.01uf -Control Voltage

I have attached pictures of the online calculator i used to check the values, the LTSpice design, the oscilloscope screen and a picture of my jumper happy circuit.

Any help would be a world of difference, Thanks

I didn't check your calculations.

on an oscilloscope however im getting conflicting results.

What's the 'scope showing you? ...I assume the 'scope is showing you the "true" frequency (within it's accuracy). The wave-shape could be real, it could be caused by the 'scope probe, or it could be an artifact of the 'scope. (We don't see perfect square waves & pulses in the real world, but in digital we only have to discriminate between 0 and 1.)

Typically, if you don't have a crystal oscillator you'd add a "trim pot" (potentiometer in series with one of the resistors) to tweak the frequency. You may want to give yourself a 10-20% adjustment range so you have enough range without the adjustment being too "touchy".

From what I remember it's tricky to get a square wave out of a 555. If you run a rectangular wave into a [u]Type-T Flip Flop[/u], you'll get a perfect* square wave (equal high & low times) of half the frequency. (You can make a T flip-flop from a JK flip-flop).

  • Depending on the consistency and stability of the rectangular wave.

Write the formulas and calculations on a sheet of printer paper and post a photo of it.
(fyi, it helps if you have pin numbers in your schematic but it's not mandatory) When you're asking for help it saves time if everything is labeled to reduce the number of things we have to look up.
The calculations are here.

Time High (Seconds) T1 = 0.693 * (R1+R2) * C1
Time Low (Seconds) T2 = 0.693 * R2 * C1
Time Period T = Time High + Time Low = 0.693 * (R1+2*R2) * C1

You should show your work. It looks like your getting about 45 kHz.
I wouldn't use cheap ceramic caps like that. They're garbage. Get some decent caps. (5%)
You should increase the cap value and reduce the resistor values.

Why did you start a new thread for the same problem.

http://forum.arduino.cc/index.php?topic=427656.0

This will output 56kHz on pin11 of an Arduino.
Leo..

const byte outPin = 11;

void setup() {
  pinMode (outPin, OUTPUT);
  TCCR2A = _BV (COM2A0) | _BV(WGM21);
  TCCR2B = _BV (CS20);
  OCR2A = 141; // ~141 = 56kHz | ~209 = ~38kHz | ~219 = ~36kHz
}

void loop() {
  // nothing
}

It is not the same problem in that post i was talking about information and advice on crystal oscillators this is for help with a 555 timer circuit.

I will try and post a copy of the calculations when i get home later, is it normal for the calculations to be off so much (56khz is 45khz) is this normal.

I don't think the calculations are off. You are asking us why your circuit is wrong and we are asking what you based it on. That's really all there is to it. Prove the calculations are right by presenting them for review and then we can rule them iut as rhe root cause of the problem, ( or not) .

raschemmel:
Write the formulas and calculations on a sheet of printer paper and post a photo of it.
(fyi, it helps if you have pin numbers in your schematic but it's not mandatory) When you're asking for help it saves time if everything is labeled to reduce the number of things we have to look up.
The calculations are here.

You should show your work. It looks like your getting about 45 kHz.
I wouldn't use cheap ceramic caps like that. They're garbage. Get some decent caps. (5%)
You should increase the cap value and reduce the resistor values.

raschemmel what capacitors would you pose as an alternative to ceramic capacitors.

Google "0.0001 uF , 5 % capacitor"

I said I wouldn' t use "cheap" ceramic caps.
If you Google the above what you get is "good ceramic" caps from "good" manufacturers (like Vishay).

There's "cheap" hamburger" and there's " good hamburger".

It's the "5% " that screens out the cheap "20%" caps.

Just for the record, if you can't afford "the good stuff", you reduce the resistor values and put potentiometers in series and calibrate the circuit by adjusting R! pot for Time HIGH width and R2 pot for Time LOW width.

My values are...
R1 18K
R2 120K
C1 0.0001uf

Time Low (Seconds) T2 = 0.693 * R2 * C1= 0.693 * 120000 * 0.0001uf= 83160

Time High (Seconds) T1 = 0.693 * (R1+R2) * C1 =0.693 * (18000+ 120000) * 0.0001uf =0.000095634

Time Period T = Time High + Time Low = 0.693 * (R1+2R2) * C1 =0.693 * (18000+ (2120000) ) * 0.0001uf = 12474.000016632

[ (R1+R2) * C1 ] = 0.0000138

The problem is that due to the high frequency, C1 is very small (0.NNNPPP uF) | where "N" = nano and "P" = pico (F)
0.0001 uf = 0.1 nF = 100 pF

When you get down to that small of value cap your better off with Mylar.

In general film/poly/mylar caps are the best to have on hand.
Ceramic caps are fine for small values like anything in the pf range.
Silver mica is good for pf caps as well. Some say better...

Film/poly/mylar caps are said to be "smooth".
Ceramics are more "open" sounding but can be "gritty" in some applications.
As mentioned above, using film/poly/mylar is a good general cap to use.
John Lyons

In my mind, this is a perfect application for Mica caps.
mica-capacitor-300x300.png

If I were in the lab at work and the engineer gave me your schematic and said "build it"
I would walk right over to the Mica component cabinet without hesitating.

There is nothing wrong with a "good" ceramic cap but there are other materials available. (at a price)

Vishay Caps

Picking Capacitors
(the older "gurus" will recognize the author's name (Walter Jung)

Capacitors Tutorial

0.693 * (18+120) * 0.0001 = 0.0095634

0.693 * 120 * 0.0001 = 0.008316
0.693 * (18+2*120) * 0.0001 = 0.0178794

Frequency = 1/Time Period 1/0.0178794 = 5.593028 or 55.9302hz

so change time period to 0.0000178794

and 0/0.0000178794 = 55930.288 or 55.930khz

you can double check these on the online calculator below. this i why i linked to it 18k and 120k and 0.0001uf.

http://houseofjeff.com/555-timer-oscillator-frequency-calculator/

My Calculations

Time High (Seconds) T1 = 0.693 * (R1+R2) * C1 =0.693 * (18000+ 120000) * 0.0001 uF =0.0000095634

Your Calculations
Time High (Seconds) T1 = 0.693 * (R1+R2) * C1

0.693 * (18+120) * 0.0001 = 0.0095634


My Calculations

Time Low (Seconds) T2 = 0.693 * R2 * C1= 0.693 * 120000 * 0.0001 uF= 0.000008316 S

Your Calculations
Time Low (Seconds) T2 = 0.693 * R2 * C1

0.693 * 120 * 0.0001 = 0.008316

( 0.0095634 + 0.008316 = 0.0178794 => 1/0.0178794 = 55.9302884884280233117442419768 Hz)

My Calculations
Time Period T = Time High + Time Low = 0.693 * (R1+2*R2) * C1

0.693 * (18000+ (2*120000) ) * 0.0001 uF= 0.0000178794 S

(f = 1/P = 55930.2884884280233117442419768 Hz)

time HIGH + Time LOW = PERIOD
Time Low (Seconds) T2 = 0.693 * R2 * C1
0.0000095634 + 0.000008316 = 0.0000178794 S
1/0.0000178794 S = 55930.2884884280233117442419768 Hz

Your Calculations
Time Period T = Time High + Time Low = 0.693 * (R1+2*R2) * C1

0.693 * (18+2*120) * 0.0001 = 0.0178794

(FYI, 1/0.0178794 /= 55.9302884884280233117442419768 Hz)

Notice anything ?

This will output 56kHz on pin11 of an Arduino.

Time/Div = 5 uS

Looks like 56 kHz to me.

Hello, im back and have spent out £12.00 on RS components "Back Order" mica capacitors with 1% tolerance and 100pf and added an addition of a 1% 5k multi turn variable resistor in place of R1 so i can vary the frequency for tuning it.

C1 = 100pf/0.0001uf, R1 = 15k + 5k variable, R2 = 120k

however i am still getting nowhere near the frequency im striving for and its really getting to me.

I am fairly new to electronics practically however understand the principles mostly but i cant understand whether i have a dodgy scope ("cant afford a new one") or its my breadboard leads ("ordering tinned wire leads monday") or i just cant do electronics.

i have tested with a ne555 and now tlc555ip and LMC555CN and all yeild almost the same results.
My next options are await another few weeks for the tinned wire to reduce capacitance within the wires, buy a frequency counter from ebay and use it for testing encase of a dodgy scope, also my variable resistor made little to no difference to the frequency being generated when adjusting im not sure ive wired it right its a 3 pin and i only used 2 as in google images of them.

Images attached and please excuse the breadboard wiring i have actually lost most of my breadboard wires ("MRS") recently had to make do with what i had but i had previously tested with albeit some of those other long ones you see in the picture.

Your 555 circuit has no decoupling on the supply to the '555, its needs decent decoupling,
just like every other chip. In fact it needs more than most due to the '555s questionable
design (shoot-through of 100mA on switching, or something like that - according to Horowitz and Hill)

The CMOS versions of the '555 are always to be prefered, like the 7555, lower leakage, lower
supply consumption, no shoot-through, wider supply voltage.

Also where did you get this '555? Is it a genuine chip or a knock-off from eBay perhaps?

Why do you want 56kHz? and to what accuracy and stability....?

If you want something better than 1% there are better methods..

regards

Allan

ps raschemmel - nice to see you back - missed your ascerbic posts

Hi,
With the scope connected and circuit operating, does the frequency change if you move your hand around the components?
0.0001uF is very small to use in a circuit in breadboard and still be viable as a 0.0001uF or .1nF or 1000pF. 100pF.

The fact that you are getting a lower output frequency seems to show extra capacitance.

How much variation in frequency do you get with your 5K trim pot. max and min frequency.

Adjusting R1 has the least effect on frequency, you may need to go to 8K2 in place of the 15K.

Thanks.. Tom.... :slight_smile:

Can you check the calibration of the scope? Measure a known frequency and see the scope agrees.
Like the power line, or create a known frequency with an Arduino and see what you get.

Post#4.

That sketch outputs very close to 56Khz.

Why don't you use that.
Leo..

Why not use an ATtiny85 ?

MarkT i have ordered all parts minus the jumper cables from RS components however i brought today some 0.6mm solid core cable that i have used to rebuild the circuit, i have looked in to a decoupling capacitor and tried with a 10nf capacitor with no difference to the output frequency.

AllanHurst i need 56khz for a carrier frequency for a tsal6100 infrared diode i am using this for a number of reasons including cost and reduced programming however i dont really want to get in to possible alternatives and applications.

TomGeorge i dont get any change in frequency with my hand near it but if i touch it the insulated jumper wires it does add 1khz to the output frequency roughly also the trimpot isnt actually making any difference no matter how much i adjust it i only get about 0.5khz i have checked all leads with a multimeter for continuity aswell so no fault there.

CrossRoads i checked my scope today using its built in 1khz test connection and it was fine so dont think its that.

Wawa its become more of a mission to complete this circuit right now there is nothing worse than making something that doesnt work and not being able to understand why.

i have tested again with shorter cables 0.6mm solid core and a 10nf decoupling capacitor i am still getting roughly 47.62-48.72khz :S

Attached images, i have just checked the resistance of the resistors aswell i think i am running out of things to try the calculators online all say the actual frequency should be within 1% so the calculations should be right i have checked on multiple including my own math.