BlogEngine.NET r11405 on Mono Patch

by Ivan Hamilton 5/22/2008 5:45:00 PM

I've just put my latest patch for BlogEngine on Mono up.

You'll find it on the newly created BlogEngine.NET Mono Patches page.

From your BlogEngine directory:

host:/opt/BlogEngine# patch -i /tmp/blogengine-11405.patch -p1
patching file BlogEngine.NET/App_Code/Controls/Blogroll.cs
patching file BlogEngine.NET/App_Code/Controls/MonthList.cs
patching file DotNetSlave.BusinessLogic/BlogEngine.Core.csproj
patching file DotNetSlave.BusinessLogic/Web/HttpHandlers/FileHandler.cs
patching file DotNetSlave.BusinessLogic/Web/HttpHandlers/ImageHandler.cs
host:/opt/BlogEngine#

Currently rated 1.5 by 104 people

  • Currently 1.519231/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.NET | BlogEngine.NET

DIY Servo Controller - Four Axis Tangential Test

by Ivan Hamilton 5/19/2008 2:57:00 PM

I've setup Mach3 to drive the 4th axis tangential to the XY plane. This feature is used by vinyl cutters and such where the tool's orientation must follow the direction of travel. This includes lifting the tool before large changes (>45°), and lowering it before continuing.

This setup allows me to test my 4 axis servo controller in a "real world" situation. The motion appears a little jerky, but this appears to be Mach3 coming to a full stop before changing the 4th axis' direction (The RoadRunner test is not good for this since it's composed of lines and not arcs).

I've started making the mounts for the motors, but there is more tuning and testing to be done before final mounting of these motors on the mill.

When I'd picked up the motors, they had some heft. So out of interest, I put those motors on the scales... a total of 3kW (4HP) and 16.5kg (more than airline carry-on allowance).

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics | Mechanics

Trace Aces the slalom

by Ivan Hamilton 5/18/2008 5:12:00 PM

Went out with Tracey for a bit of motorcycle practise.

 

She's really come along way in a very short time. This time last week, she hadn't ridden for months, and had forgotten pretty much everything.

Now? Well... she's picking up skills quicker than a flash flood. If she keeps this up, she'll surely ace her "P"s test.

Currently rated 1.5 by 45 people

  • Currently 1.488889/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Motorcycling

The Blackbird's broken radiator

by Ivan Hamilton 5/14/2008 10:12:00 PM

I took a quick trip out to the post office yesterday afternoon, and when I got back the CBR1100XX Blackbird was steaming.

Most people know steaming from a vehicle is not a good thing (unless it's steam powered). After the steaming, came the dripping... green blood (coolant).

I had coolant leaking. Leaking on to something hot (probably the exhaust). Busted radiator? Split coolant hose? Cracked head? I was hoping for something simple (and inexpensive).

After taking the covers off, it wasn't obvious where the source of the leak was... but the radiator was wet. Wet from one point down. It was most probably a leak in the radiator.

I removed the radiator, which on the Blackbird has the thermo fan mounted to it. Removing the fan revealed the problem... the fan had been rubbing on the radiator, and had worn through. The bike's never been dropped or abused, so I assume it's always rubbed and has just taken 30,000kms to wear through.

A call to a local radiator repair shop was answered with "If it's aluminum we can't repair it, it'll need a new core". That' didn't sound right to me. I'm a silent member of the Two Wheels web forums, and thought I'd check if anyone had any recommendations. A recommendation had been made for "Better Radiators Pty Ltd" at Lidcombe. That's 10 minutes away, so I dropped in with the radiator.

I arrived around 12:00pm. "Would you like it today?" I explained was hoping to go on a ride tomorrow. "Come back at 3:30pm". A number of repairs had been done (the fan had worn a large arc), and even the fan brackets adjusted for consistent clearance. All that for ~$50.

I put the repaired radiator back in, topped up the coolant, and let it idle until it warmed up enough that the thermo fan kicked in. There was some steam (water still on the radiator from pressure testing), but that quickly subsided and I went for a short test ride. A quick post-ride inspection show no leaks (everthing dry and no steam), and I'm back on the road 24 hours after the incident.

If you need any sort of radiator repair, I can highly recommend the guys at Better Radiators Pty Ltd at Lidcombe - friendly, efficient & economic.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Motorcycling

Tuning my PID controller 2

by Ivan Hamilton 5/10/2008 10:44:00 PM

I've mentioned previously that I think it's beyond me to visually judge the performance of the PID tuning values in use in my servo controller.

I had created a simple program to test the response, but wasn't happy with the point to point style test it was carrying out. It's more important for a CNC machine to follow curves closely, than have outright movement speed.

To fix this, I've added a feature to the microcontroller, a sine wave test. The test was added to the controller, because for a good test, a position update needs to be present every time the PID loop recalculates. By placing the sine wave path generation in the controller, a new movement value is present every single PID update. I couldn't achieve this sort of high performance timing by sending updates down a serial line.

Also, the standard point to point test produces massive errors when the set-point jumps, masking the fine detail of an "error" plot. I've added it now (on it's own axis), and it's very helpful in seeing exact levels of error (the large scale of the movement would otherwise hide this relatively small error). 

 
Rotate 1 revolution forward and back in 1 second

 
Rotate 1 revolution forward and back in 5 seconds

