Saturday 6 June 2015

level shifting - How do you shift a square wave down?



enter image description hereI have a square wave the oscilates at 25khz from 0 to 30v. I would like it to oscillate from -15v to +15v. Is there a SUPER DUPER SIMPLE circuit to do this? Keep in mind it's going up and down at 25khz.


Here's the circuit. The square wave I want to shift is going into the PiezoSpeaker at the lower right of the circuit.



Answer




How do you shift a square wave down?



Just an RC will do it: -


enter image description here


If fed with a sine wave (for the convenience of the attached picture), it will reproduce the sine wave at the output but with the DC level removed thus maintaining the correct peak-to-peak amplitude. Here is what happens in the first few cycles as the DC level is removed: -


enter image description here



It will work in the same way as a square wave (DC or average value = 15 V will be removed) but, please ensure that 2\$\pi\$RC << than 40 us to ensure the following doesn't happen: -


enter image description here


If C = 10 uF and R = 1 kohm, the cut-off frequency will be 15.9 hertz and miles away from causing the droop problem seen above.


However, if you in fact have a non 50:50 duty cycle square wave you may need a more complex circuit because the DC level won't be at the midpoint of the waveform.


On the other hand, if you are driving a simple piezo transducer, why bother shifting it to equal positive and negative levels - it's purely capacitive and it won't care so, a really simple circuit becomes "a wire".


No comments:

Post a Comment

arduino - Can I use TI&#39;s cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...