User Tools

Site Tools


getting_started:tutorials:oneaxis_bbb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_started:tutorials:oneaxis_bbb [2026/05/29 10:49] – [Enable Signal] ursgrafgetting_started:tutorials:oneaxis_bbb [2026/05/29 12:10] (current) – [Encoder Inputs] ursgraf
Line 10: Line 10:
 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
 <code> <code>
-ost@bblue:rc_test_motors -m 1 -d 1+ost@bblue:sudo gpioset -c gpiochip3 MOT_STBY=1
 </code> </code>
-//-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 ''Ctrl-C''. The test program is located in ///usr/bin// and can be run from anywhere. +Open two other shells and run  
 +<code> 
 +ost@bblue:$ sudo gpioset -c gpiochip1 MDIR_1A=1 
 +</code> 
 +and 
 +<code> 
 +ost@bblue:$ sudo gpioset -c gpiochip3 MDIR_1B=0 
 +</code> 
 +Changing the polarity of MDIR_1A and MDIR_1B will change the direction. In a forth shellconfigure the pwm signal as follows: 
 +<code> 
 +ost@bblue:$ echo 0 | sudo tee /sys/class/pwm/pwmchip2/export 
 +ost@bblue:$ echo 1000000 | sudo tee /sys/class/pwm/pwmchip2/pwm0/period 
 +ost@bblue:$ echo 200000 | sudo tee /sys/class/pwm/pwmchip2/pwm0/duty_cycle 
 +ost@bblue:$ echo 1 | sudo tee /sys/class/pwm/pwmchip2/pwm0/enable 
 +</code> 
  
 ==== Enable Signal ==== ==== Enable Signal ====
Line 24: Line 39:
 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
 <code> <code>
-ost@bblue:rc_test_encoders +ost@bblue:~echo 1 | sudo tee /sys/bus/counter/devices/counter3/count0/enable 
 +ost@bblue:~$ watch -n 0.5 cat /sys/bus/counter/devices/counter1/count0/count
 </code> </code>
-Turning the motor in positive direction must lead to the encoder counting upwards. If not, change the and signals.+Turning the motor in positive direction must lead to the encoder counting upwards. If not, change the MDIR_1A and MDIR_1B signals above.
  
 ==== Ready Signal ==== ==== Ready Signal ====
getting_started/tutorials/oneaxis_bbb.1780044582.txt.gz · Last modified: by ursgraf