Portable Low Frequency square wave generator circuit - Solved - page 3 - Page 1
Forum section: electronics / beginners

author: Laszlo
author_rank: Contributor
timestamp: January 26, 2019, 08:22:34 pm
content: Hi,I am a locomotive test engineer and I could use a portable square wave generator which could output a 12Vp-p square wave from 1 to 1000Hz, with an input impedance of 50ohms and of course 50% duty cycle. Reason being, with that signal some trainborne equipment, can be tricked to believe that the loco is running (speedo, WSP etc..)So I tried relentlessly with my zero electronics knowledge to build up a circuit using a 555 timer ic with very little success. - I could only produce signals with positive peaks, and couldn't get the ac coupling to work, also the best I could achieve is 53% duty cycle. (https://mintelectronics.wordpress.com/2012/06/17/squarewave-generator-using-555/) - Using this circuit.Tried an LM741 op-amp, but hey, I couldn't even figure it out how to power it up with the dual PSU.So I gave up and bought this DIY sig gen kit from aliexpress, which works like a charm, but it has an input impedance of a whopping 800 ohms plus. Also, I doubt that it would be beefy enough to provide enough current for my line of work.My question is whether anyone on this forum knows about a working circuit which I could utilize to build my little project.All answers are much appreciated.Laszlo

author: nsrmagazin
author_rank: Regular Contributor
timestamp: January 27, 2019, 07:37:29 am
content: What is the tolerance on the frequency, duty cycle, voltage and current?See the circuit for "50% Duty Cycle Astable Oscillator" or "Improved 555 Oscillator Duty Cycle".https://www.electronics-tutorials.ws/waveforms/555_oscillator.htmlWith opamps its the easiest.https://www.electronics-tutorials.ws/opamp/op-amp-multivibrator.htmlCan not be done with a single timer555 IC. The timer has a maximum output of "15VDC"(real "12VDC"). Is using a microcontroller an option? It will be easier to switch a transistor or should I say 2 complementary transistors.Last option is a H bridge(most commonly used, hardest and best).This thread summarizes the opamp option:https://www.edaboard.com/showthread.php?292062-Dual-polarity-square-wave-generator

author: beanflying
author_rank: Super Contributor
timestamp: January 27, 2019, 08:14:56 am
content: Few questions. Does it need to be portable or do you have a voltage source available, if you have a source what is it?I am getting the idea you are looking for +-6V or 12p-p because you use the term ac coupling? Or do you mean you want a 0-12V pulse? Not a big deal either way but it does matter.To keep it simple and the explanation too (until you give a few more details) an arduino micro with a display of some sort (if needed) driving an output Transistor or FET would give you maximum variation and simple electronics. Now we need to know your power supply options and the output you needThe dead simple version with no bells and whistles (bad train pun) is a multivibrator such as in this linkhttps://www.electronics-tutorials.ws/waveforms/astable.htmlOr re look at the 555 option depending on those couple of questions.

author: spec
author_rank: Frequent Contributor
timestamp: January 27, 2019, 10:40:30 am
content: Quote from: Laszlo on January 26, 2019, 08:22:34 pmHi Laszlo,(I have taken the liberty of altering your original post(OP) above, about inputs and outputs, to express what I think you intended.)You could use a 555 or possibly the Aliexpress signal generator to do your job, but it sounds like you would need to add an output driver circuit, which is quite straight forward. But as has been stated, we need to know what power source you are using, battery or mains, I would guess battery in view of the application. Also, we need to know the positive excursion and negative excursion of the output waveform required from the signal generator. I take it, from what you say, that the input impedance of the units under test (UUT) is 50 Ohms.Quote from: Laszlo on January 26, 2019, 08:22:34 pmYes: once we know your requirements, we will be in a position to post a complete circuit that will do your job nicely.

author: Zero999
author_rank: Super Contributor
timestamp: January 27, 2019, 11:21:53 am
content: Quote from: Laszlo on January 26, 2019, 08:22:34 pmI think you've got your impedances mixed up. Don't you mean you need an output impedance of 50Ω?You need some sort of buffer to get the impedance down to the desired level. The TC4420 will do. It has a much lower output impedance than 50R so will need a series resistor on the output.https://ww1.microchip.com/downloads/en/DeviceDoc/21419D.pdfAdd the MOSFET driver IC to your existing signal generator or build your own using a microcontroller or Schmitt trigger. Another possibility is to build a higher frequency astable and add a frequency divider to get exactly 50% duty cycle.

author: Laszlo
author_rank: Contributor
timestamp: January 27, 2019, 04:50:02 pm
content: Hi All,Apologies for mixing the in and outputs. How foolish. Also, I should have been more precise with the specs so here it is as it follows:Amplitude = 12vp-p (+6V -6V )Output current = 400mAAdjustable from 1Hz to 1kHzOutput impedance 50 OhmsSource voltage - can be anything I was hoping it could be done via 2 standard 9vdc batteries. But again, as long as it is reasonably portable I don't mind attaching it to any sourceTolerance of frequency is negligible.Tolerance for duty cycle is +-5%.Tolerance for voltage is not really good, basically, the output has to be 12Vp-p or slightly higher otherwise the equipment won't recognize the signal.Unfortunately, the equipment under test is an ancient WSP kit on HST locos, and I haven't got a drawing for it (nobody seems to have it as far as I am aware). So all the above-mentioned specs have been measured by me. Using a multimeter in series to monitor the current, and adjusting the sig-gen to see when does it stops reacting to the input signals.Back in the olden days when the equipment was new, they used to use an op-amp based test equipment powered by two 9Vdc batteries with an output voltage of 18Vdc, but it won't work anymore as it has been modded to an unknown extent.I looked at all the suggested the methods, the microcontroller seems to be promising. I think the 555 won't be good because of the limited output current. The op-amp also sounds like a good solution however, I honestly can't get my head around the dual power supply thingy.In fact, I attempted building that circuit twice by using two 9Vdc batteries and an lm741 but could not get it to work. I am so advanced, I can't even get my head around of how to limit the 18V source voltage to 12V.Don't get me wrong, I can build just about anything provided I have a detailed drawing, it is just the lack of understanding which stops me most of the time.Thanks again for the help and links.

