Pages: [1]   Go Down
Author Topic: Signal Frequency Multiplier  (Read 1130 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: