Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Nexstar Raspberry Pi Controller


tekkydave

Recommended Posts

OK then - abridged version...  HAT finished and connected up after shutting down RPi etc. Ekos and indiserver seem to be communicating fine but no stepper motor movement. :(

Link to comment
Share on other sites

Checking voltages - 5v line reads 5v - 3.3v line reads 3.28v - 12v line 13v (PSU says 12.9v).  Guess I need a way to run the stepper motor continuously so that I can check logic levels and states with oscilloscope.  The problem could be in any number of places :(

Link to comment
Share on other sites

Found a way to get a long series of steps sent to the stepper motor - set target number to 10000 (maximum) and click of Set.  This causes Ekos to request 10000 ticks/steps through indiserver.  Then target set to 0 and Set should move the focus in the other direction.  Timed the process and it takes about 45s - not much time for testing but better than nothing.

Edited by Gina
Link to comment
Share on other sites

Not enough time to find what's wrong but I did get some info.  The Dir line changes state as expected and the Step line shows 1.6v when the focus is supposed to be moving indicating about a 1:1 mark/space ratio of the step waveform - 0v when not moving.  The Sleep line goes to logic "1" (3.28v) when running otherwise 0v - also correct.  The M0 and M1 lines connected to MS1 and MS2 of the A4988 do not change, remaining at 0v corresponding to full stepping.  There is 0.6v on the coil current test point on the A4988 carrier yet the bench PSU supplying the 12v shows no current drawn.

Edited by Gina
Link to comment
Share on other sites

Shut down and swapped driver module for a brand new alternative out of a sealed plastic packet.  The replacement is a DVR8825 version which is pin for pin replacement but can handle more power and can micro-step up to x32 rather than x16.  I don't have a new A4988 module for a direct swap.  No difference except that there is no voltage on the coil current test point with the new driver module.  DMM testing shows that the driver is getting the right voltages on the power pins.

Calling it a day now and packing up.  Tomorrow is another day...  Maybe something will turn up - I'll be checking absolutely everything I can.

Link to comment
Share on other sites

Yes, it's connected to the +3.3v rail.  Straight across white covered wire in my photos on the previous page.  I'm expecting it to be something silly like that though.

Link to comment
Share on other sites

Been doing more testing but still no joy :(  All voltages and signals seem correct on the pins on the driver module.  I've also changed the motor for a NEMA17 but that doesn't turn either.  That means I've changed everything except the HAT and the RPi.  My gut feeling is that it's something very simple but I'm totally foxed :(  I could make up the second HAT I guess and try that.

Had a thought... I wonder if the Vdd voltage makes any difference - that's the only difference I can see between your's and mine.

Edited by Gina
Link to comment
Share on other sites

I have checked the Gnd rails and they are connected.  The motor pins are connected correctly too - on both motors.  The NEMA17 is off a working 3D printer setup and the RAMPS connections are the same as my HAT connections - straight across from the driver to the motor connector. 

There is no voltage on the motor pins either static or when the focus is supposed to be moving.  In other words, there's voltages and signals going to the driver board but nothing on the outputs and no current drawn.  It's just as if the driver isn't there - except that the reference voltage for the coil current sensing is present and normal value on the A4988 module (but 0v on the DVR8825 board).

Link to comment
Share on other sites

Yes.  Measured with DMM on top of driver board pin where it's soldered to the board.

Vdd wired to +3.3v and everything powered up.  Vref for current sensing now showing 0.23v and all voltages normal except that the SLEEP line is reading 1.0v.  Now to start indiserver and connect KStars/Ekos.

Link to comment
Share on other sites

Some progress...  Motor pins are now showing around +12v and a bit less indicating some current flowing through the coils.  Also the bench PSU is showing a small current on the 12v supply.  But the motor shows no noticeable motion.  Tried using the NEMA17 but same - no rotation.  Tried increasing the Vref to 0.34v which is around the norm for NEMA17s in 3D printers but nothing.  SLEEP line is showing correct voltages now - guess the GPIO pin wasn't set to output before, immediately after booting the RPi.

Conclusion :- Vdd needs to be +3.3v for the RPi but there's still something else wrong.  What Vref are you using?

Link to comment
Share on other sites

Are you certain the  Pi & driver board grounds are connected properly?

I had the same problem with a nano and a L298 driver board. No joy until I checked the ground between the boards was common.

 

  • Like 1
Link to comment
Share on other sites

Yes, the Gnd is through the GPIO connector and it is connected.  As I said all voltages and signals feeding the driver board are correct.  My RPi and HAT are the same models as Dave's yet his works and mine doesn't.

Link to comment
Share on other sites

I wouldn't have thought so but a possibility I guess.  OTOH the Gnds are common on 3D printers etc. and I use a common ground on my clocks, though these run off Arduino Nanos rather than RPis.

Any chance of measuring the voltage on the pot or seeing how much it is rotated from fully anticlockwise, please Dave?

Link to comment
Share on other sites

Maybe a little calculation is in order...  28BYJ-48 coil resistance is 55Ω and normal current when run off a ULN2003AN driver will be 5v in half that or 10v in 55Ω = 180mA.  A4988 driver module current sense resistors are 0.05Ω so 180mA in 0.05Ω = 9mv.  What this means is that these drivers are not really suitable for stepper motors with such a high coil resistance and probably wouldn't be capable of micro-stepping as they rely on varying the drive to give the right current steps in the sinusoidal staircase wave so it's just as well we aren't micro-stepping.

The upshot of this is that the motor coils are not being current driven - the voltage is such that the output MOSFETs will be saturating and will simply drive the stepper motor with a square wave as it is when using the ULN2003AN on/off driver.  In normal use the A4988 is run at something like 4x the motor voltage rating in order to overcome the back EMF from the motor inductance.  So theoretically to drive the 28BYJ-48 in micro-stepping mode we want around 40v motor supply and the higher voltage driver module.

I think my problem may be simply that the Vref wants increasing such that the driver module is saturating from the off.  Nothing should overheat if this is turned up to max and we are only running on around 12v.  OTOH this doesn't explain the NEMA17 motor not working.

Link to comment
Share on other sites

Thanks Dave :)  Pretty much what I had.

Turned Vref pot right up and Vref reads 0.67v but no motor movement :(  12v supply current shows about 400mA when supposedly focussing which agrees with two 55Ω coils energised from 12v.  (440mA.)

Seems the motor is being driven but not turning.  I've taken it apart again but it looks fine.  Started modifying another - cut the link and now just need to connect the wires to a 4pin connector.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.