author: Kleinstein
author_rank: Super Contributor
timestamp: January 27, 2019, 05:30:58 pm
content: With the Ne555 or similar the frequency accuracy would be not very good, so maybe 0.5-10 % depending on the adjustment (pot / multi step switches). If much better accuracy is wanted a digital setting (e.g. via µC) is probably the way to go. There are relatively affordable (e.g. $50-100) Chinese DDS generators (e.g. up to 10 MHz) available, that might be possible to convert battery operation.The output specs still don't make much sense:A +-6 V output with 50 Ohms would deliver some 120 mA (if the 6 V are no load) or 240 mA max. (if the +-6 V would be with 50 Ohms load and thus +-12 V open circuit).Even this power level is too much for 9 V block cells. An would more like call for some 10-20 AA cells or maybe some 18650 cells.With a divider at the output the duty-cycle would naturally be very close to 50% - so no problem here. For the low frequencies a divider would be the easier way anyway. So instead of a NE555 I would consider a CMOS4060 chip, which is a simple oscillator and divider in a single chip.The output driver would likely need to be separate anyway. Here some gate driver chips are a possibility. Alternatively a high power OP might work, especially if the 50 Ohms are realized only virtually to save on the power.

author: Zero999
author_rank: Super Contributor
timestamp: January 27, 2019, 05:41:09 pm
content: Quote from: Laszlo on January 27, 2019, 04:50:02 pmThat still doesn't add up, I'm afraid.Output current of 400mA, at +/-6V with an impedance of 50Ω doesn't make any sense because it violates Ohm's law I = V/R = 6/50 = 120mA.You also won't get that kind of current from a little 9V battery for long.What do you mean by tolerance for frequency is negligible? Does that mean it's critical or not important? Tolerances are normally specified in a fraction of the total value, usually a percentage, so a 1% tolerance at 100Hz, is an absolute tolerance of +/-1Hz.Since this is going to be powered off a single, isolated power supply and it's working at a low frequency, then you could have a bridged output and a power supply voltage of 6V.

author: StillTrying
author_rank: Super Contributor
timestamp: January 27, 2019, 05:50:58 pm
content: I use one of these cheap junk things.https://www.eevblog.com/forum/beginners/diy-power-supply-129692/msg1720169/#msg1720169Its output is a transistor with 1k pull-up visible on the back, you'd have to arrange the 50R and +/- output yourself.

author: Zero999
author_rank: Super Contributor
timestamp: January 27, 2019, 07:38:19 pm
content: Use a low-dropout regulator to get a stable 6V from the battery and a MOSFET driver with an inverting and non-inverting output and some resistors to shift the output of your oscillator to +/-6V.One of the outputs can be connected to your circuit's 0V and the other to its input. This will only work if the power supply and signal generator are isolated from the circuit under test.

author: Laszlo
author_rank: Contributor
timestamp: January 27, 2019, 10:59:08 pm
content: Hi, as per zero 999 states, the 400mA current is rubbish. I don't know how I measured that with my calibrated DM.The frequency output needs to be accurate to +-5% to simulate reasonably accurate speed.I know it sounds absolutely dreadful, but I do need a circuit diagram of the whole thing as I have already tried to mesh a few things together with very little success (so far I killed 2 555 timers and my first lm741 had literrally burn't out once i plugged the positive end of the psu)Do you think that the improved 555 timer desing which had been linked would be good enough for this? But again, how would I ac-couple the output of that, and how could I make that adjustable so it would keep its duty cycle?

author: rhb
author_rank: Super Contributor
timestamp: January 27, 2019, 11:29:07 pm
content: I'd like to suggest you consider an MSP430G2 LaunchPad with Mecrisp forth loaded on it driving a suitable solid state switch. Super simple to program if you follow the PWM example in the README. Cheap too.

author: Zero999
author_rank: Super Contributor
timestamp: January 27, 2019, 11:50:03 pm
content: Quote from: Laszlo on January 27, 2019, 10:59:08 pmI agree, you need a complete schematic. You can stitch one together, once you have all of the building blocks in place.The problem with the 555 timer is it's difficult to get a 50% duty cycle output. Your best bet is a CMOS variant, such as the 7555.Another option is an astable with a divider to give a square wave. See attached for an example using the 4013 to 74HC74. The potentiometer sets the frequency and the switch changes ranges. I suggest you have at least two, say 1Hz to 30Hz and 30Hz to 1kHz, is getting 1Hz to 1kHz with one setting will be tricky.This schematic isn't quite complete, hence the lack of component designators. You'll probably need to alter the component values.

author: spec
author_rank: Frequent Contributor
timestamp: January 31, 2019, 09:59:29 am
content: HI Laszlo,Attached is a schematic for a pulse generator to meet your requirements:It is intended to be powered by a couple of mains to 12V, 1A or more, stabilized power supplies, which are available from many sources at quite a low price. Battery power could also be provided, if required.The frequency control is by a single potentiometer to sweep from below 1Hz to above 1kHz.Note that the 555 timer is a CMOS type- an ordinary 555 will not do.http://www.ti.com/lit/ds/symlink/lmc555.pdfhttp://www.ti.com/lit/ds/symlink/ucc21520.pdfhttps://www.onsemi.com/pub/Collateral/FDD3672-D.pdfhttps://www.onsemi.com/pub/Collateral/FDD3682-D.pdf

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 10:26:09 am
content: Quote from: Zero999 on January 27, 2019, 11:50:03 pmThere are several circuit designs with 555 timer that allow anywhere from 0% to 100% duty (with logical limits at both ends of the range) and there is no problem getting 50% duty cycle. OTOH it is easy to start with double the frequency and then divide by 2 and this results in 50% duty cycle exactly always and every time.This project seems like it could be done very simply with a 555 timer, powered with 6+6 volt split supply or with a single supply and decouple the output with a large capacitor. Insert 50 ohm resistor in line with output and that should cover it.Depending on where you are going to connect this device you might want to isolate it well, very well or really, really well.

