20 Channel Bipolar Square Waves

Discussion in 'The Projects Forum' started by gatesw, Aug 22, 2011.

  1. gatesw

    Thread Starter New Member

    Feb 28, 2011
    Hello Everyone,

    I was presented with a design challenge several months ago. I thought I had a pretty good solution in mind but things are not working out as I originally imagined. I was asked for an embedded solution that would provide 20 bipolar square waves. The user needs to control amplitude and frequency. The amplitude must be maintained in the range of +/- 1V in 0.1V steps while the frequency is in the range of 0-1Hz in 0.1 Hz step. I setup a PSOC3 to generate 20 50% duty cycle PWM on independent pins no problem. Then I imagined that I would use clock division to provide frequency stepping (I believe I can live with the bit/divider resolutions for now). So far so good. Now what I had imagined was that I would use a differential OP AMP configuration http://en.wikipedia.org/wiki/Operational_amplifier_applications. I have been experimenting with a TLC277CP http://www.alldatasheet.com/datasheet-pdf/pdf/28882/TI/TLC277CP.htmlfor this concept with a constant +5V as an input (V1 PIN2) , the PWM as (V2 PIN3), and -5V as ground (PIN4 Only) and +5V (Vdd PIN5) . Taking R1, R2, Rf, and Rg with 1:2 ratios (taken as 1K and 2K in my circuit) to get a +/- 2.5 V output. The idea was to step this down further before feeding into a digital 1024 step (10bit) variable resistor made by Maxim (MAX5483 with SPI interface or perhaps the up/down interface). For now I have been using a function generator (unipolar square wave) to feed into my differential op amp circuit for testing. I can not get the bipolar square wave out of the circuit for the life of me. (Checking I/O on an oscope). Thoughts on what I may be doing wrong would be highly appreciated. My friend thinks that it may be related to differential signals vs. single ended but I honestly do not know. I made a simulation based on the equation provided by the Wikipedia page and it seems like it should work (please see attached plot). My sense is that there is something in the hardware or implementation that I do not fully understand.
  2. praondevou

    AAC Fanatic!

    Jul 9, 2011
    VDD is pin 8.

    What's your PWM referenced to? You connected -5V to pin 4 and the PWM to virtual ground, is that it? And how is the GND of the bipolar power supply connected?...

    It's more helpful if you post a circuit diagram.;)

    Why exactly do you need to use the Opamp?

    And what DO you have at the output? Nothing?

  3. DFR123

    New Member

    Aug 22, 2011
    The positive voltage has to be connected to PIN8, and the IC is designed for single power supply.
  4. gatesw

    Thread Starter New Member

    Feb 28, 2011
    Thanks for the replies everyone. Yes sorry PIN 8 is VDD and just to confirm I have +5V for VDD and -5V to OPAMP pin GND. PWM is GNDed to the same GND from the +5V supply. The +5V and -5V supply are the same ground (from a prototype board with a power supply). The output is very strange. It is somewhat bipolar just not centered correctly. I.e. 3.5V and -1.5 V. Will work on a circuit diagram. Sorry about that.

    I am not stuck on using an OPAMP if there is a more elegant way to solve the problem. I just did not know of another way to take a PWM and center it about zero. I tried a trick using a capacitor but it was too slow because of the charge time. The bipolarity of the signal is important because it will be used to drive an oxidation and reduction reaction.