Go Down

### Topic: double inverted pulse (Read 2597 times)previous topic - next topic

#### gazz

##### Oct 06, 2012, 03:59 am
I'm trying to drive a tachograph from my arduino, as part of a bus simulator,

i used to drive a rev counter, which i used the tone script to do, and it worked fine, but the tachograph dosent like the signal the rev counter was happy with,

it seems i need to feed the tachograph a double inverted pulse, it has 2 input pin for the speed pulses, on a vehicle the speed pulses are produced via a hall effect pulse generator, 4 wires, + and - 12 volts in, then the 2 pulse outputs,

i assume it basically wants a positive pulse on one pin, and a negative pulse on the other pin, both at the same time,
the wiring diagram shows pin 3 has a square wave icon pulsing upwards, pin 4 has a square wave icon pulsing downwards,

what would by my best way to take the tone signal output from the arduino, and convert it into a double inverted pulse signal,
or can i do that via the arduino it's self with code?

#### winner10920

#2
##### Oct 06, 2012, 04:45 am
I know for a project of mine you can make the hardware timers output be out of phase with each other( I used timer 1 and pin 9+10) and they toggle at exactly the same time but into opposite states,
Look up how to use the arduino timers and especialy the wgm bits

#### dhenry

#3
##### Oct 06, 2012, 01:26 pm
Quote
i assume

I would not assume here.

Quote
what would by my best way to take the tone signal output from the arduino, and convert it into a double inverted pulse signal,
or can i do that via the arduino it's self with code?

What's best is highly subjective.

What you are asking for is called level shifting. There are many ways to do that. The simplest consists of pnp + some resistors that pull the output to -12v.

Your arduino cannot generate a negative signal directly.

#### gazz

#4
##### Oct 06, 2012, 03:16 pm
ahh right,

i am wondering if i need to do some signal conditioning tho, not sure what kind of output the tone function outputs,

the tachograph needs a square wave, but i am not sure if it needs a negative one,

the pulse sender (that would attach to a gearbox, and convert rotating motion into electrical pulses)  produces 2 square waves at 180 degrees to each other, they need to be exactly the same... just one is inverted,

i've found out that the 4 wires i mentiones, the first 1 is +8 volts from the tachograph, 2nd is earth, 3rd is one pulse output, 4th is the inverted pulse output,
BUT, the speed sensor specs says:
Code: [Select]
`Signal shape          rectangularFrequency (max.)      < 1 kHzOutput signal A1      UL < 1,9 V (1mA)Output signal A2      inversion of A1`

(the output signal A1 bit, the UL.. the L is positioned half way lower than the U, not sure what that means)

Go Up