author: Zero999
author_rank: Super Contributor
timestamp: January 31, 2019, 11:43:49 am
content: Quote from: spec on January 31, 2019, 09:59:29 amThe original poster wanted 12V peak to peak, not 24V, but that's an easy mistake to make, since it wasn't clear and it's trivial to reduce the supply voltage to +/-6V.R1 is a little on the low side. At 1k, the asymmetric resistances of the output transistors will contribute to the timing, taking the duty cycle away from 50%. It would be better to opt for a higher resistance, such as 10k and have a switch to select between two capacitors for two ranges, say 1Hz to 30Hz and 30Hz to 1kHz. This would also make sense from an ease of use perspective, as 1Hz to 1kHz with a single potentiometer would be quite difficult to adjust accurately, even with a ten turn pot.Quote from: soldar on January 31, 2019, 10:26:09 amIt depends on how stringent your 50% duty cycle requirements are. The CMOS variant isn't perfect, as the on resistance of the high and low side output transistors isn't symmetrical. Going from the graphs on the datasheet, when VDD = 5V and a junction temperature of 25oC, the P-MOSFET has an on resistance of 300R and N-MOSFET 60R. It's better if the impedance seen by the output stage is as high as possible.https://www.nxp.com/docs/en/data-sheet/ICM7555.pdfIn this case, a CMOS 555 timer is probably more than good enough, so long as the output isn't loaded too much. As mentioned above, it has an output impedance of well over 50 Ohm, so will need buffering: a 7555 + 50 Ohm resistor will not do! A MOSFET driver IC can be used to buffer the output.I'd probably go for a counter + divider IC such as the 4060. It can use a smaller, closer tolerance, higher stability capacitor and the ranges can be switched by changing between different divider outputs. The frequency could be varied between 500Hz to 16kHz, giving 31.25Hz to 1kHz on the Q3 output and 0.97Hz and 31.25Hz on the Q8 output. To take into account for component tolerances, set the oscillator minimum and maximum frequencies to be a little lower than 500Hz and higher than 16kHz: aim for 475Hz to 16.8kHz. Again it will need to be buffered, as the 4060 has far too higher output impedance.Lots of information about calculating the resistor and capacitor values can be found using a search engine.https://assets.nexperia.com/documents/data-sheet/HEF4060B.pdfhttps://www.brighthubengineering.com/diy-electronics-devices/123626-making-flasher-timer-oscillator-circuits-using-a-single-chip/https://dmohankumar.wordpress.com/2012/05/13/design-your-circuit-part-ii-cd-4060-timer/

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 12:17:18 pm
content: Quote from: Zero999 on January 31, 2019, 11:43:49 amYup. I am assuming "not too stringent". Again, a divider solves that issue if needed.Quote from: Zero999 on January 31, 2019, 11:43:49 amThe traditional bipolar version will source or sink up to 200 mA with a little voltage drop at each end which may be admissible or can be compensated with a bit higher supply voltage.In other words, you can make something better and more complex but if you want something quick and dirty which will work I think a single bipolar 555 will do it. A split supply of 7.5 + 7.5 volts and very few more components.I would make sure where it is being connected to because ... people.I use bipolar 555 timers because I have a stock of them enough to last me several lifetimes.

author: Zero999
author_rank: Super Contributor
timestamp: January 31, 2019, 01:28:45 pm
content: The split power supply should be asymmetrical to match the saturation voltages of the bipolar 555.How would you get the duty cycle to 50%, with an adjustable frequency from 1Hz to 1kHz, using the plain old bipolar 555?

author: spec
author_rank: Frequent Contributor
timestamp: January 31, 2019, 02:32:32 pm
content: Quote from: Zero999 on January 31, 2019, 11:43:49 amNo mistake. The output impedance is 50R forward terminated and the output voltage is +-6V8, as the OP informed me that he wants a little over 6V. The output voltage can be adjusted to any voltage from 2V to 12V by changing the two zener diodes at the output.

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 02:36:41 pm
content: Quote from: Zero999 on January 31, 2019, 01:28:45 pmBack to "not too stringent" because if we are talking "stringent" then, yes, there are better, more sophisticated, designs. I am guessing the input is for some counting circuit which is "not too stringent" and will accept a certain range. If we have strict requirements then we need a stabilized power supply because batteries will not do.Quote from: Zero999 on January 31, 2019, 01:28:45 pmWell, there are several circuit designs which produce a 50% duty cycle and where the on time and down time depend on the same resistor, like50% Duty Cycle Astable Oscillatorhalfway down the page. Vary R2 and the period changes but the duty cycle shouldn't.Again, this is a quick and simple solution, not the best or most sophisticated. I think it would be enough for this type of application though.

author: spec
author_rank: Frequent Contributor
timestamp: January 31, 2019, 02:46:01 pm
content: + LaszloIf you are still around please look at your PM inbox.

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 03:00:06 pm
content: Quote from: Zero999 on January 31, 2019, 01:28:45 pmI would spread this over three switchable ranges because over a single range I think it is too much and you get not enough ability to set a precise frequency. 1 to 10 Hz, 10 - 100 Hz and 100 to 1000 Hz.