In the above images you can see the reduction in error during a slower test (from +/-10 to +/-3). On the slower test, that's within 0.9 degrees.

I've also included a "steady state" option. This doesn't instruct the controller to make any movement, but it does record and display it. This lets you see the response to an external disturbance on the servo (the handy shifter!).

Armed with this new information... I still haven't gone back and re-tuned the PID values.

Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.NET | CNC | Electronics

Tuning my PID controller

by Ivan Hamilton 5/9/2008 4:21:00 PM

The nice thing about making your own PID controller, is that it's easily modified to add extra features. The nice thing about having PC software development skills, is that it's easy to whip up a small program for a particular task.

I've mentioned on a number of occasions, that I hadn't yet tuned the PID settings in my controller. I didn't want to do this because I could spend all day tinkering with values without being able to accurately judge the exact effect. What I needed was a way to monitor the servo response.

It took less than a dozen extra lines of microcontroller code, and a couple of dozen lines of C# (WinForms) to make a GUI application to test and monitor the servo. Once I had this, I could change values and with a mouse-click see the results. This made it very quick to tune by trial and error.


Step response before tuning


Step response after tuning

The best "simple" explanation I've heard for these values are:

  • P - Proportional - Spring - The greater the error, the more correction applied
  • I - Integral - Accuracy - The longer the error, the more correction applied
  • D - Derivative - Dampening - The more the error changes, the more correction applied

