How to design a driver to match a Flash ADC to a motor??

Discussion in 'The Projects Forum' started by Nara Shikamaru, Dec 8, 2007.

  1. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    Hey Everybody!!.....really need some help from you Pro`s....i have an assignment to control the speed and direction of a DC Motor!!....the thing is that it cannot be done with PIC....and thats the way that i can...well....to control the speed it must be with a Varaible Resistor (Potenciometer)....that is going to be pluged to a Flash AD conversor....the problem is how to design a driver that uses the 3 output Bits to control the speed and direction of the motor....i send you here the first step....please...help...thanx a lot!!!
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    Is the use of an Analog-to-Digital converter a mandatory requirement of the design?

    hgmjr
     
  3. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    Hey Hgmjr!!...yes...but not even an integrated one....the Flash AD...it must be done like in the image that i uploaded.....it must be built with OPamps....and its mandatory....i supposed that with the Potenciometer and a Switch you would control Speed and Direction...but that goes to the Flas ADC and the problem is that what kind of encoder do i use to obtain the Digital signal...and how its gonna be the driver that uses the digital signal to control the motor???...Thanx!!
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    Since you are using an Analog-to-Digital converter to turn the analog signal from the potentiometer to an 3-bit digital signal, it is inevitable that you will need to convert it back to an analog signal at some point to control the speed of the motor.

    Can you provide an overall description of what you are trying to accomplish with this project? It would be helpful to know more if we are to understand how to answer your question.

    hgmjr
     
  5. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    Yes, you´re right HG!!....with the Potenciometer im going to vary the voltage to control the speed...that signal goes to the Type of Flash ADC....than...taht signal goes to some sort of encoder (which one, i dunno)...then youll get 3 output Bits...those 3 output Bits will be use to create a PWM (thats what must be done)...and the PWM signal will drive a H bridge circuit...wich is not the problem....

    so basically the problem is...what kind of circuit do i use to encode digitally the signals coming from the OPamps and how is the driver that will create a PWM signal from those 3 Bits....
     
  6. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    Sorry for all the questions but I am still trying to understand the details of you project.

    Are you looking for the potentiometer to control the speed such that at one extreme of the potentiometer the motor will turn at the maximum speed in the clockwise direction and with the potentiometer turned to the opposite extreme, the motor will turn at maximum speed in the counter-clockwise direction?

    Also are you looking for the motor to come to a complete halt with the potentiometer set at the center of its travel?

    hgmjr
     
  7. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    No!!....Dont worry!!....im the one who should be thanking you!!....yes...that could be an option...that with the potenciometer while your turning to one side it would increase the speed and viceversa....and in the center it would stop the motor....that other option would be with a switch to change the direction and with the potenciometer full to one side would be stoped and turning it to the full other side would increase speed.....but....the first optino is best!!
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    Since you only plan to provide 3-bits to represent the states of the motor, there can be only 8 states (2 raised to the power of 3). If you use the MSB to determine the direction and one of the states is "motor off" then you will only have 3 speeds to choose from in one of the directions of rotation and 4 speeds to choose from in the opposite direction.

    Is that what you had in mind?

    hgmjr
     
  9. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    Exactly!!...thats ok...cause its just an assigntment...but the teacher wanted obiously to mess me up!!...jajaja.....because i use to much PICs and he hates microcontrollers....i know it will have 8 states....and i thought also the option with the potenciometer as you said....stoped in the middle and to one side it will increase speed in that direction and to the other side will increase speed in the other direction.....

    what i dont know is...what kind of circuit i use to "encode" the signals form the ADC to digital Bits....and how i use those 3 Bits to generate a PWM to control the H bridge to the motor.....
     
  10. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    I suspect that the teacher is wanting to make sure that you have a good foundation in the hardware design basics to prevent you from relying too heavily on your knowledge of microcontrollers.

    This is analogous to making sure that a student understands the mechanics of addition, subtraction, multiplication, and division before the student is allow to become too dependent on a handheld calculator.

    Anyway, I think from your earlier postings in this thread that you have a handle on the Flash ADC and the H-bridge. You are just looking for guidance on what needs to be added in between to smoothly interface the output of the ADC to the input of the H-bridge. You have stated that PWM is the method you are planning to use to control the speed of the motor.

    What you need is a square-wave signal source that you can use the two low order bits of the ADC to control the duty cycle. The high order bit or MSB should serve just fine as the signal that can be used directly into the direction input of the H-bridge.

    Can you think of a simple square-wave oscillator circuit that would lend itself to having its duty-cycle controlled by a 2-bit binary value?

    hgmjr
     
  11. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    exactly!!....your totally there!!...for instance...if i build the Flash ADC with the 7 Opamps....those signals must go to some sort of encoder to transform those 7 signal into a digital 3 Bit Signal....What kind of encoder do i use there??....then you nailed it again....those 3 Bits must go into some sort of driver to generate a signal to trigger the H-bridge for the motor....i said PWM....but...do you have another and easier way??....

    for example...her ill send i circuit that uses the potenciometer to control the speed and direction of the motor...and halt in the middle....as you can see the signal goes to a Opamp to create a triagular wave...then youll get a pwm...then youll find to comparators...if the signal is high it will drive one direction and voltage of the h bridge...and viceversa....but the teacher sayd to me....you can use this circuit....but you must coupled it to the Flash ADC and the encoder....otherwise...find another way....
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    One solution, though extremely trivial, would be to employ a very simple 2-bit R2R network. The output of the R2R network would be a DC voltage that would connect into the circuit dibujo.jpg at the input to IC11A (the voltage follower) in place of the potentiometer.

    Do you think your teacher would buy this approach?

    hgmjr
     
  13. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    No...i already thought about it....he said it must be done building a Flash ADC....like this one.....http://www.allaboutcircuits.com/vol_4/chpt_13/4.html.....hey....i found how to do the encoder....here...http://www.hardwaresecrets.com/article/317/6

    now whats left is what kind of driver must be done to handle those 3 Bits to control the H bridge
     
  14. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    No...i already thought about it....he said it must be done building a Flash ADC....like this one..... http://www.allaboutcircuits.com/vol_4/chpt_13/4.html .....hey....i found how to do the encoder....here... http://www.hardwaresecrets.com/article/317/6

    now whats left is what kind of driver must be done to handle those 3 Bits to control the H bridge
     
  15. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    215
    My suggestion of using the R2R network is not intended to eliminate the need for the ADC. The R2R would be connected to the output of the ADC to convert the two lower bits of the 3-bit value back to a DC voltage that could then be used as the input to the PWM circuit you posted earlier.

    hgmjr
     
  16. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    AAhhh...Ok!!.....i get it now!!.....so all the other circuit would remain the same??....where would i "input" those to lower bits?....i mean...the two signals would be conected where?....and what would i do with the MSB?....where its gonna be connected?.....sorry to bother a little more....could you PLEASE...post a little schematic so i can follow??.....Thanx for everything
     
  17. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    ok...i just find how to build the Flash ADC....just with OPamps and digital gates.....what i need is just the next step...what to do with those 3 Bits and how to control the driver....her i send you the flash ADC
     
  18. Nara Shikamaru

    Thread Starter Active Member

    Nov 24, 2007
    92
    3
    Any Ideas??
     
  19. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Like HGMR said... use the MSB to control direction. The two lower order bits select snail, tortoise, guinea-pig, and rabbit.

    You might have to invert the low order bits for one of the directions:

    ADC D Spd

    000 0 11
    001 0 10
    010 0 01
    011 0 00
    100 1 00
    101 1 01
    110 1 10
    111 1 11
     
Loading...