author: spec
author_rank: Frequent Contributor
timestamp: January 31, 2019, 03:17:26 pm
content: Quote from: soldar on January 31, 2019, 02:36:41 pmWhat a presumptuous fellow you are.As I have said before to all you armchair 'experts': Let us see yourcompletecircuit, embodying all these wonderful ideas that you have.

author: spec
author_rank: Frequent Contributor
timestamp: January 31, 2019, 03:33:05 pm
content: Quote from: soldar on January 31, 2019, 03:00:06 pmDo you really think that I haven't thought of all this stuff. I was hoping that the usability could be discussed with the OP. Anyway, if I had posted my circuit with range switching, that would have been a golden opportunity for you to say it is too complicated and expensive and it could be done with one pot and one capacitor.One thing that surprises me is that no one has commented on the circuits effect on global warming. After all there is a whole 1W2 being dissipated in the output stage.

author: spec
author_rank: Frequent Contributor
timestamp: January 31, 2019, 03:40:43 pm
content: What on earth is all this mark to space ratio stuff all about? The circuit as presented will meet the OPs requirement and that is it.There is no more to say. By the way the 555 is a CMOS type.Had I posted a circuit with a precision oscillator and exact 1:1 mark to space ratio, you could imagine what the comments would have been then ... to complicated- I would have done it with a 555.

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 03:46:55 pm
content: I would appreciate a little more politeness and less rudeness. I make a habit of trying to ignore rudeness because I prefer not to escalate.I have been working with 555 timers since before most people on this forum were born. In 1977 I was already using 555 timers and boughtThe IC Timer Cookbook(pdf) which I still have on my shelf. Around 1980 I was running a small home business with a friend building and selling timers for photography enlargers. A lot of people were developing their own photos at home and needed a timer for the enlarger. We sold maybe a thousand or two. I still have the circuit and PCB. Two scales: up to 60 seconds and up to 3 minutes.TheLM555(pdf) is bipolar and the mother of all later CMOS.

author: Zero999
author_rank: Super Contributor
timestamp: January 31, 2019, 04:24:54 pm
content: Quote from: spec on January 31, 2019, 02:32:32 pmThe original poster didn't actually say 12V peak to peak into a 50 Ohm load. They said 12V peak to peak with an output impedance of 50 Ohm. It's understandable you interpreted it as 12Vpp into a 50Ohm load, with an output impedance of 50Ohm. Indeed you could be right, as the original poster wasn't very clear.Quote from: spec on January 31, 2019, 03:40:43 pmExcept the mark space ratio will not be 50% at 1kHz, because the value of R1 is so low the on resistances of the 7555's internal MOSFETs will skew the duty cycle considerably. The output stage inside the 7555 is not perfect. The output transistors have asymmetrical on resistances. The high side transistor's resistance is between 1k and 150R and low side transistor's resistance between 143Ohm and 16Ohm, depending on the supply voltage to the 7555. The higher the supply voltage, the lower the on resistances.I worked out the resistances, using the figures given on the graphs on pages 6 and 7 of the datasheet.https://www.nxp.com/docs/en/data-sheet/ICM7555.pdfThe on resistances with a supply voltage of 12V are not specified. Suppose high side is 200R and low side 30R. The capacitor will be changing via R1+200R = 1k2, which will take longer than discharging via 30R+R1 = 1k03, so the duty cycle won't be 50%.I understand you felt personally attacked when I made this assertion but it was not my intention. It is something which is easily overlooked. Please build a 7555 oscillator, with 50% duty cycle configuration and a 1k timing resistor and you'll see what I mean. Note how the duty cycle is nearer to 50%, when the power supply voltage is 18V, than it is at 2V, because the on resistances of the output transistors are lower and contribute less to the timing.A much higher value for R1, say 10k, could be selected to make the duty cycle much nearer to 50% and use a much smaller capacitor, but then the potentiometer would need to be 20M, to get down to 1Hz and the current so low it would be prone to noise, hence why I suggested different ranges.

author: iMo
author_rank: Super Contributor
timestamp: January 31, 2019, 04:43:50 pm
content: This is probably the simplest wiring which could work.It gives you aprox +/-6V at the output, you may set the frequency and 50% duty by the 2 pots.You need a switch for frequency range selection.You may play with the values, I think 50k lin pot in freq and duty is ok, the values selection for the capacitors - the calculation is left to the readers..You need the NE555 (not the CMOS) when required 50ohm output.C1-C4 should be foil capacitors (for highest stability use quality one, ie. WIMA for 63V).The C7 is an elyt 100uF/25V.No warranties of any kind, use at your own risk

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 06:32:37 pm
content: Zero999, the OP is kind of confusing and contradictory even but I get the idea that this is to simulate some speed signal sent by some transducer on a train and I feel quite safe assuming there is quite some latitude in voltage, duty cycle, etc.imo, that looks good.

author: iMo
author_rank: Super Contributor
timestamp: January 31, 2019, 06:50:05 pm
content: I do not know how is it with trains in UK, but the trains in EU are mostly fully controlled by computers. Last summer we were standing in the middle of nowhere for 3 hours because a faulty "door sensor" in one of carriages sent an "open door" signal. And the loco driver did anything with that as the computer said "no-go". So I can hardly imagine you can fool an locomotive such easily

author: soldar
author_rank: Super Contributor
timestamp: January 31, 2019, 07:00:58 pm
content: imo, if you read the OP you will read that is exactly what he is trying to do.