The best "simple" tuning method I've heard is:

  1. Set P, I & D gain values to 0.
  2. Increase P until it becomes unstable (post-step oscillations don't fade).
  3. Halve P.
  4. Increase D until overshoot is removed.
  5. Increase I until it settles quickly enough when disturbed

I used this method and it appears to work well, but this was a simple test on an unloaded motor. It will be interesting to try this once fitted to a more complicated system.

There is an issue with the current test... this a step-response scenario. That's great for a system which needs to move from A to point B as quick as possible. But in a CNC machine, it doesn't just move from one point to another. The motion controller (e.g. Mach3 or EMC2) will produce "smooth" motion with a constant stream of position updates. What is more important, is that the servo accurately follows this acceleration, than achieve high outright point to point speed.

In the future, I think I'll need to add a "Curve Follower" tuning option. Instead of jumping from point to point, this will drive the servo as if it was tracing a circle (a sine wave pattern).

Currently rated 2.0 by 24 people

  • Currently 2.041667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.NET | CNC | Electronics

Servo Controller - Four Motors

by Ivan Hamilton 5/8/2008 1:35:00 PM

After a bit of a late night, I've connect four motors to my servo controller. I wanted to clean up the layout a little, and I think for a prototype, it's pretty neat.

I had recently finished fitting encoders to my other motors, and thought it was time to test the limits of the controller.

I had always designed my controller to handle four servos, but didn't have the hardware to test it. Armed with the extra hardware, I had the opportunity to see how well my theory would work in practise. Once again, I was very happy with myself.

There's a couple of things the keen-eyed will notice.

  • The motors don't always turn at the same speed - The test here is limited by the power delivered to the motors. It's set to output 33% max. Different motors will have slightly different performance, especially when moving in different directions. The motors I'm using slightly prefer one direction to the other.
  • The motors overshoot - the PID parameters aren't tuned yet.
  • The motors sometimes hunt - it's the cogging of the unloaded motor & the PID parameters aren't tuned yet.

This test was just sending serial set-point commands. The controller can also be able to decode STEP+DIR input from Mach3 and such (I haven't fully wired up the break out board yet).

I've put it off long enough, I think I'll have to work on the PID tuning...

Currently rated 1.8 by 37 people

  • Currently 1.81081/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

More Mono & BlogEngine issues

by Ivan Hamilton 5/8/2008 2:34:00 AM

I've recently submitted to the Mono team (and had accepted) a few patches to fix the issues I've found running BlogEngine.Net under Mono on Linux.

At this point, you will need the very latest Mono release (r102737) from SVN to get the fixes. These fixes are for Windows/Linux interoperability, cross directory master page & user controls, and Forms authentication.

With these fixes now applied, I now know of no problems with Mono running BlogEngine.Net on Linux. (I say "know of" because I haven't tested everything yet).

No problems with Mono, but there are problems with BlogEngine.Net.

The BlogEngine.NET code makes a number of assumptions (like a Dictionary will retain the order of items that are inserted) that aren't part of the .Net runtime's specification. I have 3 issued logged in BlogEngine.Net's Issue Tracker on CodePlex. All of the issues I've reported include the code changes required to fix them. Three weeks later, and they still sit there. There are three weeks worth of issues between mine and the latest one resolved. I expect we'll see them applied in about three weeks.

But on my system... all problems appear fixed.

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

.NET | BlogEngine.NET

A closer look at my 2 axis servo controller

by Ivan Hamilton 5/6/2008 3:44:00 PM

For anyone interested, I've taken a closer look at my 2 motor setup.

(I've also decided to start giving more relevant post titles...)

Currently rated 1.6 by 34 people

  • Currently 1.558823/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics

'Cause one's not enough; I ain't a wimp, I'm a pimp.

by Ivan Hamilton 5/4/2008 3:59:00 PM

With another motor available for testing, I decided to configure my controller to run two motors. I also mounted the motors, so they wouldn't roll under acceleration and fall on the floor (again).

Ooh... two motors. Yeah... my servo controller can run more than a single servo. The Pololu driver board I have has two H-bridges, so with 1 controller board and 1 driver board, I can control two motors.

I also fixed a bug in the quadrature decoding routines that was causing incorrect amounts of movement to be calculated. To see if something had changed, I was incorrectly comparing the current raw quadrature state against the previous decoded state. Whoops!
With my 1,200 step encoder, now moving 1,200 steps now gives one clean rotation. Do 120,000 steps and you get 100 rotations, stopping at the exact same spot.

The PID parameters still aren't tuned. Hence the overshoot and slow final approach. I'm yet to even start working out a simple reliable tuning method. I don't want to hand tune the free-standing motors through trial and error, only to do it again once they're fitted.

Much more testing still needed...

Currently rated 1.5 by 4 people

  • Currently 1.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

CNC | Electronics | Mechanics

Powered by BlogEngine.NET 1.3.1.30
Original theme by Mads Kristensen

About the author

Name of author Ivan Hamilton
"My inner nerd can beat up your inner nerd."

E-mail me Send mail

Adsense

Calendar

<<  September 2017  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

View posts in large calendar

Recent comments

Tags

None

    Entropy

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2017

    Sign in