[Machinekit] CRAMPS stepping motor for E1 can't move

2017-06-25 Thread Tom M
Are you sure the polulo driver is OK? 

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


[Machinekit] Re: Reading current/torque from Mesa motion cards

2017-06-25 Thread Michael Brown


On Sunday, 25 June 2017 16:45:55 UTC+2, Bas de Bruijn wrote:
>
> Hi,
>
> This is a question to the mesa/De0 nano SOC FPGA guru's
> Would it be possible to measure current from a DC motor driven by a mesa 
> 7i30 daughter card by means of (example) 
> https://www.pololu.com/product/1185 
>
> I noticed the De0 Nano SoC has an arduino header (which should contain 6 
> analog input pins)
>
> How hard would it be to have the De0 fpga read these pins next to handling 
> the 7i30?
>
> Is there a Mesa equivalent for reading analog pins?
>
>
Sorry for the incomplete answer:
Yes (I have a prusa-i3 mesa based config up and running on the De0-nano-soc 
using the built in ADC converter).
 Mostly (I have been unable to figure out how to commit it back into 
mainline machinekit).

Highlights of the process:

The ADC converter is wired directly into the fpga so the fpga part (in 
quartus) was about moving the terasic / university fifo based adc core into 
the mesa tom level file and exporting the wires back out through the top, 
plus giving the adc a fixed address of 0x0300 for control and 0x0304 for 
data readout.

Somewhere in these commits / branches:
Add adc to quartus project.
https://github.com/the-snowwhite/mksocfpga-hm3_dev/commit/e30bba22c16d1edf9938c916d9a39ea8d567084a

https://github.com/the-snowwhite/machinekit/commits/hm3soc-adc

https://github.com/the-snowwhite/machinekit/commits/adc_work2

https://github.com/the-snowwhite/Hm2-soc_FDM/commits/current?after=cf2b4b10f4d49d77273aa71971c8fbf8591294d4+34

https://github.com/the-snowwhite/mksocfpga-hm3_dev/commits/cap-sense
https://github.com/the-snowwhite/mksocfpga-hm3_dev/commit/425d5decb1882adae717bbc5505c429499212849

The adc fifo ip core was conservatively setup to scan all 8 adc chanels 
when triggered and then place the data one readout at a time on the read 
register when read.
The adc fifo has some more programmable functionality partly discribed in 
my initial tests here:
https://github.com/the-snowwhite/mksocfpga-hm3_dev/tree/hm3-adc/SW/MK/kernel-drivers


On the machinekit side I then added a driver module that add pins for each 
channel to the hm2 module and re-triggers the read for each cycle of the 
base clock (1khz).

Commits here.

Machinekit De0-Nano-soc adc module 
src/hal/drivers/mesa-hostmot2/nano_soc_adc.c
https://github.com/the-snowwhite/machinekit/commit/5c45d6250c26d85e9b13ffca816b2310d4f8

Then I modified the bbb temp user component to scale the temp probe read 
outs:

Mesa temp user component
src/hal/user_comps/hal_temp_atlas.py
https://github.com/the-snowwhite/machinekit/commit/6f93a410d7d954a13b6e7294765b182492a399c6

Lastly some links to the prusa-i3 config:

https://github.com/the-snowwhite/Hm2-soc_FDM/commits/current?after=cf2b4b10f4d49d77273aa71971c8fbf8591294d4+34

If there is interest and with a helping hand I could attempt to generate 
some clean commits to add the adc functionality to master
I have however not been able to understand or get the added soc-mesa fw-id 
to work.

Cheers,
> Bas
>

Best wishes Michael 

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


[Machinekit] CRAMPS stepping motor for E1 can't move

2017-06-25 Thread Dai Dai
Hello 

I need your help.
I tried set up for 6axis (X,Y,Z,E0,E1,E2) with BBB Rev C and CRAMPS.
All of 6axis are working properly in Machinekit GUI but actual motors only 
move 5axis except E1.
I got information that to use E1 need to change mode of P9 17 to mode7 .so 
I change it.

pin 87 (44e1095c) 002f pinctrl-single

But can not move the E1 motor.

I have no idea how should do any more.

Please instruct me how to solve this problem.

My setting that modified from CRAMPS.ini and hal  is the following .

———CRAMPS.ini--

[PRUCONF]
DRIVER=hal_pru_generic
CONFIG=pru=0 num_stepgens=6 num_pwmgens=6
PRUBIN=xenomai/pru_generic.bin

[TRAJ]

AXES =  6
COORDINATES =   X Y Z A B C


Made [AXIS_4] [AXIS_5] from [AXIS_3] 


—-—CRAMPS.hal--

Made the following from # A [3] Axis (Extruder).

# A [4] Axis (Extruder)
(All of 3 change to 4)
#setp hpg.stepgen.04.step_type   0
# P8.30 GPIO2.25
setp hpg.stepgen.04.steppin917
# P8.21 GPIO1.30
setp hpg.stepgen.04.dirpin918


# A [5] Axis (Extruder) 
(All of 3 change to 5)
#setp hpg.stepgen.05.step_type   0
# P8.30 GPIO2.25
setp hpg.stepgen.05.steppin924
# P8.21 GPIO1.30
setp hpg.stepgen.05.dirpin926

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


[Machinekit] Reading current/torque from Mesa motion cards

2017-06-25 Thread Bas de Bruijn
Hi,

This is a question to the mesa/De0 nano SOC FPGA guru's
Would it be possible to measure current from a DC motor driven by a mesa 7i30 
daughter card by means of (example) https://www.pololu.com/product/1185 

I noticed the De0 Nano SoC has an arduino header (which should contain 6 analog 
input pins)

How hard would it be to have the De0 fpga read these pins next to handling the 
7i30?

Is there a Mesa equivalent for reading analog pins?

Cheers,
Bas

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.