Hi John,

I'm planning to use a DC servo (an electrocraft E240 - because I have one I 
can borrow from a CNC conversion). Haven't selected an H-bridge, but maybe 
an LMD18000 (also because I have some already), though maybe I'll need 
something with a higher peak current. I'll start with those two and see how 
I get on.

Yes, controlled variable will be force. To be honest I haven't had a great 
deal of experience with DC motor control (other than simple PID 
speed/position controllers with no real modelling), so I'm expecting this 
to be a challenge (a fun one, hopefully!). My vague plan at the moment is 
to leave the servo unconnected, then try attaching a known mass (via cable 
and pulley, and no pendulums) to the cart, then look at acceleration, and 
try and use this to establish my viscous damping etc. Then progress to a 
force controller, again just moving a mass along the track (still no 
pendulums).

So anyway, I'll have three incremental encoders - one on the back of the 
motor, two for the pendulums. Then current consumption for the servo from 
my h-bridge.

I thought the BBB looked promising as people are using it for motion 
control. I'm not actually intending to use machinekit - my understanding 
was it's basically for CNC type applications where you have a precomputed 
trajectory, am I wrong? I'm concerned about minimising latency, which is 
how I came to Xenomai, and when reading about how to install Xenomai I read 
that machinekit uses Xenomai so using a prebuilt machinekit installation 
seemed like an easy way forward. I'm envisaging using the PRUs for reading 
the encoders and handling PWM etc, then having the main control loop 
compute gains etc on the ARM core. I realise the PRUs offer fixed 
latencies, but I'm doing quite a lot of computation to generate my 
controller gains, so I thought better to run this on the main processor. 
This may change - like I said, when it comes to the BBB and Linux I really 
don't know what I'm doing yet! Hence blinking LEDs seems like a good 
starting point.

Cheers,

Luke


On Wednesday, September 14, 2016 at 5:50:17 PM UTC+1, John Kasunich wrote:
>
> Looks like an interesting project. 
>
> File system access is likely to be far too slow for what you are trying to 
> do. 
> The strength of machinekit (and it's predecessor LinuxCNC) is the HAL 
> layer 
> of device drivers and control blocks.  That is a much faster way to access 
> the hardware. 
>
> Choosing the beaglebone might be putting the cart before the horse. 
> As I understand it your controlled variable is force.   What are you using 
> as an actuator?  Stepper motors are position control devices and 
> unsuitable. 
> Brush-type permanent magnet DC motors probably have the simplest 
> mapping from electrical parameter (armature current) to force (torque). 
>
> Next, what are you using as a driver?  PWMed H-bridges control the average 
> voltage across the motor, which has inductance and resistance.  You would 
> need to sense current and close a current loop to control current. 
>
> Some motor drivers do the current loop in analog hardware, or you could 
> do the current loop digitally.  (Would need high bandwidth.) 
>
> What kind of control signals does your driver expect?  PWM for a bridge? 
> Analog (+/-10V, 0-5V, etc) for reference to an analog current loop? 
>
> What kind of feedback signals are you going to have?  Analog current 
> feedback?  Analog or resolver or absolute encoder or incremental 
> encoder for pendulum angles? 
>
> The nature of the required control and feedback signals will drive your 
> choice of control platform. 
>
> Regards, 
>
> John Kasunich 
>
>
> On Wed, Sep 14, 2016, at 12:20 PM, 'Luke Steele' via Machinekit wrote: 
> > Hello, 
> > 
> > I should probably explain that I'm a linux and BBB novice, and am 
> currently 
> > experiencing a crazily steep learning curve. So please bear with me 
> while I 
> > ask what are probably incredibly rudimentary questions... 
> > 
> > I'm interested in doing some realtime control (servos, reading encoders 
> > etc) on my BBB rev C under Xenomai, and after some reading around it 
> seemed 
> > like the simplest way to get started was using the pre-built machinekit 
> > images found 
> > here: 
> http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#BBW.2FBBB_.28All_Revs.29_Machinekit
>  
> > 
> > So, having installed this image I can now ssh into the BBB from a 
> Xubuntu 
> > install running under VMware on my PC. 
> > 
> > I thought a good place to start would be blinking an LED. To that end 
> I've 
> > compiled the C++ program here 
> > <
> http://inspire.logicsupply.com/2014/07/beaglebone-c-programming-example.html>,
>  
>
> > which works (only) if I use sudo, i.e. sudo ./myprog. I've also tried 
> > turning them on and off at the command line as outlined on Derek 
> Molloy's 
> > site 
> > <http://derekmolloy.ie/beaglebone-controlling-the-on-board-leds-using-c/>, 
>
> > but this doesn't work: 
> > 
> > cd /sys/class/leds 
> > cd beaglebone:green:usr0 
> > echo none > trigger 
> > 
> > -bash: trigger: Permission denied 
> > 
> > sudo echo none > trigger doesn't work either... 
> > 
> > What am I doing wrong? 
> > 
> > Also more generally, is this approach of accessing LEDs and GPIOs 
> through 
> > the file system the right way to go if I'm interested in doing things 
> > quickly? Intuitively it feels like it'd be slow - is there another way? 
> > 
> > Incidentally this <
> https://hackaday.io/project/12827-double-pendulum-cart> 
> > is what I'm aiming to do eventually. 
> > 
> > Thanks for any help, it's appreciated! 
> > 
> > Luke 
> > 
> > 
> > -- 
> > 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+...@googlegroups.com <javascript:>. 
> > Visit this group at https://groups.google.com/group/machinekit. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
> -- 
>   John Kasunich 
>   jmkas...@fastmail.fm <javascript:> 
>

-- 
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.

Reply via email to