1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

K8055 - Dual Wiper Motor Control with Variable Speed

Discussion in 'SimTools compatible interfaces' started by bigtalltim, Nov 7, 2010.

  1. Menix

    Menix Member Gold Contributor

    Joined:
    Mar 8, 2010
    Messages:
    78
    Balance:
    113Coins
    Ratings:
    +6 / 0 / -0
    Be careful. i burned my K8055 up with 24 V.
    Some shortcut anywhere and the board flamed up.
  2. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,162
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,207Coins
    Ratings:
    +2,168 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Thanks for the heads up Menix, from what I understand (and I admit that my understanding is limited) the pullup resistors that Tim mentioned (R1, R2) will allow both transistors to remain in a steady state (pull up circuit). The size of the resistors (1000ohm) restricts the current that can reach the K8055 to 24mA. According to the information Tim provided, the K8055 can handle up to 100mA so I should be safe....
  3. bigtalltim

    bigtalltim New Member

    Joined:
    Sep 10, 2010
    Messages:
    189
    Location:
    Belfast
    Balance:
    361Coins
    Ratings:
    +2 / 0 / -0
    As long as no part of your circuit is able to overload the inputs on the K8055 you will be fine - that would include by short circuits as Menix suggests... an example would be a short that allowed power to go directly to the PWM input rather than through the 1K resistor, which would be a problem regardless of the voltage used. Always test the integrity of your circuits!

    The maximum voltage and current that the inputs on K8055 can handle (50V and 100mA) should not present a problem with the 12V solution as originally posted - as long as the circuit is operating correctly and none of the components has been shorted or damaged!
    If you use a different relay, check the current draw of the coil - if it is more than 100mA, use the new circuit as below.

    The new variation from CliffyK@Velleman forum opens the door to the use of much greater voltages, but if you increase the original design to 24V without upgrading the components or considering circuit protection you may have problems!

    The difference between the original relay circuit and this new one is that the digital output is now connecting to the base on a transistor (Q2) that amplifies the signal to change direction (switch the relay coil on or off) whilst still protecting the inputs on the K8055.

    [​IMG]

    Tim
  4. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,162
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,207Coins
    Ratings:
    +2,168 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    I think the wife noticed my recent electronic purchases today....there was definite frownage going on there ;)

    The cost of the new Weller WES51 soldering station might have been the cause....so I went to town today and bought a bunch of components (including a package of 2N3906 transistors) to round out my newest obsession! In for a penny in for a pound as they say, lol. We are tearing out the master bathroom and remodeling this weekend so it might be a week or so until I have everything put together to test out.

    Any chance that you can post closeups of your PCB design when you return home? Mine will be slightly different (with the addition of the 2N3906 listed on the scematic above) but it would be interesting to see your solution. From what I can tell in the photo on the first page the layout is almost identical to the scematic, but it is too blurry (tired old eyes) to be sure. By the way, the molex connectors from the PSU to the relays are a nice touch.
  5. bigtalltim

    bigtalltim New Member

    Joined:
    Sep 10, 2010
    Messages:
    189
    Location:
    Belfast
    Balance:
    361Coins
    Ratings:
    +2 / 0 / -0
    OOPS! - We've all been there though! ;)

    I will post what I have, but dont have much more than appears in earlier posts... to recap on the original design:

    pcb.JPG

    pcb with wires.JPG

    I didn't use a PCB designer program, so thats all I have - I just drew the tracks onto the copper board with a marker pen exactly as in the diagrams above, and etched around the marker pen... I filled all of the tracks with old solder to improve the current handling.

    In response to an earlier request I am putting together a diagram to show how to wire up the solution, and also trying to get together a description of how the two main aspects of the circuit work in normal language (PWM and Relay direction switching)... hopefully next few days!

    I haven't yet used the new design with 2 transistors... hopefully next few weeks - actuator tests first with 2 k8055s ;)

    Tim
  6. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,162
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,207Coins
    Ratings:
    +2,168 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    That is perfect, thank you! It gives me an idea of how you jumpered what to where. I have been pulling my hair out (not much left in the first place) on how to route everything. I see that I do not need a trace, I can use wire.
  7. riton

    riton Active Member

    Joined:
    Jul 6, 2007
    Messages:
    600
    Location:
    France
    Balance:
    1,006Coins
    Ratings:
    +103 / 3 / -0
    i have a question:
    it is possible to drive a motor (power with Sabertooth 2x10A) just with analog output?
    i have a velleman card and a saber card.
    how stop the motor when the mouvement stop?

    with yout setup , you have speed wtih analog integer and direction with digital, and you use PWM.
    i don't understand your sequence with motor stop! you have analog integer 100% it'is an error?? can you explain this choice?

    with my setup, i use analog and in the analog information i have direction and speed into the same analog signal.
    my motor don't stop when the position is found, because i don't need to make a direction setup.

    how make a good configuration ?

    saber card:
    http://www.dimensionengineering.com/dat ... th2x10.pdf
  8. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,162
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,207Coins
    Ratings:
    +2,168 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Here is my PCB based on the above scematic that Tim posted. I will do a test run on the CNC tomorrow to see if my traces are too small or not. I tried to go by recommendations that I could find online.

    Attached Files:

    • 2.jpg
      2.jpg
      File size:
      111.4 KB
      Views:
      652
  9. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,162
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,207Coins
    Ratings:
    +2,168 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    A test run of my PCB on countertop laminate material:

    Attached Files:

  10. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    First of all, you don't need to remove all that copper. You can just cut around the traces. You can also make the high current traces much thicker.

    Second, you cannot just take a schematic and make it into a circuit 1:1. You have to design the PCB to accept the component footprints, and not the schematic drawings. For example you can have CBE on the schematic for a transistor, but the actual component could have a BCE footprint.

    It might be easier for you to make it on a perfboard and manually connect everything. This way you learn the pins of your components, and you don't waste time and material making wrong PCB's. It is also much easier to change things if you need to..
  11. adbgg

    adbgg Member

    Joined:
    Feb 2, 2010
    Messages:
    78
    Balance:
    132Coins
    Ratings:
    +1 / 0 / -0
    Hi all,

    I have the same question as Riton. I have connected the K8055 to the Sabertooth 2x10A (in analog mode), but it seems quite impossible to configure X-SIM in order to drive the motor like you.
    I refer to your video with the cursor of the tablet test. When you put the cursor at the top, the motor moves and then stops when it has reached the position. Normal behavior of the motor that I'm not able to replicate until now.

    So the question is, in your opinion :

    1) Is it possible to make the K8055 work with the Sabertooth using the analog mode (DAC output from K8055 connected to the S1/S2 input signal of the Sabertooth) ?
    2) Or must I use the PWM output of the K8055 ?

    You can refer to my post to get some information, but I think you will understand easily my problem.

    Many many thanks in advance.

    Regards

    Adbgg
  12. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,162
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,207Coins
    Ratings:
    +2,168 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Actually, I was going to breadboard one together first and make sure that it would work before making a circuit board. I did not make my board 1:1, but it was pretty easy to lay out the traces in this order so I went with it. I left the proper space for each component by measuring them and making sure there was enough room and their footprints were in the correct orientation.

    But, even if I do not use this layout for my end design, I wanted to test out my home made CNC table (4'x8') to see if it would do a good job on making a PCB. I am very happy with the results. So far I have only cut out large wooden parts for several projects and a few aluminum and brass parts for a couple of others. I wanted to pocket the PCB to see how well it would do so, again I am very happy with the results and the 1/32 bit that I was using for both drilling and pocketing. I could pocket with a larger bit (perhaps a 1/16) but it would take as much time to change the bit as it would to let the job run. This practice run was 22min. I have as much fun designing the PCB and running it on my CNC as I have had with pretty much anything else in this hobby.

    Good advice on the traces, thanks. I will widen them accordingly. Do you think doubling them would suffice?
  13. bigtalltim

    bigtalltim New Member

    Joined:
    Sep 10, 2010
    Messages:
    189
    Location:
    Belfast
    Balance:
    361Coins
    Ratings:
    +2 / 0 / -0


    Hi Riton and adbgg

    Sorry about my late reply - I have been away on business most of this week and unable to find time to post!

    I dont have one of these boards yet (I am seriously thinking about getting one just for testing!!), but you were making good progress on this adbgg - Riton, I think your question on stopping the movement is explained very well in the first post in adbggs post Small Prototype / VM110 + Sabertooth 2 x 10A

    On that point, my stop state in the profile is not a mistake - the relay solution uses the PWM at maximum value to stop the motor
    (in my setup, 0%pwm=full motion, 100%pwm=Stop)

    This is quite confusing to explain without getting very technical, but I will post later on tonight with simple explanations and analogys where possible to try to explain exactly how the relay circuit works.
    (@Frakk... I am relying on you to keep me right if I get any of the description wrong!! :D)

    The stop in adbggs profile works in a different way but both solutions give a stop! - in adbggs solution, stop sets the output at 50%...
    neither one direction or the other = stop

    So, you have made good progress with the movement, and just like my solution, when you move the slider in test tablet, the motor moves one way or the other... it just doesnt stop - but neither does mine if you take away the feedback pots!

    If I disconnect the inputs, my solution works exactly as you describe - in fact, you can see this in the first few videos I posted with no position feedback... as the slider moves up and down, the motor changes speed, and changes direction, but does not stop at any stage until the middle state is reached

    I think your problem may be feedback pot related, not profile
    Question for both of you - how are your pots set up?

    I am absolutely sure that there is a solution to be found here... we just need to rule out possibilities one by one until the solution is found!

    I think that the first thing to test here is that the feedback pots are doing their job. ;)

    @adbgg - On connecting the K8055 to your sabretooth in different ways, I'm afraid I don't know...
    I have no way of testing, and cannot be sure from the documentation - the best advice I can give you at this stage is that you should ask on the Velleman forum... they are superb!

    Tim
  14. adbgg

    adbgg Member

    Joined:
    Feb 2, 2010
    Messages:
    78
    Balance:
    132Coins
    Ratings:
    +1 / 0 / -0
    Hi and thanks for your quick reply,

    Maybe it could be a problem of potentiometer, but everything seems to be alright in X-sim (and even with the Velleman software).
    I mean there is a good feedback of the position in X-sim (between 0% and 100% depending on the position of the motor. I have calibrated the potar, so I think everything is ok, but I'm not sure).
    I give below the picture of my connections :

    [img600px]http://nice.maurice.free.fr/X-sim/Test/K8055-Saber-potar.jpg[/img600px]

    You can see that I use a linear potentiometer of 10kh, directly linked to the motor.
    The connections between the K8055 and the potentiometer are easy to understand with this picture.
    In fact, I think I'm not so far away from the solution. I manage to replicate almost the normal behavior of the motor but without dynamic option. But, it is not what I expected.
    I would like to replicate exactly your model, your motor behavior. The motor moves and when it reaches the position, it stops. And everything with dynamics option. This is what I would like to do.

    Thanks for your post,
    Thanks for your help,

    Regards
  15. riton

    riton Active Member

    Joined:
    Jul 6, 2007
    Messages:
    600
    Location:
    France
    Balance:
    1,006Coins
    Ratings:
    +103 / 3 / -0
    thanks for your help!!

    I think the probmème is that rotation direction and speed is the same signal.
    maby it is not a problem but i don't say if it possible ti configure Xsim dynamic speed with this configuration....

    if it has direction with digital output and analog output with speed, it works.

    it works because, for exemple , for a positive sequence: we have the speed and direction in dynamic speed digital output
    you move the slider 21, the engine is running because he know the direction with digital direction and speed with dynamic speed.

    the problem with our circuit is that it does not know how to stop.
    you move the slider 21:
    the engine running, and do not stop, he does not know how to stop
    in the sequence there are n information to stop.

    The Question:
    how to configure dynamic speed to an analog signal with full speed left 0v, 2.5, stop center motor 5v full speed right
  16. bigtalltim

    bigtalltim New Member

    Joined:
    Sep 10, 2010
    Messages:
    189
    Location:
    Belfast
    Balance:
    361Coins
    Ratings:
    +2 / 0 / -0
    Hi Riton

    In answer, I have to admit that I don't know - but I doubt that true speed control is possible without using PWM...
    the description I am about to post explains how PWM controls the speed - maybe the solution will make more sense then.

    EDIT: But it may be possible to emulate speed control by the use of pulse routines in the profile... kind of a very crude version of PWM

    Definitely one to post on the Velleman forum ;)

    Tim
  17. bigtalltim

    bigtalltim New Member

    Joined:
    Sep 10, 2010
    Messages:
    189
    Location:
    Belfast
    Balance:
    361Coins
    Ratings:
    +2 / 0 / -0
    Hi Adbgg

    OK... I have two requests for you:
    1. So that I can get an idea of how close you are, could you post a video showing the movement - if possible, could you arrange the camera so that the slider is also in shot...
    2. Please could you post your profile so that I can see how you have things set up

    Also please could you be more specific about how the movement you are getting is not what you expected... is it that the motor does not change speed, or that it is very jumpy or that it does not stop when the pot has reached its desired position? there are so many variables it is difficult to know where the problems might be

    There is one other suggestion that I will make:
    One of the preloaded profiles in Profiler2 is for the K8055, and uses pulsing routines to control speed.
    I believe it was originally designed for a pnumatic setup, but the pulse control might just work for you to control speed via the analogue output - it is a very different kind of profile, but definitely worth a look ;)

    Tim

    Tim
  18. riton

    riton Active Member

    Joined:
    Jul 6, 2007
    Messages:
    600
    Location:
    France
    Balance:
    1,006Coins
    Ratings:
    +103 / 3 / -0
    maybe sirnoname can explain how to write the sequence dynamic speed,
    assistance would be really impportante to advance on this point,
    sirnoname?
    thanks for your help
  19. bigtalltim

    bigtalltim New Member

    Joined:
    Sep 10, 2010
    Messages:
    189
    Location:
    Belfast
    Balance:
    361Coins
    Ratings:
    +2 / 0 / -0
    OK - any electronics experts in the house, please tell me if any of this is wrong... :thbup:

    I have tried to explain how the two outputs on the K8055 that I use in the relay solution are able to control the motors.
    The descriptions on component behaviours are school level at best, but may be helpful to anyone else like me with a limited electronics background!

    How the PWM Output Controls the Speed

    The Transistor has three legs - Base, Collector and Emitter
    Think of the transistor as being like a tap - if there is sufficient current applied to the base, then the tap is on and current is able to flow (like water through a tap) between the Collector and Emitter legs.

    This means that if the base of the transistor is supplied with only just enough current to turn on the tap, we can control the activity of the tap by stealing some of the limited current with the K8055 output - taking current in this way means that there is not enough left over to switch the transistor on and allow the electrical current to flow between Collector and Emitter.

    The 1K resistor makes sure that the transistor base is supplied with only just enough power to turn on the tap!

    The K8055 PWM output operates by stealing some of the limited current, and in doing so, switching the tap off.

    Simply put, the result is that the transistor tap is on when PWM is fully off, and off when PWM is fully on.

    By controlling the frequency of the pulse (PWM = Pulse Width Modulation) the K8055 is able to control the speed of the motor...
    (by switching it off and on in a series of bursts)

    The motor always runs at full speed, but is only on for part of the time, giving a speed reduction effect

    ON ON ON ON = Full speed
    ON ON ON OFF = Three quarters speed
    ON OFF ON OFF = Half speed
    ON OFF OFF OFF = Quarter speed
    OFF OFF OFF OFF = Stopped

    This last example shows why my profile uses 100% PWM to stop the motor.


    How the Relay controls the direction of the motor

    The relay has a built in electromagnet which is used to flick the internal contacts across into a different position - in our application, this changes the direction of the motor.
    When current flows through the coil, the magnet is activated and the contacts move to their new position.
    When no current flows, springs return the contacts to their original position.

    A circuit must always be complete - if there is a break in continuity, it can not work as intended, because current cannot flow.
    If there is a short circuit, the controlled flow of current is compromised and the circuit will not work as intended.

    In the relay circuit, no current is able to flow until the Digital output opens - there is just nowhere for it to flow to!

    When the K8055 output activates, the maximum current allowed by the relay coil (which has its own internal resistance)
    flows into the digital output of the K8055 - this is why it must be limited... either by the internal resistance of the coil, or by some other means... otherwise the K8055 will suffer.

    ALWAYS CHECK THE MAXIMUM CURRENT DRAW IF USING A DIFFERENT RELAY FROM THE ONE SPECIFIED IN MY BUILD

    If in doubt, it can't hurt to use the newer relay circuit with the second transistor.
    With the original 12V spec this is unnecessary as the relay coil does not draw enough current to overload the K8055

    If the maximum current draw is greater than 100mA, you have no choice but to use the second transistor (a resistor between the relay coil and the K8055 output would indeed protect the K8055, but would not allow enough current to flow to fully activate the electro magnet coil and throw the relay switch).

    The following picture shows how I intend to adapt the pcb layout to include this extra transistor - there is already a track that brings full power down to the right area of the board... the blue lines show connections to the new transistor - if using this, you would have to map around your component footprint to make sure that the legs all reach the right place when wiring up your circuit... my intention here is not to give a viable pcb layout, but instead to show how simple the addition of the extra transistor could be ;)

    pcb extra transistor with wires.JPG

    Hope that helps!

    Tim
  20. bvillersjr

    bvillersjr Active Member

    Joined:
    Oct 11, 2008
    Messages:
    1,174
    Location:
    Ohio, USA
    Balance:
    438Coins
    Ratings:
    +23 / 1 / -0
    Are you experiencing noise issues with this design / layout?