Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Electronics project; Supplying variable voltage from digital inputs?

  • 20-10-2009 12:15pm
    #1
    Registered Users, Registered Users 2 Posts: 431 ✭✭


    Hello All!

    I'm working on a small electronics project at home and was wondering if anyone can help me. I can produce a set of digital outputs on the board I'm using, and would like to power a DC motor.
    The motor has a black wire and a red wire. I can power it by connectomg a voltage supply to the red, and the black to earth. The higher the voltage the faster it spins, the lower the voltage the slower it spins. (We're talking up to around 6V here) (I'm using a power supply to test this).

    I have a gadget (this to be precise http://devicesolutions.net/Products/TahoeII.aspx) that can set particular pins high... How can I use a set of digital values to control some voltage level?

    So... Is there some combination of parts that take a number of digital inputs and will produce a particular voltage coming out the other side?
    Some sort of digital potentiometer?
    Pin1	Pin2	Pin3		
    
    0	0	0		0V
    0	0	1		1V
    0	1	0		2V
    0	1	1		3V
    1	0	0		4V
    1	0	1		5V
    1	1	0		6V
    1	1	1		7V
    

    Or am I just talking utter crap? :D


Comments

  • Closed Accounts Posts: 2 patsyd43


    Why dont you use an Analog Signal instead? I know its a
    project but its complete nonsense.

    You would never encounter this in the real world.


  • Moderators, Home & Garden Moderators, Technology & Internet Moderators, Regional East Moderators Posts: 12,641 Mod ✭✭✭✭2011


    I see form your link that your gaget (micro processor) has PWM output. This referes to "pulse width modulation". This output can be used on the gate of a transistor or a power chip to provide a variable DC output to your motor.

    Does this make sense?


  • Registered Users, Registered Users 2 Posts: 431 ✭✭plenderj


    patsyd43 wrote: »
    Why dont you use an Analog Signal instead? I know its a
    project but its complete nonsense.

    You would never encounter this in the real world.

    Thanks for your reply. How does a digital device control the speed of a motor then? I assumed this was how it would work?


    2011 wrote: »
    I see form your link that your gaget (micro processor) has PWM output. This referes to "pulse width modulation". This output can be used on the gate of a transistor or a power chip to provide a variable DC output to your motor.

    Does this make sense?

    Thanks for your reply. It doesn't really make sense to me, but give me a while to read up on it and I'll see if I can make something of it :)


  • Moderators, Home & Garden Moderators, Technology & Internet Moderators, Regional East Moderators Posts: 12,641 Mod ✭✭✭✭2011


    You would never encounter this in the real world.
    *

    A digital signal going into a controller to provide an analog O/P ???

    Frequently!! What about iPods ??


  • Moderators, Home & Garden Moderators, Technology & Internet Moderators, Regional East Moderators Posts: 12,641 Mod ✭✭✭✭2011


    OP will reply later, at work now.


  • Advertisement
  • Closed Accounts Posts: 5,064 ✭✭✭Gurgle


    patsyd43 wrote: »
    Why dont you use an Analog Signal instead? I know its a
    project but its complete nonsense.

    You would never encounter this in the real world.
    huh?
    Maybe not in the 19th century, but practically every modern electronic device with moving parts are controlled digitally.

    OP, PWM output would be the most common way.

    Or you could build an R-2R ladder DAC and use that as the input to a transistor.


  • Registered Users, Registered Users 2 Posts: 10,952 ✭✭✭✭Stoner


    plenderj wrote: »
    . Is there some combination of parts that take a number of digital inputs and will produce a particular voltage coming out the other side?
    Some sort of digital potentiometer?

    analogue to digital converters are used all the time, take roughly your example of how a pot could be changed to a digital input, this is rough but you should get where I am coming from .


    Using an AD module on a PLC, take a potentimoeter and assign its max and min resistance values to a word, double word etc on a PLC. The PLC will then break the resistive range of the pot into ditial sections from 0 to 1111111111111111 (bin).

    The input can then be set to ranges, so you could break a pot up into say 6 sections/ranges, so each resistive range would be read as a digital input.


  • Registered Users, Registered Users 2 Posts: 1,257 ✭✭✭Pete67


    OP is looking for Digital to Analog conversion, not the other way around. I'd second the suggestion to look into R-2R resistor network to build a basic D/A convertor. A suitable transistor can then be used to modulate the DC supply to the electric motor and hence control its speed.

    Some details here

    PWM could also be used, but would require more electronics and does not control the voltage as required by the OP. PWM involves supplying the load with full rail voltage for a series of pulses, the ratio of the on pulses v's the off pulses (mark/space ratio) determines the power transferred into the load, and hence the speed of the motor.


  • Closed Accounts Posts: 5,064 ✭✭✭Gurgle


    Pete67 wrote: »
    PWM involves supplying the load with full rail voltage for a series of pulses, the ratio of the on pulses v's the off pulses (mark/space ratio) determines the power transferred into the load, and hence the speed of the motor.

    Run the PWM through a basic LPF and you have a controllable analogue level.


  • Registered Users, Registered Users 2 Posts: 431 ✭✭plenderj


    Thanks for the replies guys - I'm reading up on your suggestions to get a better handle on what you're suggesting


  • Advertisement
Advertisement