Shop OBEX P1 Docs P2 Docs Learn Events
DAC object — Parallax Forums

DAC object

WaldoDTDWaldoDTD Posts: 142
edited 2009-08-19 14:12 in Robotics
So I was wondering how best to make a DAC that is able to control an outside power source I need voltages above 5V and can't use the DAC voltage class is there a chip that will be able to discern pulsetrains that are written to the pin? Also is it possible to have the pin pulse a transistor's base pin while the collector and emitter are connected to a different power source/common. Also is there any way to add IO ports to the Javelin stamp? I seem to recall an appmod for this at one point but can't find it. Thanks!-Waldo

Post Edited (WaldoDTD) : 10/9/2008 1:40:03 AM GMT

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-10-09 08:02
    You can still use the DAC class. Just amplify the output voltage 0-5V with
    a noninverting opamp (or transistor) circuitry. Resolution of course remains limited to 8bits.
    For additional outputs you can use shiftregisters like HC595. For these
    there are classes as well.

    regards peter
  • WaldoDTDWaldoDTD Posts: 142
    edited 2008-10-09 19:18
    so I have been looking over everything, the load requires a very high current (4A) so i don't think the opamp would be a viable option, instead i am thinking of maybe a optocoupler and sending a PWM signal to the diode end to influence another higher powered circuit.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-10-09 19:27
    The idea is to use an opamp to amplify the voltage and then
    use the opamp output to control the base of a power transistor which
    will deliver the current.

    ························· +12V
    PWM output o
    +······ / c
    (0-5V)············· >--b-| NPN transistor
    ··········+
    ·-······ \ e
    ··········|·············· +---[noparse][[/noparse]load]
    +
    ··········|···············|·············· |
    ··········|···············+--[noparse][[/noparse]R2]-+-[noparse][[/noparse]R1]--+
    ··········|······················ |······ V GND
    ··········+
    +

    regards peter

    Post Edited (Peter Verkaik) : 10/9/2008 7:40:30 PM GMT
  • WaldoDTDWaldoDTD Posts: 142
    edited 2009-08-16 11:05
    thank you, sorry for the lapse,

    Would it be possible to build a circuit where the stamp only has to write a hexadecimal number to a pin and have that number correlate to gates on an IC is this a shift register?
    could you explain the above circuit a little more i assume that this is a simple opamp circuit with the gains R2/R1.

    I am assuming that the shift register mentioned above would be what i am looking for where i "write a number" to an IC, I assume that I set the Javelin and the register to an external clock so that everything is synced as well.

    Post Edited (WaldoDTD) : 8/16/2009 11:11:34 AM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-16 11:43
    The opamp circuit is a non-inverting opamp with gain (R2+R1)/R1
    If you just need to switch power you could use

    ·················+12V
    ···················|
    ················[noparse][[/noparse]load]
    ···················|
    ···················/c
    JavPin o---[noparse][[/noparse]1k]--b|
    ·················· \e
    ·················· |
    ·················· V GND

    A shiftregister requires a clockpin and a datapin. The number you write (using shiftOut)
    are the levels of the output pins of the shiftregister. You can cascade shiftregisters
    to add more output pins. To prevent ripple across output pins you also need a
    javelinpin to control the latch of the shiftregister. See datasheet of 74HC595.

    regards peter
  • kwinnkwinn Posts: 8,697
    edited 2009-08-19 13:30
    Sound like you want an actual DAC chip with SPI interface. Take a look at http://www.national.com/analog/adc/low_power_dac
  • PrettybirdPrettybird Posts: 269
    edited 2009-08-19 14:12
    An LM 311 is a comparitor that can easily boost the pulsetrain up to 15V from a simple TTL signal. It can also easily drive 100MA. From there, you would have to add transistors. They are hi freq. too. Is a pulsing DC good enough? We have used them in the oscilator section for EDM machinery that would burn metal under oil with 90 VDC up to about 80 amps, using a designed shaped carbon electrode. Typical was around 10 to 20 amps for a finer finish. It was all in the duity cycle. You might want an ajustable one shot from the LM311 to the transistors to help you with that.

    Post Edited (Prettybird) : 8/19/2009 2:21:48 PM GMT
Sign In or Register to comment.