author: Zero999
author_rank: Super Contributor
timestamp: February 01, 2019, 11:13:34 am
content: Quote from: spec on January 31, 2019, 03:33:05 pmGood point. It's being powered from a small battery, so 1.2W of idle power consumption is a killer.Quote from: spec on January 31, 2019, 03:17:26 pmWe tend to avoid posting complete circuits here, as it discourages people from thinking. It's often more helpful to post hints and little circuits which the original poster can put together, that way they gain a deeper understanding of how it works, rather than some soldering practice.Quote from: spec on January 31, 2019, 03:40:43 pmWhat on earth is all this dual supply rail stuff about?Only one power supply is needed. The trick is to float it. I didhint on this earlier, but I forgot this is the beginners section so should have posted a schematic.50% duty cycle is achieved by replacing the usual pull-up resistor on the discharge pin with a transistor driven from another 555 (Q1) which inverts the signal, so it's pulled all the way up to +V when charging. If a bridged output isn't needed, the other 555 could be replaced with an NPN BJT, with its base connected to the 555's output via a suitable current limiting resistor. Of course in real life, a NE556 dual timer could be used to save space.One thing to note is the simulation says it outputs +/-9V, but this doesn't represent reality, since the model doesn't mimic the NE555's output stage very accurately. The output voltage will be a little less, much closer to 6V, especially when loaded. It may be necessary to power the circuit from two 9V batteries and a regulator, as the battery voltage will fall, as it discharges. Heck, I'd consider swapping the 9V battery for some AA cells, which have a higher energy density.

author: soldar
author_rank: Super Contributor
timestamp: February 01, 2019, 11:48:09 am
content: Quote from: Zero999 on February 01, 2019, 11:13:34 amLet me expand on this. This is not a free service where people work for you for free and provide you with turnkey solutions. We are here to help and learn from each other. If you want a turnkey solution you can go hire some engineer and pay them the going rate.Furthermore, many requests are poorly defined, poorly presented and poorly explained or even contradictory. Often getting further clarification from the OP is a slow and painful process, somewhat like pulling teeth.We could be here presenting solutions for days only to have the OP disappear (often happens) or reject different solutions on different grounds (to complicated, too expensive, not fulfilling needs which were not mentioned before, etc).So we take what we are given and kick ideas around and learn from others' ideas and viewpoints. That is the way I see it.

author: Zero999
author_rank: Super Contributor
timestamp: February 01, 2019, 01:03:10 pm
content: I think the OP has gone, but who cares? This is interesting.Has anyone actually tried building the 50% duty cycle 7555 circuit before?I thought I'd breadboard it. I aimed for 1.53kHz, and tried the following values for R and C: 1k & 470nF, 10k & 47nF and 100k & 4.7nF. Firstly I tried using a 5V supply, which I increased to 15V.The results were interesting. Even the 100k and 4.7nF combination didn't give exactly 50% duty cycle.Schematic.R = 1k, C = 470nF, V = 5V56.3% dutyR = 1k, C = 470nF, V = 15V51.7% dutyR = 10k, C = 47nF, V = 15V48.4% dutyR = 100k, C = 4.7nF, V = 15V48.2% dutyConclusion: if the duty cycle is critical, then don't use the 7555!

author: Zero999
author_rank: Super Contributor
timestamp: February 01, 2019, 01:28:41 pm
content: I thought that wasn't very good, so I tried a different brand IC which gave better results. The ICs used in my previous test were Philips brand. The ones I used for this test were Intersil. Due to time constraints, I didn't bother repeating all of the tests, just the 1k & 470nF and 100k & 4.7nF with a supply voltage of 15V.R = 1k, C = 470nF53.3% dutyR = 100k, C = 4.7nF49.7% duty

author: soldar
author_rank: Super Contributor
timestamp: February 01, 2019, 01:51:30 pm
content: I remember building decades ago a pulse generator which could go from (say) 1% to 99% duty cycle and voltage from something like 5 V to about 15 V. It was for lab testing some devices and it was simply a 555 with a variable voltage supply and the supply was little more than a pot voltage divider with an emitter follower transistor. Put it all in a nice box and it felt like it was something. I was working for Kodak at the time and my co-workers looked up to me like I was a genius.But, yes, the 555 timer is not a precision thing. Changing one thing , like supply voltage, will affect the others. It is good for simple, quick and dirty solutions.

author: Zero999
author_rank: Super Contributor
timestamp: February 01, 2019, 11:11:36 pm
content: I wonder if the first 7555 was faulty, or is that kind of error normal? I just don't have the time or motivation to test a whole load of ICs.

author: nsrmagazin
author_rank: Regular Contributor
timestamp: February 06, 2019, 03:02:13 pm
content: Here is the power supply:http://powersupply33.com/simple-split-rail-power-supply-lm380.html/split-power-supplyFor "Vin" you have 2x"9VDC" batteries in series.Here is the circuit itself for what you need.http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/square.htmlMaking the resistor a pot gives you varying frequency.The tolerance will depend on the components used. Recommended are "1%" tolerance resistors.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 03:59:32 pm
content: Quote from: soldar on January 31, 2019, 03:46:55 pmIn that case, you should practice what you preach. And you did escalate.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 04:06:55 pm
content: Quote from: soldar on January 31, 2019, 03:46:55 pmIt doesn't matter what you have done or what you are. That does not grant you the right to make derogatory unfounded statements about other peoples designs.Just for the record, I have been designing circuits since before the 555 was even thought of. In fact I had a 555 chip before they were released in the UK.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 04:12:45 pm
content: The OP requested a circuit and out of all the posts on this thread, there is only one circuit has been posted- guess which one.Quote from: Laszlo on January 26, 2019, 08:22:34 pm

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 04:26:51 pm
content: Quote from: Zero999 on January 31, 2019, 04:24:54 pmYour missing some very important points.The OP does not want an exact 1:1 mak-to space ratio so what figure are you using to justify your negative comments about the MS ratio?You have made general and sweeping statements about the MS ratio with a few figures quoted but no complete calculations for the M/S rationYou have not taken into accout the end resistance of the 2M potentiometer which adds to the effective resistance seen by the C555And worst of all you have failed to realise that the 1k resistor is a stopper so that the lowest resistance possibly seen by the C555 output is defined. If you do the calculations you will find that oscillator reaches 1KHz (the highest frequency requirement) well before 1kHz is reached.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 04:30:55 pm
content: Quote from: soldar on February 01, 2019, 11:48:09 am

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 04:36:51 pm
content: Quote from: Zero999 on February 01, 2019, 11:13:34 amYour making this up. The OP said it could be mains powered.Besides which, 2W2 is no big deal, even for battery power.

