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

Arduino UNO/Duemilanove 2dof firmware

Discussion in 'SimTools compatible interfaces' started by prilad, May 29, 2013.

  1. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    prilads is the man.. loll. :thumbs man u don't believe.. the guy who is selling the kit wants $1000,00:eek: thats is insane,, prilad just remains one thing look at the video.. I'm getting 1022 and-1022 so its not given me the 0v and the 5v as expected you can see, the voltmeter stays in 3,70v and 0,17v,, you told me that i should get 1023 and -1024 but don't matter what i do it never passes 1022 it must be some simple stuff,

  2. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Sorry, buddy, I forgot that I created some limits for PWM signal... Yes -1022...+1022.

    About your video:

    Yes. It works correct. I draw your attention that when PWM > 0 voltage on pin IN1 have nearly GND value (0.17V) and when PWM go to "minus" voltage on this pin smoothly increased to max possible value.

    On opposite pin (IN2) you should see another "picture" - when PWM > 0 voltage must increased and when PWM<0 voltage must be = 0V.

    Why low value = 0.17V and high value = 3.7V? Show me, please, where you connect multimeter? 3.7V (instead 5V) may be because we try to measure PWM signal by multimeter. But 0.17V - ???
  3. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    in principle i was taken the pcb ground, but it never drops beyond 0.17 or go above 3.17, so i I've token the ard GND and and could get -0v and 4.78.. i understood what u said..... which GND should i take?
    but i may found the center of the all problem.. look at this another video..

    i have unplugged the ard usb.. and powered the pcb as u can see if i touch the pcb wire to the h-bridge it powers the h-bridge... thats is why i can't get the motor to stop at 0v...its always running doesn't matter what i do with the sliders i just can feel an decrease in speedy but very light when moving sliders.. it seems that the pcb in some points are working independently..

  4. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    this is my diagram
    i think its all correctly

    Attached Files:

  5. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Ok. You should check pcb. It's very easy

    1 - disconnect PCB from Ard and H-bridge

    2 - connect +5V power supply to PCB. Check voltage by multimeter

    3 - connect DIR input to GND,
    -- check Voltage on BC-547 collector (it must be +5V)
    -- check Voltage on IN1 and IN2 (it must be 0V becouse PWM input disconnected and pulled-down by resistor)

    4 - connect DIR input to VCC (+5V),
    -- check Voltage on BC-547 collector (it must be near 0V)
    -- check Voltage on IN1 and IN2 (it must be 0V becouse PWM input disconnected and pulled-down by resistor)

    5 - connect PWM input to VCC (+5V)
    -- if DIR connect to VCC then IN1 must be 5V and IN2 = 0V
    -- if DIR connect to GND then IN1 must be 0V and IN2 = +5V
  6. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    And one more thing - are you shure that GND from h-bridge was connected to GND pcb when you made last video?
    Its must be connected...
  7. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    as u can see in the test some voltages diverges
    ALL DISCONNECTED
    1) connected 5v+ to pcb, and DIR input to GND
    bc547 5,30V+
    PWM IN1/IN2 0,79v (not 0)
    2)dir Input on vcc…. and gnd on pcb
    bc547 O,O3V
    IN1 0,40v
    IN2 1.1V pwm
    3)
    pwm in 5+ and dir in vcc
    IN1 4.63vV
    IN2 0.14v
    if dir in gnd
    in1 0,14v
    in2 4.63v
  8. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    and nope I'm not using the gnd from h-bridge anywere

    i was powering the pcb only with atx 5+ and negative....
  9. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    so the correct way to power the pcb is as follow in the picture?

    Attached Files:

  10. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Oh, no-no-no.

    When you connect pcb to Arduino you SHOULD connect GND from Ard to GND pcb !!!
    When you connect H-bridge to pcb you SHOULD connect GND from pcb to GND H-Bridge !!!

    diagrama.jpg

    When ALL boars is connected you should make ONE common GND circuit.

    This is not very good, because the "power" of the power supply of the H-bridge is connected to the ground computer (throu the GND wire in USB cable). But otherwise nothing will not work. An alternative is special galvanic isolation between the Arduino and PCB

    ??? It should not be.. It's not correct.
    • Like Like x 2
  11. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    hey prilad I'm almost there..i will free you, i promisse loool:thumbs
    i was testing the h-bridge with 5v.. it was just for test, but when i try with 12v.. i could get the 4.63, practically 5v
    in this another video u can see that..when i move the slider from 50% to up the motor starts but when arrive the top it stops... and from 50% to down theres no current,,,,

    but when i move the pot it does the opposite from 50% to down it starts, when arrive in the bottom it stops..

  12. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    and hows my diagram now?

    Attached Files:

  13. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    I'm sorry, but I still do not understand what you have going on. too little information. You again in a hurry to work with the engine, and I ask you to make some tests wihout Arduino and H-bridge , about which I wrote above. You've got something does not work, but I do not understand - that's it.

    Please make all 5 tests and tell me about ALL results. Because
    is wrong... I can't understand this
  14. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    sorry mate here goes a detailed

    1) 5+ on pcb with gnd from atx into the pcb (to power it)

    bc547 5,10v (with dir connected to gnd)
    IN2 3,2V IN1 0,17 (THERES A PROBLE HERE)
    if i disconnect DIR FROM GND,, and live only 5+ and negative from atx
    IN2 0,15 IN1 0,37

    but if i remove the negative wire of the atx from the pcb and connect dir direct to the atx gnd it stays
    bc547 4,10
    IN1 and IN2 0,17

    2)
    DIR ON VCC ( the pcb is with 5+ and gnd from atx) to power it
    bc547 0,5
    IN2 0,15 IN1 1v


    3) dir on vcc with pwm…. (the negative from atx is powering the gnd of the pcb)

    IN2 0,17 IN1 4,30
    DIR ON GND
    IN2 4,30 IN1 0,17

    i hope u understand,,
  15. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Stop... What do you mean "negative" ? You should connect to pcb ONLY +5V and GND. Only TWO wires. What is "negative"? You mean "-5V" or what? No-no... "-5V" from ATX never used in this schematics (so as "-12V" from ATX)
  16. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    ohh shit... my bad man.....

    negative i mean -5 from atx the (black wires)
    for example...... i took +5 from atx and the black wires from atx too
    so i shouldn't did this? so whats the gnd from atx? i thought they were the black wires loool

    (living and learning) loool
  17. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF

    Ok. Black wires from ATX is GND (marked as "COM" mean "common" wire)
    But what do you mean "GND ATX"? ATX case (housing)? You should not use this. Only black wire as power GND
  18. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    And of course you have to measure all of the signals relative to GND pcb (not ATX-CASE)
    • Like Like x 1
  19. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    when i say gnd/negative the are the same black wire, i think I've confused you....
    in the most part of the tests i lived they plugged to power the pcb as it is in picture,, take a look

    Attached Files:

  20. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    i think that or the CI HD74LS08P is the problem, (but they are the same practically) or some resistor.. or the wires connection (GND) is not right

    (I HAVE BUILT another pcb and they act the same so.. it must be or the CI or the wires connections end thats not right,,,, discard the resistors