getting_started:tutorials:oneaxis_bbb
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| getting_started:tutorials:oneaxis_bbb [2026/05/27 15:44] – [Experimental Setup with a Beaglebone Blue Board] ursgraf | getting_started:tutorials:oneaxis_bbb [2026/05/29 12:10] (current) – [Encoder Inputs] ursgraf | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| Use a [[https:// | Use a [[https:// | ||
| - | ===== Analog Output | + | ===== Testing the Hardware ===== |
| + | |||
| + | ==== Analog Output ==== | ||
| There are 4 connectors denoted with //DC Motors//. Connect number 1 with the motor. Before testing plug in the 12V DC power supply or the Li-Po battery, otherwise the motors won't run. ssh into the Beaglebone blue board and run | There are 4 connectors denoted with //DC Motors//. Connect number 1 with the motor. Before testing plug in the 12V DC power supply or the Li-Po battery, otherwise the motors won't run. ssh into the Beaglebone blue board and run | ||
| < | < | ||
| - | ost@bblue: | + | ost@bblue: |
| + | </ | ||
| + | Open two other shells and run | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset | ||
| + | </ | ||
| + | and | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset -c gpiochip3 MDIR_1B=0 | ||
| + | </ | ||
| + | Changing the polarity of MDIR_1A and MDIR_1B will change the direction. In a forth shell, configure the pwm signal as follows: | ||
| + | < | ||
| + | ost@bblue:$ echo 0 | sudo tee / | ||
| + | ost@bblue:$ echo 1000000 | sudo tee / | ||
| + | ost@bblue:$ echo 200000 | sudo tee / | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| </ | </ | ||
| - | //-m 1// selects the first motor while //-d 1// specifies a duty cycle of 1. The motor should run in positive direction. If the motor turns in the opposite direction, change the + and - wire of the motor. You can stop the program by pressing '' | ||
| - | ===== Enable Signal ===== | ||
| - | On the Beaglebone blue we do not use a motor controller and therefore, we do not use this signal. However, we put the signal onto the green led on the board. | ||
| - | ===== Encoder Inputs | + | ==== Enable Signal ==== |
| + | On the Beaglebone blue we do not use an external motor controller and therefore, we cannot really control the motor power with this signal. However, we put the signal onto the green led on the board. Check the function with | ||
| + | < | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| + | ost@bblue:$ echo 0 | sudo tee / | ||
| + | </ | ||
| + | |||
| + | ==== Encoder Inputs ==== | ||
| There are 4 connectors denoted with //4 Quadrature encoder inputs//. Connect number 1 with your encoder. Make sure that your encoder works with 3.3V as delivered by this connector. Test the encoder with | There are 4 connectors denoted with //4 Quadrature encoder inputs//. Connect number 1 with your encoder. Make sure that your encoder works with 3.3V as delivered by this connector. Test the encoder with | ||
| < | < | ||
| - | ost@bblue: | + | ost@bblue:~$ echo 1 | sudo tee / |
| + | ost@bblue: | ||
| </ | </ | ||
| - | Turning the motor in positive direction must lead to the encoder counting upwards. If not, change the A and B signals. | + | Turning the motor in positive direction must lead to the encoder counting upwards. If not, change the MDIR_1A |
| - | ===== Ready Signal | + | ==== Ready Signal ==== |
| The ready signal signals to the controller that the motor controller has powered up. As there is no external motor controller on the Beaglebone blue we simply put this signal on a digital input pin which is connected to the on board push button // | The ready signal signals to the controller that the motor controller has powered up. As there is no external motor controller on the Beaglebone blue we simply put this signal on a digital input pin which is connected to the on board push button // | ||
| - | ===== Emergency Signal | + | ==== Emergency Signal ==== |
| The emergency signal is used to bring the application in a safe mode. We put this input signal on a digital input pin which is connected to the on board push button //Pause//. Later when the application runs we can cause the safety system to switch to an emergency state by pressing the //Pause// button. | The emergency signal is used to bring the application in a safe mode. We put this input signal on a digital input pin which is connected to the on board push button //Pause//. Later when the application runs we can cause the safety system to switch to an emergency state by pressing the //Pause// button. | ||
| + | |||
| + | =====Run Application===== | ||
| + | |||
| + | Start the application by choosing the appropriate configuration file: | ||
| + | < | ||
| + | $ sudo ./ | ||
| + | </ | ||
| + | |||
getting_started/tutorials/oneaxis_bbb.1779889459.txt.gz · Last modified: by ursgraf