author: soldar
author_rank: Super Contributor
timestamp: February 06, 2019, 04:39:49 pm
content: Quote from: spec on February 06, 2019, 04:06:55 pmI have no idea what your problem is with me since all my posts in this thread have been cordial exchanges withZero999and I have not once in this thread addressed or responded to your posts or made any comment about them. I do not understand your attitude and I have no idea why you called me "presumptuous". I don't know if you are mistaking me with someone else from some other thread or what. I have made no comments on anything you have said in this thread or, as far as I can remember, in any other thread.I have reported your posts in the hope that you will just leave me alone.E.T.A: I see you also have a beef withZero999. Are you sure it's us? Maybe you are just misinterpreting people's motives? Why the confrontational attitude?

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 04:44:34 pm
content: Quote from: Zero999 on February 01, 2019, 01:03:10 pmYou keep raising a flag and saluting it. There is no requirement for an exact 1:1 M/S ratio. If it were required I would have done it- it's dead simple to do.Then, of course you would be able to bang on about a 1:1 M/S ratio not being required and the circuit is too complicated.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 05:10:52 pm
content: Quote from: soldar on February 06, 2019, 04:39:49 pmJust read my posts and reply to them specifically and directly. That is the way that things are resolved.I have no beef with anyone- just what they do or say. I just posted a schematic and you and zero99 have been making unwarranted negative comments about it, continuously, implying it is not up to the job. I didn't want to waste time replying to all the comments, but have been forced to do so.And the final killer is that you and zero99 are now implying that there is something wrong with posting a schematic to meet the OP's requirement. By the way, if I hadn't posted the schematic, this thread would have died, as many others have.I would welcome a constructive discussion about any schematic that I post, especially about an error. But the whole tone has been dictatorial and negative ... and in error.I would appreciate it if you could stick to facts, as posted, and not go in for gratuitous personal innuendo.

author: Zero999
author_rank: Super Contributor
timestamp: February 06, 2019, 05:40:13 pm
content: Quote from: spec on February 06, 2019, 04:44:34 pmIf it's that simple then why not do it? TheCD4013 circuitI posted previously would do that. It doesn't take much imagination to connect it to a suitableMOSFET driverto give the required +/-6V out.Quote from: spec on February 06, 2019, 05:10:52 pmNo, we just pointed out that it has room for improvement. Part of the problem is the original poster's requirements were ambiguous. He said he wanted something portable andpreferably battery powered.No one forced you to do anything.No we didn't, by all means please do post schematics. I'm certainly glad you posted the schematic because it prompted me to breadboard the 7555 astable to see how well it meets the 50% duty cycle criteria.No, you're clearly not interested in what anyone has to say about the circuits you post. The tone of this thread was cordial, untilyou started getting defensivein response to some polite feedback on the circuit you posted.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 05:49:25 pm
content: Quote from: Zero999 on February 06, 2019, 05:40:13 pmHere we go again... on and on- you just never let go do you. I asked you a while back to get off my back- can you please do so.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 05:54:48 pm
content: Just for the record I tried to avoid all the negative statements about the circuit, but it got so intense and extended that I had to counter it. I don't care, but the problem is that others, who don't know about design, who read this thread will think that the comments you have been making are relevant and that the circuit is no good. This has happened quite a few times on other threads.Another thing to remember is it is not your prerogative to tell members how to design or demand that they do this or that. As far as I know you are just a member, like everyone else. For example, if I want to use split supplies- and I have good reason for doing so- I will. I don't need your approval. You will notice that I have made no derogative personal remarks about you, just about your posts.This is all a great shame, and it is an even bigger shame that Soldar got mixed up in all this, because I know that you are interested in electronic design, and you have some great ideas- I have said so, but it is the nature of your posts and the fact that you will not see reason in many cases, that is the problem.

author: soldar
author_rank: Super Contributor
timestamp: February 06, 2019, 06:21:45 pm
content: Quote from: spec on February 06, 2019, 05:10:52 pmI have no idea WTF you are on about because I have made no comments at all about you, your circuits or anything or anybody related to you. Nothing. Zero. Really. I have not attacked you, I have not criticized you or your circuits or your posts. You are either mistaken or delusional. You are imagining things and you really need to calm down and read the thread objectively. Or just stay out of it if you can't do that.

author: spec
author_rank: Frequent Contributor
timestamp: February 06, 2019, 06:38:00 pm
content: Quote from: soldar on February 06, 2019, 06:21:45 pmYou keep saying that you have no idea what I am on about- you can't have read this thread or you are being deliberately obtuse.More gratuitous personal attacks from you- who was pleading good manners just a few replies previously. As I said before, try and stick to the information in the posts- and stay calm and focused.By the way, I just remembered: on a previously thread I politely commented on one of your posts- your reply was reactionary and less than polite, so it seems that you do not practice what you preach.If I had stayed out of this thread there would be no circuit and thus no discussion and this thread would have died many posts ago.You will notice that I have said nothing about Zero999 and you staying out of this thread and perhaps let some others get a word in.

author: Simon
author_rank: Unknown
timestamp: February 06, 2019, 07:15:52 pm
content: Spec, we have already discussed the situation at length. Not everyone that sticks circuits on forums and tries to be helpful is necessarily right all of the time and I think the forum tires of your ego and inferiority complex as do I now! please don't offer advice if you can't take critique.

