Jump to content
 

Rigid Collision

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by Rigid Collision

  1. DCC monitor quirks

    I have my turntable running with a Nano and A4988 using the 6N137 circuit for DCC interface.

    I have another system running DCCMonitor to check what is happening on the DCC. I have tried the monitor with Hornby Select, Lenz 100 and a Sprog. 

    On the select I need a loco on the tracks before I can read any signals - similar results with the other two systems and the odd drop out on Lenz. I have checked circuitry and used duplicate electronics, but no clues.

     

    I suspect the DCC needs a 'load' to operate, but I have been searching literature and can't find an answer to this.

    Also the setup on a Lenz system works for a while and then stops responding - maybe too much power draw as it has a few locos running. 

     

    Any pointers greatly appreciated - thanks in advance 

     

     

     

    I have had a fair bit of interest in the board I made.

    Pricing is as follows:

     

    Bare board - £20 Incl. P&P

    Complete kit (less Nano but including A4988) unassembled - £30 Incl. P&P

    Complete kit (less Nano but including A4988) assembled and tested- £40 Incl. P&P

     

    Comparable pricing with Uno and Adafruit shield pricing but in a neater package with a DCC interface. :)

    I have a few boards/kits left and if there is interest I will get some more in. I may start using the Micro Pro board as it has more interrupts (the Nano and UNO only have 2 I/O ports capable of interrupt!).

    It will require some minor design changes but it is possible to hook up some of the I/O to pins to enable them to be user configured.

     

    If anyone has any requests I might look at doing other DCC Arduino project PCB boards for lights or signalling?

     

    Where is the best/most convenient place to upload my AccelStepper libraries with 'setBacklash'?

     

    Regards,

     

    Hello Rigid,
    I had no more news of him, the money arrived?

     

     

    What is this post? :)

    Has anyone used y boards yet? Really interested on how people are getting on with them.

  2. Hello

    I used ALLPCB absolutely brilliant - mine took a week but were sitting at the local couriers here over the weekend. I would recommend them as the boards were first class.

    I think I will stick with Eagle as it seems better for Macs and I haven't used Windows machines for ages.

    I have the circuit up and running, but I have already a list of extras I might add. The circuit design and build was so easy I will throw away the breadboards altogether!

    I have sourced a stepper with a double shaft so I am thinking I will use a rotary encoder on one end as a reference and then I can have a nice feedback loop to improve accuracy.

    I can get a 1024 step one for US$40 which would give me a shade less than a millimetre it the rim - might not be good enough though. After all the 3200 step stepper would be batter than .33 mm.

    I do seem to have a bit of trouble getting the turntable to return to exactly the same position repeatedly 

    I think I will need another Nano to look after the encoder as it will need to use a couple of interrupts to work nicely. Any one tried this ? 

     

    regards

    I'm looking at my next board using the Arduino Pro Mini as it has more than two interrupts (I think).

     

    My code uses the 2 interrupt pins on the Nano. Have a look at my GitHub page for the code.https://github.com/RigidCollision/Turntable

  3. Just added a speed harmonics and vibration test for steppers on my GitHub site.

    It allows you to specify a lower and upper limit to step through sequentially, automatically running the motor at each speed in turn.

    It kinda helps 'dial in' the best combination of microstepping / speed / motor to limit the potential of running the motor at a frequency that results in it vibrating.

     

    Put the basic code for use with the turntable for getting it to work with DCC and a Hall sensor. It's basically Tenders code from page 1 or 2 of this thread with some minor adjustments for homing using an interrupt rather than sensing high or low on a digital I/O.

    Allows a little more flexibility for using the code WITHOUT accelstepper if you want to drive it that way.

     

    I am rapidly coming to the conclusion that accelstepper is simply not worth the overhead and hassle for problems it has been causing me with slow running issues and the inflexibility of some of it's 'features'. I am torn between abject laziness and writing my own slightly leaner library tailored for the turntable project with the actual functionality I need.

     

    Looking forward to testing TMC2100 drivers...

  4. Hi

    I have been following this topic - Really good info, so I now have an operating turntable - Similar to original but have used a QRD114 infrared detector for indexing - works good. I have a Peco TT and the sensor just sits underneath the deck.I do have trouble with the bearing which is binding despite attempts to align nicely. 

     

    I wanted to ask Rigid Collision where he got his PCB's done? I have been playing with eagle and I wanted a drive controller similar to his but with some extras ( I2C interface for things like a display) I have the board done and I am ready to have it built. I have only used soldering iron or wire wrap before so this is all new and I would like a good company to use. I am in NZ so China is OK for me.

     

    Any help appreciated

    thank you

    Colin

     

    ps first time using RM web so hopefully this message will arrive.

    Hiya,

    I used ALLPCB www.allpcb.com.

    These guys were GREAT. Good communication fast production and despatch; just 5 days from submission online to receipt via DHL!

     

    You are brave using EAGLE I tried to get to grips with it and found it mind blowingly buggy and awful. Having said that, my experience of delving into the world of PCB production was like turning the clock back 15 years software-wise. The world of PCB design seems to be populated with buggy and troublesome products that are hard to use and don't always deliver. Considering my 20 years designing 3d software (which is far mare complicated) I don't think it was my lack of ability and I was left totallyunderwhelmed.

     

    In the end I used DipTrace, I ditched the idea of circuit diagrams and adding components in favour of just using DiptTace rather like a glorified version of Illustrator. It allowed me to simply draw a board and add pads and traces whilst snapping to a grid. It allowed me to add silk screen details easily and it exported flawlessly into Gerber files with a drilling file. All-in-all much less hassle that 'designing' a board and specifying components and circuits!

     

    Regards

     

  5. In other news... I have been testing other Stepper drivers and can confirm the DRV8825 and DRV8824 seem to work nicely.


     


    The DRV8824 is a really good driver board if you have low amp stepper motors. I have tested it with 0.4a and 0.6a motors and it performs really well. It seems to eliminate microstepping inaccuracies that can be found with the A4988 (which manifest themselves as uneven microsteps). Fortunately the Polulu boards are all interchangeable (whew!).

  6. I have had a fair bit of interest in the board I made.
    Pricing is as follows:

     

    Bare board - £20 Incl. P&P

    Complete kit (less Nano but including A4988) unassembled - £30 Incl. P&P

    Complete kit (less Nano but including A4988) assembled and tested- £40 Incl. P&P

     

    Comparable pricing with Uno and Adafruit shield pricing but in a neater package with a DCC interface. :)

    I have a few boards/kits left and if there is interest I will get some more in. I may start using the Micro Pro board as it has more interrupts (the Nano and UNO only have 2 I/O ports capable of interrupt!).

    It will require some minor design changes but it is possible to hook up some of the I/O to pins to enable them to be user configured.

     

    If anyone has any requests I might look at doing other DCC Arduino project PCB boards for lights or signalling?

     

    Where is the best/most convenient place to upload my AccelStepper libraries with 'setBacklash'?

    Regards,

    • Like 1
  7. Rigid, that's a nice little backplane you've made.  Smart design--not threading traces between the pads etc.--I'll probably do something similar for my setup.  I have a small desktop CNC and can do boards by trace isolation routing with a sharp V-bit, which doesn't lend itself to traces between pads.

     

    And I like the bellows coupling you used in lieu of the more common helical-beam.  When you're going to the trouble of backlash compensation in the software, things like that just complete the package.

     

    Randy

     

    Thanks Randy, No point doing half a job :)

  8. The enable pin shuts down the FET's entirely, so there is no power to the stepper at all.  That might be a useful feature for manually positioning the table but it doens't provide any holding current.  That is what I'm excited about with the DRV8880.  For years, I've used driver boards using the older A3977 for my former Sherline CNC lathe and mill, and current lathe, with the enable line jumpered "on".  With open-loop control one just can't take the risk of powering down the stepper and hoping nothing moves...

     

    Randy

    Ah, OK. I see where you are coming from.

  9. Thanks to all who have contributed to this thread.  I have learned a lot in the past few days by reading it all!  My own turntable will be Arduino (Pro Mini) controlled but not DCC.  Just a push button to index it 180 degrees at a time--one incoming road and just a short over-run track opposite.  I don't plan on any sensors--just hold the table in alignment to the incoming road with a little jig that fits between the railheads during power-up.  The stepper will have a belt reduction to the table, so snapping to the default full-step position at power-up will not move the table perceptibly.

     

    In my professional life, I've been using stepper motors since the L/R-driver days.  In all the laboratory equipment I've been involved in designing, we dropped the holding current to the steppers after a move was completed.  Steppers produce much higher holding than running torque for a given current, so this is a safe way to decrease power dissipation.

     

    None of the Arduino motor shields, nor any single-board stepper drivers seem to have this feature.  But last night I discovered a new board from Polulu, the DRV8880 based on a TI chip.  This has two digital inputs that allow selecting 25%, 50%, 75% or 100% of the operating current which is itself adjusted by the typical trim pot.  Polulu's webpage for the board is https://www.pololu.com/product/2971

     

    Two digital lines from the Arduino will allow selecting full current at the beginning of a move, and reducing the current at the end of the move.  Since a turntable spends the vast majority of its time in a static position, this driver has the potential of decreasing the motor and driver power dissipation and thus heating.  I have ordered one and am eagerly awaiting it.

     

    Randy

     

    Hi Randy,

    As far as I am aware the A4988 has an 'enable' pin. On my PCB design I took the liberty of connecting it to the Arduino I/O 6, but as yet have not had time to put any code behind it to test it.

    Interesting that we have a new driver. I had looked at the DRV8825 but reports from users indicated less than satisfactory results and many users were going back to A4988's at they are tried and tested.

    I will get one and pop it onto the test rig here and see what happens.

  10. Liking that lots. Can I purchase a clone of your board, or copy your artwork?

    Thanks

    Simon

    Simon,

    No problem. I have 6 boards from the prototype run (there was a minimum quantity). You will need some header socket strip, some 2 and 3 pin terminals and a total of eight components (some capacitors, resistors, diodes and a 7805) but we are talking a few quid for the lot. I am getting a build spec sheet together for the boards for diy assembly with clear instruction to avoid mishaps and the links for eBay that I used to purchase components. I will also be posting the modified libraries and my code for anyone wanting to use the A4988 stepper driver. The libraries I used are v1.6 (the very latest ones) and are heavily commented to ensure that the code I added can be identified easily and can be applied to subsequent releases painlessly.

     

    Also keep you eyes open for power supplies. Basically anything from 7-30v is fine. Don't go too mad, just make sure it has more voltage than your intended motor. Avoid having the same voltage as your motor, as the A4988 works best if it has over voltage to chop correctly. It took me a while of hunting to find an old power supply that did the trick (felt a bit weird to actually buy a power supply when so many are thrown away).

     

    PM me and we can have a chat about boards...

     

    P.S. The artwork is only part of the story, you need PCB design software like 'Eagle' to enable you to layout and produce the 'Gerber' files required for all the layers that the PCB industry requires. A Gerber format file is produced for each layer on the board and even a simple board can have seven or eight different files for top silk screen, top copper, bottom copper, various masks and the CNC drill sizes and hole locations.

  11. Hi guys,

    It’s been a while since I was on this thread but in my defence I have been productively busy.

     

    Firstly I would like to thank ‘tender’. His initial thread and project build guidelines have spurred me on to where I am now. His guide and code has been the starting point for a good deal of fun and have introduced me into the whole world of electronics.

    Anyway, talking of where I am now, here goes…

     

    You may have seen my comments about motor noise from the stepper motor. I went off and did some research and found that microstepping seems to be the bain of all and sundry when it comes to quiet/smooth running of stepper motors. Another issue I found was that the Adafruit Motor Shield is OK, but not great. It is very limited on the current it can handle (and therefor the steppers it can drive) and whilst it is a ‘plug and play’ option for Arduino Uno users it is still going to require a board being made up to house the DCC control components. I was left with the feeling that the Uno/Adafruit combination is OK for tabletop ‘tinkering’ but for a dedicated single motor project it is not really the tool for the job. I really didn’t need to drive two steppers, four DC motors and a handful of servos. I needed to drive one stepper well and with the minimum of fuss.

    More research showed that powering the Arduino would take a dedicated and regulated 5v power input as well as a separate 12v power supply for the motor shield (as the Arduino cannot and should not be used to power a stepper motor on an Adafruit shield). I also had issue with the Adafruits choice of stepper driver. An H-Bridge driver is about as basic as it gets. This left me feeling like the whole thing could be improved. So I did (I think).

     

    Firstly, ditching the Uno. I got a Nano instead. At £3.50 it can be mounted on a bread board and easily mounted on PCB headers. You use the same code as you do for the UNO. Trust me; it just works. At approximately 1/6 the footprint of the UNO I was already making progress with a view to shrinking everything onto one breadboard.

     

    With ditching the idea of microstepping in mind, the stepper motor was a no brainer; just nipped onto eBay and get a Nema14 12v/0.8amp with a 100:1 planetary gearbox. The motor has a 1.8-degree step, which equals 200 steps per revolution. Multiply that by 100 and you are looking at 20,000 steps per revolution. Microstepping is for wimps! Plus, you get little or no whine, a cooler motor and little/no danger of uneven microsteps/missed steps. Happy days.

     

    The next thing was the stepper driver. I opted for good old A4988 Stepstick driver. No bigger than a postage stamp and drives a motor up to 2amp with voltages from 8-35v. Now that is a flexible bit of kit.

     

    It operates in a much more technical way than the H-Bridge. Effectively over supplying the motors voltage, but sensing and then chopping the power before it gets too much for it. That way when the motor warms up and the coils have more resistance it is able to adjust the power accordingly. Add to this that you can adjust the power cut off so you can under power the motor, reducing torque but also saving power and reducing any heat (If you have any).

     

    So ultimately I ended up using a 18v 2amp power supply for my 12v stepper motor with no issues. The next obstacle was getting the power to the Arduino Nano. It was staring me in the face (it was on the internet); use a 7805 5v power regulator and a couple of capacitors to regulate a feed from the 18v 2amp supply on my breadboard to the 5v pin on the Arduino. That resulted in a nice clean regulated 4.8v. Job done!

     

    The Hall sensor and DCC side of things I left untouched from ‘tenders’ original design.

     

    So… now I had a breadboard that looked like a rats nest. Sooner or later one of those little wires is going to come loose and I am going to have to get under my layout with a torch and bad eyesight and fix the damn thing in-situ. How do I get this mess into a practical bit of kit that will be robust enough?

     

    IMG_4241.jpg
     

    The answer was a dedicated PCB with headers to take the Nano, A4988, 6N137 and the other components required. I spent a day getting the design together onto a single sided PCB that is 5mm bigger than a credit card and sent it to China for prototype production on a 5 day turn around. I guess with a bit more time I could have shrunk the damn thing down even further, but space is not a real issue.

     

    pcb-design.jpg

     

    Whilst my design was having the time of its life in China I did some tweaking to the AccelStepper code libraries to introduce a ‘setBacklash’ parameter (I found details buried on the internet). This deals with any gearbox backlash (which is actually pretty minimal anyway). That way you can set the backlash in the same way as you set the other AccelStepper parameters e.g.

     

     

    …
    stepper1.setMaxSpeed(20.0);
    stepper1.setAcceleration(10);
    stepper1.setSpeed(20);
    stepper1.setBacklash(20);
    …

     

    It just senses the direction and adds the backlash steps accordingly.

     

    So there we have it a dedicated PCB with all the inputs and outputs to allow full DCC control of a stepper motor from 8-30v and up to about 1.5a with no additional cooling (or 2a if you fancy some active cooling).

     

    IMG_4253.jpg

     

    IMG_4255.jpg

     

    IMG_4259.jpg

     

    IMG_4256.jpg

    If you are interested in one of my boards to simplify a DCC/Stepper project like the ones on this thread, then please PM me, as I have some available. If you would like details of my modified AccelStepper libraries, again, PM me.

     

    If you are reading this thinking that it is all a little beyond you I can assure you that it is not as complicated as you would think. With a decent soldering iron and a little practise I got the first board fully assembled in approximately 1 hour (allowing a suitable amount of paranoid double checking between the assembly of each component). I had zero electronics exposure or experience a few weeks ago, now I have built a robust solution to run my project, learnt to solder and designed/produced my own PCB.

     

    Any questions? :)

    • Like 3
  12. Hi Guys,

    Having issues with this project atm.

     

    Got the DCC circuit up on a bread board, plug my DCC controller in (Hornby Elite) and all I get is 'error' on the Elite.

    Did some investigation:

    Took out the 6N137 chip so all I have is the 1k resister and the 1N4148 Diode

    I STILL I get an error. It detects it as a DCC short.

    I assume the resister is unidirectional?

    I am aware the diode is one direction only (and I have swapped it around just in case).

    With the diode disconnected there is no error (as it is an open circuit).

     

    Been over the whole damn thing testing for shorts and anomalies but this is as simple as it gets.

     

    HELP!

     

    Kind Regards,

     

    Sorted my issue. Turned out to be a faulty resister!

  13. Hi Guys,

    Having issues with this project atm.

     

    Got the DCC circuit up on a bread board, plug my DCC controller in (Hornby Elite) and all I get is 'error' on the Elite.

    Did some investigation:

    Took out the 6N137 chip so all I have is the 1k resister and the 1N4148 Diode

    I STILL I get an error. It detects it as a DCC short.

    I assume the resister is unidirectional?

    I am aware the diode is one direction only (and I have swapped it around just in case).

    With the diode disconnected there is no error (as it is an open circuit).

     

    Been over the whole damn thing testing for shorts and anomalies but this is as simple as it gets.

     

    HELP!

     

    Kind Regards,

×
×
  • Create New...