intelligent-agent / redeem

Firmware for Replicape
http://wiki.thing-printer.com/index.php?title=Redeem
GNU General Public License v3.0
36 stars 44 forks source link

2.2.1-RC A4A boards not setting current properly #181

Closed zaped212 closed 5 years ago

zaped212 commented 5 years ago

I did a clean re-image of 2.2.1-RC image, uploaded my config file through the octoprint ui, and manually created the link between my config and the printer.cfg file ( current octoprint integration looks broken ).

I have my motor current set to 0.8, xyz microstepping at 3

Though I am still seeing the same issue where F values < 300 or so work, but anything faster doesnt.

I do notice that the motor hold strength is very very very weak.

when I tried to move things on the old image I would end up moving the whole printer. now I can move everything without much issue.

Motors were definitely "on" as I hit "motors off" and they became even easier to move.

I used M907 to change the current values from 0, 0.3, 1.0, and 1.5 ( verified via the logs. ex: Setting voltage to 0.0, and Setting voltage to 0.75 ), and tried to move the sled on the tower.

Unfortunately I did not feel any change in force at the different values. Looking in Stepper.py I notice that B1,B2,B3 all use PWM_DAC while the A4A is using hardware DAC wonder if 2.2.1 doesnt support the hardware DAC

zaped212 commented 5 years ago

Just a quick update. Opened up my printer and took a look at the AVREF, and BVREF pins of the stepper driver. Was reading 2.5mV Changed the current to 1.5A

From the logs: DEBUG Executing M907 from unbuffered M907 X1.5 Y1.5 Z1.5 DEBUG Setting voltage to 0.75 DEBUG Setting voltage to 0.75 DEBUG Setting voltage to 0.75 DEBUG Completed M907 from unbuffered M907 X1.5 Y1.5 Z1.5 Re-measured the pins and still measured 2.5mV so looks like the DAC isnt being set properly. Will continue to look into it.

goeland86 commented 5 years ago

Follow up details requested from @zaped212 : Kamikaze 2.0.8, we have Adafruit-BBIO (0.0.30) Umikaze 2.1.1, we have Adafruit-BBIO (1.0.4) Umikaze 2.2.1, we have Adafruit-BBIO (1.1.1)

zaped212 commented 5 years ago

Tested 0.0.30, and 1.0.4 an neither of them resolved the issue. Infact both of them had problems running. Had to comment out the GPIO lines in stepper.py to even be able to set the current and that didnt even work. I diff'd 1.0.4 to 1.1.1 and didnt see too much in the GPIO and SPI parts of the code that have changed / would cause problems.

zaped212 commented 5 years ago

So I think the issue is that we are no longer "binding" to the correct spidev device. There was an Adafruit BBIO change with how the channel / device is selected.

Previously it looked like SPI(0,0) would actaully try and connect to spidev2_0 With the new version of code it looks like it probably is connecting to spidev0_0 https://github.com/adafruit/adafruit-beaglebone-io-python/commit/8dfbf64c36f377b7169aff63ffe7580d545d5659

When I look at 2.1.1 "ls /dev/spi" it shows: ` root@kamikaze:~# ls /dev/spi /dev/spidev2.0 /dev/spidev2.1 But with 2.2.1-RC2 I am seeing /dev/spidev1.0 /dev/spidev1.1 /dev/spidev2.0 /dev/spidev2.1 `

Ultimately I am not sure what the 1.0 or 1.1 are from in the 2.2.1-RC2 build

goeland86 commented 5 years ago

That may actually be related to a change in numbering the devices based on the kernel image running. Or a change in udev rules.

On Fri, 1 Mar 2019, 04:12 zaped212, notifications@github.com wrote:

So I think the issue is that we are no longer "binding" to the correct spidev device. There was an Adafruit BBIO change with how the channel / device is selected.

Previously it looked like SPI(0,0) would actaully try and connect to spidev2_0 With the new version of code it looks like it probably is connecting to spidev0_0

When I look at "ls /dev/spi" it shows: root@kamikaze:~# ls /dev/spi /dev/spidev2.0 /dev/spidev2.1 But with Kamikaze I am seeing /dev/spidev1.0 /dev/spidev1.1 /dev/spidev2.0 /dev/spidev2.1

Ultimately I am not sure what the 1.0 or 1.1 are from in the 2.2.1-RC2 build

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/intelligent-agent/redeem/issues/181#issuecomment-468526419, or mute the thread https://github.com/notifications/unsubscribe-auth/AQiOeX72pnr3vdEGCamDaDxkizAvCCM3ks5vSJqSgaJpZM4bQpmL .

zaped212 commented 5 years ago

https://github.com/intelligent-agent/redeem/pull/182

goeland86 commented 5 years ago

@zaped212 since your PR was merged, I believe this issue can be safely closed?

zaped212 commented 5 years ago

I can agree to that

On Sun, Mar 10, 2019, 7:27 AM Jon C notifications@github.com wrote:

@zaped212 https://github.com/zaped212 since your PR was merged, I believe this issue can be safely closed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/intelligent-agent/redeem/issues/181#issuecomment-471283502, or mute the thread https://github.com/notifications/unsubscribe-auth/AAj9KmjqYdzwaLuwVIqp7dHl6nKcbczeks5vVPowgaJpZM4bQpmL .

zaped212 commented 5 years ago

PR #182 was merged to address this.