Test-running my new purchase, my logic analyzer Saleae. Red edition :-)
The intention is to use it to test the 7 stepper motor driver signals when I develop the code for the movement. To prevent damage to the mechanism during development I prefer to record the signal and compare it to the desired programmed output.
Up till now I actually used the debug LED for debugging the motor driver code. Slowed down to to very slow speeds but I could only test one motor channel at one time. With the analyzer I can now run at full speed and measure the real data easily.
As discussed in my previous blogs, the intention is to control the motors in parallel just like a mechanical organ playbook. I will use 8 bits where 7 bits are connected to every stepper motor pules. Because I have very limited memory and not a lot of processing power I will use pointers. To prevent bugs in the pointers I will also include safety features to detect wrong data to be executed. I can only guarantee reliable code when I can measure it and verify that it stops the robot when it gets corrupted data.
When that is checked then I can test run the code with the real motors.
Under the Seleae is the is my $10 Chinese clone, that actually works great but can only show digital signals.
Test-run on I2C protocol below (clock and data signal, both analog and digital).
Example of the I2C frame where I get my PS3 communication.
Zoomed in the last part where I request the last 7 bytes. This is the situation where I clearly see a firmware bug in action. It repeats the first 7 bytes and should have ben all "0"
Zoomed in even more to show the analog signals measured by the logic analyzer with the digital output just above.
Interesting is that I have spikes at the rate of the clock in my analog signal.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.