elrayes
Full Member level 5
- Joined
- Jun 3, 2008
- Messages
- 244
- Helped
- 20
- Reputation
- 40
- Reaction score
- 7
- Trophy points
- 1,298
- Location
- Egypt/Canada
- Activity points
- 2,777
Hi all
I have one of posts someone was asking about creating a variable analog signal inside a digital system, where i got couple of ideas about "how to create analog signal for your digital system":
- if your microcontroller has a PWM output then you can use to create an analog signal by connecting a smoothing capacitor between the PWM output and ground, try a 100uF capacitor I think will be good, then you will get a nice analog signal, maybe some ripples will appear but you can just handle this issue by using an RC low pass filter circuit or just increasing the value of the smoothing capacitor but take care from the capacitive reactance effect vs the PWM frequency.
- if your microcontroller doesn't support a PWM, then create a soft PWM using one of the GPIO with delay functions or the timers inside the microcontrollers to create a delay, where you will define your period and, for sure, define the duty cycle and connect the output to the same peripherals previously mentioned.
hope those couple of tips are useful.
--
El-Rayes
I have one of posts someone was asking about creating a variable analog signal inside a digital system, where i got couple of ideas about "how to create analog signal for your digital system":
- if your microcontroller has a PWM output then you can use to create an analog signal by connecting a smoothing capacitor between the PWM output and ground, try a 100uF capacitor I think will be good, then you will get a nice analog signal, maybe some ripples will appear but you can just handle this issue by using an RC low pass filter circuit or just increasing the value of the smoothing capacitor but take care from the capacitive reactance effect vs the PWM frequency.
- if your microcontroller doesn't support a PWM, then create a soft PWM using one of the GPIO with delay functions or the timers inside the microcontrollers to create a delay, where you will define your period and, for sure, define the duty cycle and connect the output to the same peripherals previously mentioned.
hope those couple of tips are useful.
--
El-Rayes