Page 5 of 5 FirstFirst 12345
Results 41 to 50 of 50

Thread: Magnetic compass build and code

  1. #41
    75+ Posting Member vikingsraven's Avatar
    Join Date
    Dec 2012
    Location
    UK
    Posts
    89

    Re: Magnetic compass build and code

    didnt know you attach files.
    DOH!
    Attached Files Attached Files

  2. #42
    25+ Posting Member Doug77's Avatar
    Join Date
    Aug 2012
    Location
    scotland
    Posts
    49

    Re: Magnetic compass build and code

    Me either till a few days ago

    pololu boards have been ordered so until they arrive I will continue with my Radio build..though im looking forward to learning about the code you posted as well, I also had to look up MODULO 9... you are a hard taskmaster and my learning curve just keeps on climbing lol

    Doug..

  3. #43
    75+ Posting Member vikingsraven's Avatar
    Join Date
    Dec 2012
    Location
    UK
    Posts
    89

    Re: Magnetic compass build and code

    HI , ive done a bit more, not sure if i over complicated it a bit, heads spinning at mo with work.
    i've attached the ino file.

    ive added the trap based on fess-ters idea and then added some code to take up the error of the 9th step, so every time it goes over the count of 9 in either direction it add's or subtracts the correct extra pulses, ive done a /9 rather than modulo, cos we need to actually add extra after 9.
    Don't forget this is written for a 200 step motor with no gears and half stepping microsteps.
    I would appreciate some feed back on what i have done please, but please be gentle!

    In theory this should work now, it was running ok , but i need others to check! ( haha lack of confidence shows here!)
    Attached Files Attached Files

  4. #44
    75+ Posting Member vikingsraven's Avatar
    Join Date
    Dec 2012
    Location
    UK
    Posts
    89

    Re: Magnetic compass build and code

    and the number of the count shall be nine, no more , no less, unless though continue to counteth to nine, eight is not good unless followed by nine , ten is right out!!!!!!
    sorry had to be done just re read the above post( for those of you who don't get it, Monty Python and the Holy Grail!)

  5. #45
    25+ Posting Member Doug77's Avatar
    Join Date
    Aug 2012
    Location
    scotland
    Posts
    49

    Re: Magnetic compass build and code

    Hi Mark,

    The Holy hand grenade LOL...

    Ive downloaded your latest INO and am looking forward to trying it out!!!.... My Pololu boards havent arrived yet so in meantime Ive been working on my Radio (more to follow).

    I just realised that the POLOLU boards only work with BIPOLAR (and 6 or 8 wire Unipolar) steppers and upon checking realised my cheap Ebay ones are UNIPOLAR 5 wire (which dont work with Pololu) so I had a root around the net and found a very simple solution that I thought others may benefit from so here goes....


    I love these little 28BYJ-48 step motors because they are very very cheap, small in size, 5 Volt and reasonably accurate (sounds like im selling them lol) perfect for making instruments.

    They are 4 Phase Unipolar and come with their own driver board and a built in gearbox.... HOWEVER they will not work with a POLOLU controller board unless you do the following simple little MOD which apparantly has the advantage of not only making them 100% BIPOLAR but also increases the output Torque by 3

    IMG_0396.jpg

    You will see a small Blue plastic cover on the side of the motor where the control wires enter, if you use a thin screwdriver or similar you can pop this off as there are 3 small tangs holding it in place (2 at spindle end L&R and one in middle at bottom), once you have done this you will see a small circuit board with 3 tracks, simply take a small knife or similar and cut the centre track...SEE THE PICTURE!!, and thats it you now have a 100% fully functioning Bipolar stepper all you do is Ignore the red wire (centre) and if you ever want to revert back to a Unipolar its a simple case of soldering over the cut track

    CUT.jpg
    Hope this is of use to someone

    Doug...

  6. #46
    75+ Posting Member vikingsraven's Avatar
    Join Date
    Dec 2012
    Location
    UK
    Posts
    89

    Re: Magnetic compass build and code

    Doug they can be used with bipolar or Unipolar mototrs http://www.pololu.com/product/1182/faqs, but i like the mod

  7. #47
    25+ Posting Member Doug77's Avatar
    Join Date
    Aug 2012
    Location
    scotland
    Posts
    49

    Re: Magnetic compass build and code

    Hi Mark,

    You are correct that they can be used with a Unipolar as stated in the link you sent me

    "However, if you have the appropriate control circuitry, you can increase the stepper motor torque by using the unipolar stepper motor as a bipolar stepper motor (note: this is only possible with 6- or 8-lead unipolar stepper motors, not with 5-lead unipolar stepper motors). Unipolar stepper motors typically have five, six, or eight leads."

    unfortunately the 28BYJ-48 is a 5 lead stepper and therefore cant be used unless you carry out the modification because the centre taps on the two coils are joined (centre track) and would therefore cause the motor to short out with the result of destroying the Pololu

    it also occurs to me now that by adding a wire to the bottom side of the cut track in the MOD that the motor could be turned into a 6 wire unipolar stepper!!!!!

    Although to use with Pololu in Bipolar mode only 4 wires would be used ignoring the centre taps , making it 4 wire 2 phase bipolar

    I believe the general thinking these days is that Unipolar is old-school and Bipolar is the prefered way to go

    We are both correct ...have amended my previous post thanks for pointing it out to me Mark

    still waiting for my Pololu`s

    Doug...

  8. #48
    25+ Posting Member Doug77's Avatar
    Join Date
    Aug 2012
    Location
    scotland
    Posts
    49

    Re: Magnetic compass build and code

    Hi all,

    Pololu boards finally arrived and work well

    Mark I have tested with your INO and all seems good except I need to increase the amount of steps as currently a 90 Degree swing on the simulator Compass only gives me an approx swing of 30 Degrees on the stepper...

    Ive tried multiplying the Step with no success so I figure im doing something wrong with the code,

    Ive only managed a few hours today as Im still busy here, also I have quite a few things to upload for my comms build

    Doug..

  9. #49
    150+ Forum Groupie
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    227

    Re: Magnetic compass build and code

    Quote Originally Posted by Doug77 View Post
    Hi all,

    Pololu boards finally arrived and work well

    Mark I have tested with your INO and all seems good except I need to increase the amount of steps as currently a 90 Degree swing on the simulator Compass only gives me an approx swing of 30 Degrees on the stepper...

    Ive tried multiplying the Step with no success so I figure im doing something wrong with the code,

    Ive only managed a few hours today as Im still busy here, also I have quite a few things to upload for my comms build

    Doug..
    Hi all,


    Is there any further information available about increasing steps as mentioned by Doug?


    Regards

    Jan

  10. #50
    75+ Posting Member vikingsraven's Avatar
    Join Date
    Dec 2012
    Location
    UK
    Posts
    89

    Re: Magnetic compass build and code

    hi guys sorry not been on for a while, usual chaos of my life.
    Anyway try removing the micro stepping from the popolo board , if i remember rightly those stepper motors are geared, so its just compounding the issue.
    let me know if that helps

Page 5 of 5 FirstFirst 12345