Go Down

Topic: Signal Frequency Multiplier (Read 1 time) previous topic - next topic

tt460

I have a project where I need to read a signal coming in and double the number of signals going out.

1) The signal I will need to feed into the Arduino will be a square wave 12v signal.  The signal is normally high, then a ground is applied to make the signal low for a brief period (3-5ms).
2) For every 1 peak, I would like to output 2 peaks.
3) Ideally, the peaks would be equally spaced, so the Arduino code would take a reading to determine the period between two signal inputs and equally space the output signals.

I have only done basic Arduino tutorials and on the outset this seems very possible from the Arduino's capability, but I need a little help with the circuitry and maybe code.

First: Is this possible?

Secondly: My thoughts on the code & circuitry are this:
a) I will need to condition the 12v signal down to a 5V signal to feed into the analog input.
b) The arduino code will process the analog signal to get a period, then output to a digital output.
c) A circuit will need to amplify the digital output to replicate a 12v signal.

I couldn't find any examples where someone was doing something ilke this.  Can anyone point me in the right direction?  Any similar circuits or code that someone has done something similar before?

CrossRoads

1. yes.
2.a. keep it digital, not analog. Simple voltage divider can be used, or an open collector transistor with pullup to 5V to drive an arduino input. 12V on base keeps collector low, low on base lets collector go high for the 3-5mS.
2.b. can use pulsein() or interrupts to determine when edges occur for timing.
2.c. simple open-collector single transistor circuit with pullup to 12V can provide the output. 3-5mS high outputs will pull low collector low to make the 3 low pulses.

You say "peaks" but your description sounds like you will see 1 low pulse, and you want more low pulses to result.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

tt460

Thank you CrossRoads for your analysis...  You are correct, pulses would have been a better term to use.  I appreciate your feedback.

Go Up