author: Zero999
author_rank: Super Contributor
timestamp: February 07, 2019, 04:18:46 pm
content: All right, since my name has been mentioned, I'll make one more post in this thread. No doubt if Simon thinks it's inappropriate he'll delete it.Quote from: spec on February 06, 2019, 05:54:48 pmIf you reread this thread with a non-defensive mindset, you'll find that Soldar and I said that your circuit adequately meets the original poster's needs, so long as their requirements regarding duty cycle are not stringent, which we both assumed to be the case.Please accept that any circuits you post will often receive some critique, both valid and invalid, which is not against the rules of this forum, so long as it's conducted in a polite and respectful manner, as has been the case here. Responding to invalid criticism is perfectly fine too, again, as long as it's done in a polite and respectful manner. Responding in a defensive and rude manner is frowned upon here and going by the moderator's response, appears to be against the rules.Bear in mind that not everyone is an expert. Someone may think something doesn't look right, when in reality it's fine. Quite often a design will meet the requirements, but some will get carried away suggesting improvements, which aren't absolutely necessary. This is good because it might raise points which others may not be aware of. For example in this case, I got carried away striving for perfect 50% duty cycle, which I agree is not needed here and in the process raised the point about the asymmetry of the 7555's output stage. Perhaps you were already aware of this, maybe not, but in either case, I'm glad I raised the issue, as there will certainly be some people reading this thread who are unaware of it. I also discovered myself how poor the accuracy of the 7555 is when breadboarding it.The 555 timer is often seen as the first IC of choice for many applications, especially by newcomers. Unfortunately, in reality it very rarely is the best solution to a problem. Isn't very beginner friendly, especially the old TTL version, with all its quirks such as drawing huge current surges, therefore requiring very good decoupling. Again, I'm not telling you not to use the 555, just that it has its shortcomings, which I'm sure you're already aware of. In this case the high output current capability is attractive, as it can be made to source/sink the full output current, if necessary.No one is telling you how to design a circuit or making any demands. You cite my comment about split supply rails, but I was merely suggesting an alternative approach, not mandating anything. There are always multiple ways to solve a problem. You may post a design which solves the original poster's problem, but it's highly unlikely that it will be the only way of doing it and it may not be the most efficient or best way.It's a great shame an interesting technical discussion has degenerated into personal attacks and apologise for my part in it. If you feel any comments or critique of your circuits is conducted in a rude and disrespectful manner please report it to the moderator. You might also want to consider sending them a private message, before doing this, in the hope it can be resolved in a peaceful manner, rather than raising it on the public forum.

author: Laszlo
author_rank: Contributor
timestamp: March 29, 2019, 08:49:28 pm
content: Wow.Thank you very much for all of you for providing the circuits. I will try and build them all and report back to you. Please forgive for the super late reply but my schedule was horrendous with Uni/Work/Family.BTW;For those who think that you can't bypass the modern electronics;This test is quite routine when testing different speedo's. Whether it's fully computerized or not. You would be surprised what else you can do with some well-placed link boxes and some ingenuity. You just need to understand the circuits.I will post some pictures once it's all complete.

author: Laszlo
author_rank: Contributor
timestamp: May 27, 2019, 09:19:44 am
content: In case anyone is still watching this thread, or ever needs a solution for a problem similar to this question. I've built these circuits but for one reason or another I ended up making up my own. I've tested it and it does work on the field. Please see the drawing below in case you want to build one as well.The duty cycle is in between 49-54%. Max frequency is depending on the pot you are using on the IC side.The input voltage depends on how you set the 5k pot on the voltage regulator. You should ensure that the output on the regulator never goes higher than 16V (unless you like blowing things up)Mine works with two 9V batteries in series.Thanks for all the input.

author: StillTrying
author_rank: Super Contributor
timestamp: May 27, 2019, 10:52:33 pm
content: Quote from: Laszlo on January 26, 2019, 08:22:34 pmHow do you getsquarewaves passed the 0.1u and 22k.

author: Laszlo
author_rank: Contributor
timestamp: May 28, 2019, 06:34:59 am
content: The reason why that capacitor is there is because the rig I'm connected to keeps loosing the signal unless the output goes through the series capacitor.I just tested it again and it's the same. Probably because it needs less dc component in the signal?Do you think there is something wrong with the circuit?Cheers,Laszlo.Sent from my S60 using Tapatalk

author: Simon
author_rank: Unknown
timestamp: May 28, 2019, 06:44:15 am
content: Yes there is a problem there. Try it in LTSpice and see what happens but with a series capacitor you will get a pulse on each transistion but then nothing for the rest of the duration until it changes state again.

author: Simon
author_rank: Unknown
timestamp: May 28, 2019, 06:58:31 am
content: this is what you get at 1Hz

author: Simon
author_rank: Unknown
timestamp: May 28, 2019, 07:00:01 am
content: and 1KHz

author: Laszlo
author_rank: Contributor
timestamp: May 28, 2019, 07:36:46 am
content: I'll try it in a minute. I have tried simulating the circuit in multisim but it was not having it at all. There was no output from the 555 timer.So you think that the series rc is not necessary?There is one question I also could not make my head around it. When I put a diode in series with the output, it distorts the signal to nothing. I've tried multiple diodes and it's virtually the same.Sent from my S60 using Tapatalk

author: StillTrying
author_rank: Super Contributor
timestamp: May 28, 2019, 09:38:34 am
content: Quote from: Laszlo on May 28, 2019, 06:34:59 amYes, it's probably looking for a + and - signal, and doesn't mind if it's square or pulses as long as it alternately switches between + and -. You wrote on page1 "Amplitude = 12vp-p (+6V -6V )"As shown on Simon's sims with nothing connected to the output at ~1kHz it outputs a square-ish nearly 12V p-p shape, but at low frequency it outputs +12V and -12V pulses, which is 24V p-p.But if you don't have the full specs of whatthe receiveris expecting, and it works...

