Shop OBEX P1 Docs P2 Docs Learn Events
Digital to Analog Conversion Recommendations — Parallax Forums

Digital to Analog Conversion Recommendations

172heavy172heavy Posts: 55
edited 2011-07-21 15:45 in Propeller 1
What is the best IC or other method for Digital to Analog conversion?

Comments

  • jmgjmg Posts: 15,185
    edited 2011-07-16 21:05
    172heavy wrote: »
    What is the best IC or other method for Digital to Analog conversion?

    You need to give more information.

    Details like Number if Bits, Update Rates, required dV/dT, power consumption and Power-Init default value all matter.
  • kwinnkwinn Posts: 8,697
    edited 2011-07-16 22:03
    If this is for your remote control caddy I would suggest a prop as the interface/controller between the FOB receiver and the chair controls. PWM with a filter will be more than adequate to produce a voltage for controlling speed and direction. If it is not for the caddy then as others stated more info is needed on the application.
  • 172heavy172heavy Posts: 55
    edited 2011-07-17 07:53
    Yes it is for the golf caddy. What do you mean by PWM with filter? I thought the prop couldn't supply more than 3.3 volts.
  • LeonLeon Posts: 7,620
    edited 2011-07-17 10:23
    Use a MOSFET or BJT driver.
  • kwinnkwinn Posts: 8,697
    edited 2011-07-17 10:39
    172heavy wrote: »
    Yes it is for the golf caddy. What do you mean by PWM with filter? I thought the prop couldn't supply more than 3.3 volts.

    IIRC in the original thread you wanted to do this as simply and inexpensively as possible. To do that the simplest approach would be to replace the joystick pots that control speed and direction. Those pots output a voltage that is proportional to their position.

    A resistor and capacitor can be used to make an RC filter. By connecting that filter to a propeller pin and outputting a pulse on that pin you can produce a voltage that is proportional to the pulse width. If the pulse is high for 50% of the time the output voltage would be about 50% of the 3.3V supply to the prop. That output voltage can be amplified by an op amp (usually to 0 - 12V) and used as the input in place of the joystick pots.
  • 172heavy172heavy Posts: 55
    edited 2011-07-17 18:08
    kwinn wrote: »
    IIRC in the original thread you wanted to do this as simply and inexpensively as possible. To do that the simplest approach would be to replace the joystick pots that control speed and direction. Those pots output a voltage that is proportional to their position.

    A resistor and capacitor can be used to make an RC filter. By connecting that filter to a propeller pin and outputting a pulse on that pin you can produce a voltage that is proportional to the pulse width. If the pulse is high for 50% of the time the output voltage would be about 50% of the 3.3V supply to the prop. That output voltage can be amplified by an op amp (usually to 0 - 12V) and used as the input in place of the joystick pots.

    Thank you, I will look in to the op amp route.
  • kwinnkwinn Posts: 8,697
    edited 2011-07-18 00:41
    172heavy wrote: »
    Thank you, I will look in to the op amp route.

    For this application just about any op amp that can handle the voltage range the pots covered will work. See is if you can get and post a schematic of the pots/joystick portion of the schematics. That will provide a better idea of what you need and let the forum provide more help.
  • 172heavy172heavy Posts: 55
    edited 2011-07-19 11:13
    kwinn wrote: »
    For this application just about any op amp that can handle the voltage range the pots covered will work. See is if you can get and post a schematic of the pots/joystick portion of the schematics. That will provide a better idea of what you need and let the forum provide more help.

    Without totally holding my hand here can you give me an example of how I might use the PROP to contol an OPAMP? I am assuming I will send a PWM signal from the Prop, filter it to stabilize the voltage etc.
    I get fuzzy when trying to figure out the forward/reverse biasing, etc...... I was wanting to supply external 5v to the opamp so that I could isolate the prop from any potential hi amperage.

    Anyway any help will be much appreciated.

    I will try to get a schematic and post but I am not sure as I am hacking this thing so I might have to generate a schematic myself. The voltage range I need to cover is approx 1 to 4 volts.
  • Mark_TMark_T Posts: 1,981
    edited 2011-07-21 12:12
    This kind of thing - the RC feedback network attenuates above a few Hz, but otherwise its an inverting amp from a 0..3.3V input to a +5...0V output range. The opamp needs to be rail-to-rail note.

    Incidentally I've experience with electric mobility scooter and wheelchair control interfaces and they usually detect the presence of the correct 5k potentiometer and disable the drive if its not connected. You can fake this by leaving the original pot in place and just reconnecting the wiper.
    368 x 334 - 3K
  • SRLMSRLM Posts: 5,045
    edited 2011-07-21 15:45
    I like the MCP3208 ADC for general analog conversions, along with the mcp3208_fast.spin object in the obex.
Sign In or Register to comment.