28BYJ-48 Stepper Motor Project ?

Discussion in 'Welcome to the DARK side' started by Colin_W, Feb 4, 2021.

  1. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    So what are you using your 28BYJ-48 Stepper Motors for?
    How about ( dare I say it? ) point motors :eek:.


    This is the original Version.1. You can see the hall effect transistor that I used originally for zeroing or Homing the motor. In the end I didn't need it for this project as I found that it was easy to stall the motor and being a Stepper didn't give any increase in current. So I just rammed it into the end of the Rack travel slot. From there the distance can be easily set with a 10K Pot. This particular unit is controlled by an ATTiny85 chip but any Arduino can be used and the Pro Mini or the Nano gives enough outputs and inputs to control distance and speed for two motors. The main problem with these are the amount of current drawn by the motors 350 - 370mA per unit but the motor can be switched off at the end of travel in software. As the first thing the motor does is to drive to it's home point and you have say 10 of these starting at switch on then your 5volt supply will need to give about 4 amps. The answer may be to give each board a startup time delay in software as you build them (maybe 2 Seconds) and run the motor at a higher speed for the start. The cases are of course 3D printed and are now onto the Ver 5. with better gearing and an arm for other uses. The wire shaft for driving the point across has been replaced with a 2.5 mm pop rivet with the head pushed down the shaft. Using the larger Arduino chips would give the advantage of driving things like signals or a changeover relay for frogs.
    Stay Safe and Sane
    Col :hammer:
     
    Last edited: Feb 4, 2021
    steve likes this.
  2. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Adjusting the travel on the motor.
    Tweek the pot, press the reset and then when the motor has homed press the test to see how far it has moved.
    Sorry about the garbage video :whatever:
     
  3. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    This board is similar to the other ATTiny85 board but I have built the motor driver board onto my own PCB with two motor connections. This would be useful for a two point crossover, both points moving at the same time.
    It works the same as the last one but no LED's. If you look at the start of the video though you will see the meter shows a current of over 650 mA, something to keep in mind.
    As the ULN2003 chip only gives a maximum of 500mA this causes a problem. The chip can't supply enough current to drive both motors. The answer to this is to solder two chips
    one directly on top of the other doubling the available current to each output to 1 amp.

    This board was driving me crazy for a wee while as the motors were turning in opposite directions.
    I finally realised the naked motor has come wired differently to every other one I've ever seen The Pink and Blue wires are transposed.:facepalm:
    Doubling the ULN2003 current.
    piggyback chip.jpg
     
    Last edited: Feb 4, 2021
  4. Andy_Sollis

    Andy_Sollis Staff Member Moderator

    Messages:
    3,896
    Likes Received:
    3,622
    Joined:
    Aug 4, 2018
    Mine runs my turntable via an arduino board
     
  5. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,849
    Likes Received:
    5,902
    Joined:
    Dec 5, 2015
    Hi Colin

    I couldn't see the video's, they marked up as private.

    Although I hadn't thought of using them for point motors.

    Paul
     
  6. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Hi Andy, I think you were the only one to persevere and win with the Turntable. I was going to use one on a club layout and went the same way as you with the 'Nudge'
    buttons but when I thought about some of the older members and the incoming flack I chickened out and used a Nema 17. Cowardly I know :(.
     
    Andy_Sollis likes this.
  7. Andy_Sollis

    Andy_Sollis Staff Member Moderator

    Messages:
    3,896
    Likes Received:
    3,622
    Joined:
    Aug 4, 2018
    No, not at all.. probably a more practical solution..

    I have adapted my bottom of the turn table now with a new bearing and brass rod post. The motor now stands much lower down with a coupling converter between the two, so in theory i could change the stepper and just amend the programming to suit.

    one day it may actually get installed, but can’t get to my dads at the moment.

    andy
     
  8. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Yes, it's a problem getting out and about. I haven't installed the one at the club yet, so frustrating.
    Col
     
  9. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    I've been pushing on with this now the weather is a bit warmer, it keeps me busy ;). I was going to build the whole control board onto a piece of stripboard but decided to use the driver boards that come with the motors instead. This made life considerably easier although I did replace the header pins with screw blocks. It also allowed me to drive two motors in parallel for a crossover after wiring two driver boards from one set of output pins on the arduino nano.
    I was looking for a way to put them on soak test and keep them running, the test buttons are just test buttons, and having already built a wireless hand throttle thought I'd have a poke around with a pair of HC-12 wireless modules (remember those Paul L :thumbs:) and so the ones you will see in the video are actually under wireless control( another bag of worms opened). They have now been running for 3 days 9am to about 10pm.


    Col
     
  10. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,849
    Likes Received:
    5,902
    Joined:
    Dec 5, 2015
    Wow impressive :worship::worship::worship::worship::worship:

    I remember the HC-12, I even have some, and kept somewhere safe :facepalm:

    And for the polirity control of the V ? maybe a relay on the board ? - don't want you getting board

    For those thinking that this may be a bit expensive here is an EBay link for a 28BYJ-48 Stepper motor ond driver board currently at £1.74 from China, for those that can't wait you can get 3 for just under £10 from UK suppliers within a few days.


    Paul
     
  11. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Do you mean a Frog switching Relay? Or Maybe some signals? Or maybe both?


    Col :thumbs:
     
  12. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Moving on :headbanger:I have now replaced all 11 servos on my (what I like to call loosely) layout/test bed with the 28BYJ-48 stepper point motors and now have them running via DCC++, JMRI and engine driver BUT with the option of having a wireless mimic panel with push buttons.
     
    jakesdad13 and Andy_Sollis like this.
  13. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,849
    Likes Received:
    5,902
    Joined:
    Dec 5, 2015
    Sweet, very sweet Colin
     
  14. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    3 Way Point control from the Dark Side was to be my next step with the 28BYJ-48 stepper motors and here it is in fashionably late style as Keith has opened a new thread on the beast in question :thumbup:. My only experience is with the Peco OO version with insulated frogs although switching shouldn't be an issue using the Arduino. So for anyone interested here's the video.
    Col
     
    paul_l and jakesdad13 like this.
  15. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Something for the O gauge guys from 'The Dark Side', again could be push button wireless or DCC. Mix & match. Kept me busy for an hour or two or three or.......

    Col
     
    paul_l and jakesdad13 like this.
  16. jakesdad13

    jakesdad13 Staff Member Moderator

    Messages:
    4,535
    Likes Received:
    2,071
    Joined:
    Dec 14, 2015
    Smoooooth
     
  17. Andy_Sollis

    Andy_Sollis Staff Member Moderator

    Messages:
    3,896
    Likes Received:
    3,622
    Joined:
    Aug 4, 2018
    Is this stepper motor or servo?
     
  18. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Hi Andy, it's two of the 28BYJ-48 5 volt steppers with basically the same arduino circuit I'm using on my points.
    Col
     
    Andy_Sollis likes this.
  19. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,849
    Likes Received:
    5,902
    Joined:
    Dec 5, 2015
    Really impressive Colin and soooooooo smooooooooth

    :tophat: :tophat: :tophat:

    Paul
     
  20. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    It's just getting to the edge of the slow limit Paul, any slower and you can start to see the stepping action so sadly without gears I don't think I can make it into OO :(.
     
    Andy_Sollis likes this.

Share This Page