Two polar pulse generation.

I want to generate this pulse with controllable frequency (took from Wall Clock Accurate Oscillator Hack).

This suppose to be some electronic modification of Arduino generated PWM.

What you would suggest as electronic schema guidelines?

Try feeding two of the PWM pins that run from the same timer via a 10k resistor each to a common point. The relevant pairs on the ordinary Arduinos are (5,6), (9,10), (3,11) - these correspond to timers 0,1 and 2. Say you use pins 9 and 10 in this way, try something like

  analogWrite (9, 100) ; 
  analogWrite (10, 200) ;

and then look at the voltage at the summing point with a scope. You will then want to change the relevant timer (timer1) to phase-constant mode I think to get the kind of waveform you want - some research is then needed on direct control of the ATmega's timers will be needed.

The technical term is "bipolar" BTW.

Strictly speaking its only bipolar with respect to the mid-point voltage of 2.5V. If genuine negative voltage peaks are needed some more circuitry will be required.

I'd use H-bridge motor driver for this L293, with software define pulse width and polarity.

Thank you, guys, for directions, I will look up further...

Yes this is defiantly produced by a H bridge. The central line of the trace will be zero volts with the scope connected across the coil.
It looks like the bridge is being clocked by a divide by four circuit (two flip flops) on each of it's inputs.

Grumpy_Mike:
It looks like the bridge is being clocked by a divide by four circuit (two flip flops) on each of it's inputs.

Grumpy_Mike,

Can you please give more details about the last statement? H bridge AFAIK has four switch inputs. Which of those inputs you suggest to connect to Arduino's PWMs? Do you propose to use flips flop components?

Imagine a two bit grey code binary counter whos two outputs are connected to each of the two H-bridge inputs.
00 - no current through the coil
01 - current in one direction
11 - no current through the coil
10 - current in the opposite direction
Would give you the pattern you observe. You could also generate that pattern in software.
It is called a grey code, when going from one step to the next only one bit changes.

Great! It just great idea. Grumpy_Mike, you made my morning :slight_smile: