3 point quadratic regression formula

While developing the in-process stormer viscometer, one of my goals is to allow the end user to calibrate the device with 3 fluids of known viscosity. With a bit of help from mathematica, I’ve found the formula and for whoever wants it, it’s posted, also for my own future edification. This formula is meant to convert 3 data points of the form {X1,Y1},{X2,Y2},{X3,Y3} into a form of ax^2+bx+c=y. This is probably the fastest way to do this kind of operation on a microcontroller. Here’s an image of the formula

Reverse Quadratic from data
Reverse Quadratic from data

also, here’s a dirty FreeBasic program using it. regress-3point.bas

Also, for fun I decided to do a cubic version. This is in the form of 4 data points {X1,Y1},{X2,Y2},… converting to ax^3+bx^2+cx+d=y

Cubic equation inverse
Cubic equation inverse

You gotta love Mathematica!!!

Viscometer Project, coming along…

I thought I would have nothing to post but I do I guess. I’ve felt the need to really expedite this project now that I am starting a business. I have done a few of the mechanical things associated with it after a major redesign. Today I have completed the design of the board and despite it’s sloppiness, I’m happy it’s done. Now to get it made.


Viscometer Board 3D View
Viscometer Board 3D View

Viscometer Board traces
Viscometer Board traces


Like I state in the description, I used the autorouter on this image, I may revise many of the traces so that ripple can be eliminated from IC’s by bringing the caps closer electrically to Gnd and Vcc. This week I hope to finish the machining side of the device, I’ll have to wait for bolts from Fastenal to arrive but it’ll be worth the wait. Here are some shots of the parts so far, note that the main block is made of phenolic, I love this material since it looks kind of like wood but is reasonably machinable.

Machining the block
Machining the block

Phenolic Block Finished
Phenolic Block Finished

Coming along, main block and holders finished
Coming along, main block and holders finished


Just for the record, here is the list of, well electrical features:

  1. 16 key Keypad for data entry, mostly for calibration.
  2. 16×2 LCD display for seeing alarms and viscometer output.
  3. 24V motor, PWM driven with TIP102
  4. Light interrupted sensors for top and bottom
  5. provisions for temperature sensing
  6. RS-485 Out
  7. Provision for an external RS-232 board, if needed
  8. TVS’ed to the hilt, hopefully this will prevent funny stuff from happening.

Anyways, let’s hope she all works out in the end.

Still goin’ at ‘er, now attending the self employment program

Well, no new project pictures or anything. Summer is almost here and I’m pretty happy about that. I’m going to start at a training course for 8 weeks starting May 11.
The program itself is funded through the Canadian Government or Employment Insurance. This program is geared for people who wish to start their own business but lack the experience starting one. This program also has a 4 month post-class coaching period. From what I understand, they assist with the minutia of business and get you hooked up with financing. This program also allows one to keep collecting EI through the 6 months of the training, but not afterwards.
My idea in this case in terms of starting a business is a nebulous one at best at the moment, however, I think that by lending my skills as a machinist and programmer and technical dude, hopefully I can eke out a living or perhaps even a prosperous business in these difficult economic times.
I think that this program will help give me an introduction to the business skills I lack in abundance. Anyways, hopefully tomorrow will be a sunny day, I want to do my full report on minolta md lenses.

A Drawing of a Servo, for reference.

Well, my servos have all come in for a project I’ve been working on. These ones being some cheap Chinese servos that I picked up off Ebay. Here’s a photo of one of them.

Chinese 9G RC Servo Photo
Chinese 9G RC Servo Photo

Now that I have them I guess I have no excuse in not doing the project, especially since I bought so many of them, despite them being cheap. In starting my project I’ve decided to offer a PDF of a drawing for the servo since I had no idea how big they were or what they would measure until they arrived, thus, if anyone else wants the drawing, they can use the dimensions for their own purposes.
Here are a couple of pics of the drawing for reference.

Chinese 9G RC Servo drawing
Chinese 9G RC Servo drawing
Chinese 9G RC Servo Solid
Chinese 9G RC Servo Solid

As the project progresses I’ll review the functionality of the servos. After I had ordered them I had read that they are susceptible to outside interference, especially from the likes of human contact around the housing. From what I read, this made the servo “Freak out”. We’ll see I guess, I’m going to make a standard testbed circuit for testing anyways.

So, anyways, for anyone who wants it the drawing, here’s the PDF

Chinese 9G RC Servo PDF

Hopefully someone will find it useful.

Rotational Viscometer design proceeding apace

It’s been a while since I’ve worked at full steam on the viscometer project. Though now a long way from it’s DIY roots I am making this new version from mostly Aluminum, Phenolic, Nylon and Low Density PolyEthylene. I had to scrap the last version since it would have been too difficult to actually assemble, this one is a little different in it’s overall size and assembly.


Of course it isn’t finished yet as it doesn’t have the screen and top switch attached as well as the outer shell. Perhaps I’ll start making it this week sometime.