author: Simon
author_rank: Unknown
timestamp: May 28, 2019, 12:05:54 pm
content: this was a 1V test signal. At 1Hz you only get a few mV whereas at 1KHz it goes nearer 1V, not sure wy as I'd have thought that the rise/fall is what it is regardless of the frequency but that's thhe end of my expertise.

author: StillTrying
author_rank: Super Contributor
timestamp: May 28, 2019, 02:14:40 pm
content: Quote from: Simon on May 28, 2019, 12:05:54 pmIt's something to do with leaving the square wave's rise and fall times blank on a long simulation.If I leave them blank I get the same strange result as you at 1V and 12V, but if I set the square's rise and fall times to a realistic 150ns I get the expected pulse height and shape at the 22k.

author: Zero999
author_rank: Super Contributor
timestamp: May 28, 2019, 02:50:02 pm
content: This might not matter. If all the circuit at the other end is doing is looking for rising/falling edges above and below 0V, then the low frequency part of the signal is unimportant.

author: Laszlo
author_rank: Contributor
timestamp: May 28, 2019, 05:04:11 pm
content: Quote from: Simon on May 28, 2019, 12:05:54 pmThe rise time is around 120ms with no load attached.Quote from: Zero999 on May 28, 2019, 02:50:02 pmUnfortunately, I do not have the schematics of the rig so what you guys are saying must be true.Did some other tests on it, obviously confirmed what you guys were pointing out that the series capacitor will block most of the square wave out. At least I have learned something new again. Attached a picture with the capacitor in series with the load. The yellow trace is measured at the output of the 555 timer, blue is measured at the load.Regardless, the circuit does work in the field and I even managed to squeeze it in a box. So thanks again for the help.

author: Simon
author_rank: Unknown
timestamp: May 28, 2019, 05:28:44 pm
content: If you want a stiff 12Vpp square drive the easiest way is to use a micro or the 555 to drive a TLE5206-2 (2 channels). Run it off 12V and have a stiff enough virtual ground at 6V

author: Zero999
author_rank: Super Contributor
timestamp: May 28, 2019, 05:55:13 pm
content: Quote from: Simon on May 28, 2019, 05:28:44 pmWhy would you need an MCU as well as the 555 and TLE5206-2? The MCU and TLE5206-2 is all that's needed.Beware, there will probably come a point in future when you can't get the TLE5206-2. Mouser says it's obsolete and Infineon says "not for new design", in the product status section.https://www.mouser.co.uk/ProductDetail/Infineon-Technologies/TLE5206-2?qs=rY7msk5yxfZPdjTP77cv7Q==https://www.infineon.com/cms/en/product/power/motor-control-ics/intelligent-motor-control-ics/integrated-full-bridge-driver/tle5206-2g/

author: Simon
author_rank: Unknown
timestamp: May 28, 2019, 06:38:24 pm
content: I said 555 or mcu.I asked infineon about the TLE5206 and they said that it would only be phased out if demand drops and yet there is no direct replacement. I think the version with lead is obsolete. For a one off I don't see a problem anyway. I use it as a protected output driver as it is short circuit and over temperature protected.

author: Laszlo
author_rank: Contributor
timestamp: May 29, 2019, 01:47:24 pm
content: Had a look at the TLE5206, it is more expensive than the 555, but probably it will last longer. So far the circuit still works, but I have my doubts whether it will still be functioning after extensive use. If nothing else I will probably go with your solution.

author: Simon
author_rank: Unknown
timestamp: May 29, 2019, 03:40:06 pm
content: Yes it's a fully qualified auto part.

author: StillTrying
author_rank: Super Contributor
timestamp: May 29, 2019, 04:02:03 pm
content: If the receiver is happy to except 6 to 12V +/- narrow pulses as input, I be tempted to try just +/- 9V pulses from a single 9V battery, to get rid of the 18 to 12V power supply.

author: Simon
author_rank: Unknown
timestamp: May 29, 2019, 04:38:47 pm
content: I thought it was 12Vpp ? the 555 will do 15-18V so only really good for 12V. The other option on the cheap is a totem pole with a high side NPN and low side PNP, but this is not short circuit protected.

author: Laszlo
author_rank: Contributor
timestamp: May 29, 2019, 05:36:50 pm
content: Quote from: Simon on May 29, 2019, 04:38:47 pmI actually looked at the totem pole option, but never really dealt with it before and I wasn't confident enough to try building it.Quote from: StillTrying on May 29, 2019, 04:02:03 pmBack in the olden days, when the original wheel-slip protection rack was built they used just that. I've seen the schematics of that actual test kit, but it was using two op-amps and 2 transistors to generate the waveform required, it was also being supplied by two 9V batteries. The only problem is that due to the age of the rig I'd rather not risk load it too much. I don't think my superiors would be particularly impressed if I manage to fry one of these with my homemade device

author: Simon
author_rank: Unknown
timestamp: May 29, 2019, 05:42:34 pm
content: Well you coul easily use an opamp and 2 9V batteries. You build a classic relaxation oscilator and if neccessary beef up it's output with the totem pole transistors. You can put a resistor in series with the output. You will need a rail to rail opamp as the ouput needs to be such or if you use the totem pole the output will be the input less 0.7V

author: Laszlo
author_rank: Contributor
timestamp: May 29, 2019, 06:18:53 pm
content: Quote from: Simon on May 29, 2019, 05:42:34 pmLike a Schmitt-trigger?

author: Simon
author_rank: Unknown
timestamp: May 30, 2019, 06:24:50 am
content: https://www.electronics-tutorials.ws/opamp/op-amp-multivibrator.html