tim
New Member
Posts: 3
|
Post by tim on Sept 16, 2016 16:14:45 GMT -7
Hi all,
My FPGA driver board is on the fritz so I'm trying to run my dobot on a RAMPS 1.4 board instead. Previously the FPGA version was working great with 1.3.0, it was moving all was well. To get RAMPS set up I've:
1) Set the microstepping by placing all three jumpers under EACH driver 2) Soldered in the 4.7k ohm driver to hold movement 3) Replaced the off-brand arduino mega I was running with a genuine one 4) Flashed firmware with both the *.sh and using avrdude and the *.hex
Now, my problem is that when I run the example-sdk.py (that works fine with the old FPGA board) it realizes it has a RAMPS board, realizes there are no accelerometers attached and then freezes after printing out everything about Slice #1. No movement, no further action.
I installed the repetier firmware (for a RepRap) and testing code runs all three motors just fine on the same hardware so I doubt it's a driver or board problem.
I've run on a rasp pi and a virtualized ubuntu install to the same effect. Is there something I'm missing or have others seen this as well?
|
|
|
Post by Max on Sept 16, 2016 21:02:50 GMT -7
Can you give some more details on #4?
To build and flash RAMPS firmware in *nix (Linux or RPi) you only need to run upload-ramps-version.sh Make sure you have set AVR_DIR and SERIAL_PORT in that script according to where Arduino is installed in your system and serial device Arduino is seen in your system as.
You can opt to flash the pre-built released firmware (*.hex) with avrdude by hand if you like, but you should only do that then, without running any other scripts. So it's either scripts (only one of them, for the corresponding board - fpga or ramps), or avrdude.
You can even build and flash RAMPS firmware with upload-ramps-version.cmd in Windows. If your host OS is Windows you don't need a Linux VM just to work with or build open-dobot.
|
|
tim
New Member
Posts: 3
|
Post by tim on Sept 19, 2016 7:09:16 GMT -7
Yup no problem, for flashing the firmware I've been using the *.sh on both Raspian and Ubuntu (haven't tried from Windows). Other the complaining about an invalid baud rate at the beginning of the script it flashes just fine and then read backs fine, then reports that all three fuses are ok. I only used the *.hex as a last resort to see if that baud rate error was really the problem.
I will go copy the error code it reads back about baud rate, but since it can communicate about the accelerometers and get the board type I assume it was just a warning...
|
|
tim
New Member
Posts: 3
|
Post by tim on Sept 19, 2016 8:00:33 GMT -7
Ok re-ran just to show output:
1) Flashing:
pi@cheeto:~/open-dobot-1.3.0/firmware/upload$ sudo ./upload-ramps-version.sh
[sudo] password for pi:
In file included from ../src/main/dobot.cpp:16:0:
/home/pi/arduino-1.6.11/hardware/tools/avr/avr/include/util/setbaud.h:222:4: warning: #warning "Baud rate achieved is higher than allowed" [-Wcpp]
# warning "Baud rate achieved is higher than allowed"
^
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801
avrdude: reading input file "../build/dobot-ramps.hex"
avrdude: writing flash (11800 bytes):
Writing | ################################################## | 100% 1.93s
avrdude: 11800 bytes of flash written
avrdude: verifying flash memory against ../build/dobot-ramps.hex:
avrdude: load data flash data from input file ../build/dobot-ramps.hex:
avrdude: input file ../build/dobot-ramps.hex contains 11800 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 1.54s
avrdude: verifying ...
avrdude: 11800 bytes of flash verified
avrdude: safemode: Fuses OK (H:FF, E:D0, L:FF)
avrdude done. Thank you. 2) Running example-sdk.py
pi@cheeto:~/open-dobot-1.3.0/application/python$ sudo python example-sdk.py
Board: RAMPS
--=========--
Initializing accelerometers
Failed to read accelerometers. Make sure they are connected and interference is suppressed. See open-dobot wiki
Assuming rear arm vertical and front arm horizontal
('Initializing with steps:', 0L, 0L, -7999L)
('Reading back what was set:', (0, 0, 0, 0))
('Current estimated coordinates:', (50.93141592633407, 0.0, 397.9999969157486))
--=========--
--=========--
maxVel 400.0
accelf 300.0
moving from 50.9314159263 0.0 397.999996916
moving to 170.0 -90.0 50.0
moving by 119.068584074 -90.0 -347.999996916
distance to travel 378.657266623
slices to do 112.347269159
accelSlices 56.1736345794
flatSlices 0
accelXYZ 94.3348467617 -71.3045869706 -275.711067176
segmentAccelXYZ 59.5342920368 -45.0 -173.999998458
maxVelXYZ 105.982624202 -80.1087562465 -309.753854741
segmentFlatXYZ 0.0 -0.0 -0.0
segmentToolRotation 0.0
==============================
slice # 1
moving to 50.9502828957 -0.0142609173941 397.944854702
nextToolRotation 0.0
radiusTool 50.9502848915
radius 0.0502848914924
ik base angle -0.000279898681837
jointX 0.0502848895227
jointY -1.40746746612e-05
actualZ 294.944854702
hypotenuse 294.944858989
hypotenuseSquared 86992.4698439
q1 1.57062583767
q2 0.0210496873398
ik rear angle -0.020879198212
ik front angle -1.55286554187
Base Step Location -1.42551228093
Rear Arm Step Location 106.336883304
Front Arm Step Location 7908.67926227
self._baseSteps 0
self._rearSteps 0
self._frontSteps -7999
baseDiff -1.42551228093
rearDiff 106.336883304
frontDiff 15907.6792623
|
|
|
Post by Max on Sept 20, 2016 20:19:10 GMT -7
Hm, this is not good:
('Initializing with steps:', 0L, 0L, -7999L) ('Reading back what was set:', (0, 0, 0, 0))
Can you try replacing the entire "if" block starting on line 109 in DobotSDK.py with the following lines:
rearAngle = 0 frontAngle = -piHalf
This should skip the step when it tries to initialize accelerometers and immediately get the steps. The point is to make it read back the same as it sets. Not being able to do that means comms problem. This might be because firmware is still trying to initialize accelerometers as was just requested.
|
|