Your frequency is fixed so a freq to voltage converter would not work.
What you have is a PWM (Pulse Width Modulation) signal with a low duty cycle (low on time).
Maybe one of the analog guys can fix you up with a circuit to convert that to voltage. I would measure it with a micro controller and generate an output voltage with a DAC.
A 50Hz PWM signal sounds like a signal intended for a servo but that on time is strange. Maybe someone else has seen the like of it.
It is for a servo and the converter does not have to be super perfect precise because it is going to follow my finger push anywho and I cant push that correct!
I guessed it would be a problem with that duty cycle, and that is why I dont quite know how to handle this I dont need a fansy circuit with a superior resolution, just easy road.
It is for a servo and the converter does not have to be super perfect precise because it is going to follow my finger push anywho and I cant push that correct!
I guessed it would be a problem with that duty cycle, and that is why I dont quite know how to handle this I dont need a fansy circuit with a superior resolution, just easy road.
I did this, and it gave me an ok output while reading it with a multimeter. Problem is that it seems that my microcontroller gets noise from reading this signal, probably cause it does it so well.
I cant use the microprocessor to measure the PWM signal, cause I simply doesnt have the room inside the chip. (I cannot be convinced to try using the microcontroller anymore).
To be controlling a quadrocopter. The analog signal will be connected to microprocessor that will also have a gyrometer attached. I will use a ADC to read the signal made from this board, and I know some dont like going from digital to analog to digital, but I just cant make it perfectly work with room etc with my PSOC microcontroller.
To be controlling a quadrocopter. The analog signal will be connected to microprocessor that will also have a gyrometer attached. I will use a ADC to read the signal made from this board, and I know some dont like going from digital to analog to digital, but I just cant make it perfectly work with room etc with my PSOC microcontroller.
Hi Eric
Fantastic, you make the world turn
I will make an interrupt to do the sample at falling edge.
Few quistions though.
-Does all the transistors work as switches or amplifiers?
-The opamp's minus is connected to ground or a minus voltage? And it is a none inverting amplifier?
Hi Eric
Fantastic, you make the world turn
I will make an interrupt to do the sample at falling edge.
Few quistions though.
-Does all the transistors work as switches or amplifiers?
-The opamp's minus is connected to ground or a minus voltage? And it is a none inverting amplifier?
The simplest way to generate an analog signal is to just run the pulses through an RC low pass filter (integrator). That's basically what your multimeter does. But it's not as fast as Eric's circuit.
You would need an RC time-constant of about 200ms to minimize the ripple, so obviously the response time to a change in pulse-width is slow. Also you would likely need to amplify the signal since the maximum output signal is only 2.5/20 = 12.5% of the pulse amplitude.
The simplest way to generate an analog signal is to just run the pulses through an RC low pass filter (integrator). That's basically what your multimeter does. But it's not as fast as Eric's circuit.
You would need an RC time-constant of about 200ms to minimize the ripple, so obviously the response time to a change in pulse-width is slow. Also you would likely need to amplify the signal since the maximum output signal is only 2.5/20 = 12.5% of the pulse amplitude.
This must be what you are talking about. It would be fun to try that out aswell, since it is easy to build and also no interrupts for falling edge is needed, cause the voltage will be constant in my thoughts, and that will make my programming even easier. Right now I am reading the pulsewidth with a counter and interrupts, but it just fills too much when I need to measure 4 pwm signals.
Ill look abit more into this here: **broken link removed**
Reading the pulse width directly with the micro should take no time at all. You should interrupt on the rising and falling edge and just record the timer value.
what i did do for a test run is i took a input from 3 transmitter CHannels and ran them to 4 Quad-Or gates, a few minor glitches but it lifted alot easier than when i did it for all 4 channels separate!
hi,
If you are able to write the program for the PIC, I would go the same route as suggested by Pommie aka Mike and let the PIC sample the ON period of the 0.5 thru 2.5mS pulse.
hi,
If you are able to write the program for the PIC, I would go the same route as suggested by Pommie aka Mike and let the PIC sample the ON period of the 0.5 thru 2.5mS pulse.
Hi Eric
The problem is that I need to read 4 different inputs, and in a PSOC falling and rising and all I/O use the same interrupt. That means that I have to check which port of the 4 that is not turned on after I have got an interrupt I also have to figure out if it was falling or rising. I just dont know if this would work and there will be a chance that it will have two falling edges the same time.
Also I have to connect a gyrometer, barometer and accelerometer to the same uC and they will probably be using interrupts aswell.
Hi Eric
The problem is that I need to read 4 different inputs, and in a PSOC falling and rising and all I/O use the same interrupt. That means that I have to check which port of the 4 that is not turned on after I have got an interrupt I also have to figure out if it was falling or rising. I just dont know if this would work and there will be a chance that it will have two falling edges the same time.
Also I have to connect a gyrometer, barometer and accelerometer to the same uC and they will probably be using interrupts aswell.
If you are using a normal RC system and not a spread spectrum system then the signals do not overlap. A pic can easily read 4 signals to an accuracy of 1uS (or better) and it will still have 98% of it's processing power available. The only interrupt required is the PortB change (IOC) and so all other interrupts are still available for the other devices.