hi there
I am trying to get analog output from Arduino and from what I know Arduino doesn't offer D/A converter. But PWM pins are provided as a D/A converter. But the pulses are of course not an analog voltage. So I tried to use a simple RC filter after the PWM signal and the output of the filter is connected to the A/D pin of xbee. According to theory the filter has to make the pulses as smooth as possible with certain value of the ripple. Even though I have decreased the value of the ripple, as soon as I connected the output of the filter to the Xbee, something strange happens!!! The A/D pin of Xbee starts reading multiple values. The voltage fluctuates randomly. Of course the voltage that I want is one of those multiple values, but because of my application, I cannot have multiples output voltages for same input. I really don't know the reason behind this and this is why I can't really solve the problem. I would appreciate any insight on this issue. Thanks.
1.I attached the schematic of what I'm planning to do.
2.The frequency of the PWM depends on the pin ofcourse but we can consider 31250 Hz.
3.I have considered R=15K and C=1uF
4. I have attached the output of the filter on O.Scope. Even though the PWm is passed through the filter but as soon as we connect it to Xbee, we get multiple values since the Xbee is sampling the signal. and the signal still seems to be a pulse.!!!
I am trying to get analog output from Arduino and from what I know Arduino doesn't offer D/A converter. But PWM pins are provided as a D/A converter. But the pulses are of course not an analog voltage. So I tried to use a simple RC filter after the PWM signal and the output of the filter is connected to the A/D pin of xbee. According to theory the filter has to make the pulses as smooth as possible with certain value of the ripple. Even though I have decreased the value of the ripple, as soon as I connected the output of the filter to the Xbee, something strange happens!!! The A/D pin of Xbee starts reading multiple values. The voltage fluctuates randomly. Of course the voltage that I want is one of those multiple values, but because of my application, I cannot have multiples output voltages for same input. I really don't know the reason behind this and this is why I can't really solve the problem. I would appreciate any insight on this issue. Thanks.
1.I attached the schematic of what I'm planning to do.
2.The frequency of the PWM depends on the pin ofcourse but we can consider 31250 Hz.
3.I have considered R=15K and C=1uF
4. I have attached the output of the filter on O.Scope. Even though the PWm is passed through the filter but as soon as we connect it to Xbee, we get multiple values since the Xbee is sampling the signal. and the signal still seems to be a pulse.!!!
Attachments
-
176.7 KB Views: 29
-
65.9 KB Views: 21