Viscometer Report - Aug 6 2008

Since the last report done on the viscometer, a great many things have changed in regards to the mechanical and electrical design of the unit. It is now a rotary viscometer instead of a paddle based unit. It operates in a similar fashion to the typical Stormer viscometers in that it measures the energy required to push a paddle at 200 (or other specified) RPM; the greater the force required, the larger the KU value.

Summary of what’s been done so far

So far, the majority of the unit is in a functional state. Recent modifications have allowed the unit to function in a more reliable fashion. The unit works on the following principle:

  • There is a gear motor that is specified to run at 275RPM at full power.
  • The motor’s shaft is fitted with an encoder.
  • The motor is started and operated with a PWM (Pulse Width Modulation) output.
  • If the motor is running too fast (>200RPM) , the duty cycle is dropped.
  • If the motor is running too slow (<200RPM) , the duty cycle is increased.
  • From the duty cycle values sampled over a period of time is derived a viscosity value, preferably translated into Krebs units.

So far, things that are done/workable are:

  • Main CPU w/o calibration and safety routines
  • Tach Controller
  • PWM Controller
  • High ESD Input controller
  • Auxillary controller (not implemented yet)
  • Motor controller
  • Main Viscometer Unit

Here is an image detailing some of the items on electronic side of the viscometer:

Click to enlarge

The Viscometer Electronics

The Viscometer Electronics

Whats going on now?

Currently, I’m working on a few items related to the viscometer, namely:

  • Viscosity testing with mostly a flour-water mix since the resulting mixture is similar to the shear thinning fluids of paints and coatings.
  • Explosion proof case acquisition. While there are a great many NEMA-7 Enclosures available, I’m trying to find one that isn’t $800+ per case.
  • Algorithm changes. Since the samples that come into the unit are not as clean as they appear on the screen, the sampling algorithm has to be tested in order to produce accurate and useful data to the automation system.
  • RS-232 Output device. I’m currently working on the output portion of the device, that way the automation system can read what’s being measured.
  • New Mainboard
    New Viscometer board

    New Viscometer board

    This board integrates everything that you see in the picture above and allows it to take on the same footprint as the 5×3 power supply. This allows one to purchase smaller enclosures and it’ll be a lot more reliable with fewer interconnects.

Some Problems

While there aren’t any showstopping problems, there are a couple of kinks to work out.

  • With the increased friction from the new top and bottom bushings, the sensitivity to the lower end of the scale (around water’s viscosity) is almost Nil. I’m going to play around with the sizes and try a couple of tricks in the way of selectively modifing the outgoing voltage. The bushings are a double-edged sword, they help remove the reliance on the alignment of the shaft and the unit in general but, of course the aforementioned friction is now a problem.
  • Long warm up times. In order to reach a stable set of samples with any fluid, the unit must be on  for at least 5 minutes. This has been exacerbated by the bronze bushings to about 7 minutes. I suspect this isn’t the fault of the motor but of the seals and lubricant needing a warm up time in order to drop their friction levels. I am looking at different lubricants and at adding a start up routine that runs the motor at full speed for 40 seconds or so, this seems to mitigate the issue.
  • Still some measurement differences based on vertical or horizontal alignment….

Well I hope this was informative, if you have anything you want to ask, feel free to do so.

Work

Comments (0)

Permalink

A note about PIC MCU’s

Since I couldn’t see a cross reference list about PIC MCU’s between the 10F 16F 18F and 18F(80TQFP), I’ve decided to list it here in all it’s glory. I’ll add to it ass I use more MCU’s

MCLR/VPP VSS(GND) VDD(+) PGD/ICSPDAT PGC/ICSPCLK
PIC10FXXX PDIP Pin 8 Pin 7 Pin 2 Pin 5 Pin 4
PIC16FXXX PDIP Pin 4 Pin 20 Pin 1 Pin 19 Pin 18
PIC18FXXX 40-PDIP Pin 1 Pin 12 Pin 11 Pin 40 Pin 39
PIC18F 80-TQFN Pin 9 Pin 11,31,51,70 Pin 12,32,48,71 Pin 47 Pin 52
PIC18F 68-PLCC Pin 16 Pin 68,19,36,53 Pin 20,37,49,2 Pin 48 Pin 54
PICKIT 2 Programmer Pin 1 Pin 3 Pin 2 Pin 4 Pin 5

Comments (0)

Permalink

Fucking Virus/Malware Pricks

If there was ever a spot for the most pitiful human in existence, it’d be the pricks who write and modify malware/viruses into people’s sites, e-mails and various other computer data. Along with the compulsive masturbators who jerk off on the street and the kiddy fiddlers, these guys are pathetic.

That is all.

Comments (0)

Permalink

The lamp I’ve been saying I was going to build

Well, I’ve built it, the useless yet fun, timer lamp. The idea behind the timer lamp is to have a bedside lamp that you can turn on and of but also set it to turn off after a certain amount of time. This task is pretty easy but I wanted it to be controlled by a micro controller. After two years of thinking about it I finally got off my duff and built it.

Here’s a blow by blow of how it was built.

Controller board

First I took the thing apart. The wire itself is pretty tough to chew on so I kept it in there so I can save the lamp itself. The lamp was bought from Wal-mart for about $18.

Controller board

Here’s a blurry pic of the control board I designed. It’s generic in that it can take both digital and switch input and output 200ma per channel on 3 outputs. It’s nothing special but it’s small enough and it works. The MCU on it is a PIC16F505, not a great MCU but it works.

Lamp Husk

with buttons

And here’s the casing on the base. Inside was some sort of bizarre weight made of something I did not want to cut.  I took the guts out and popped two 5/8 holes for the buttons. I didn’t have a proper drill so I used a forstner bit, not ideal bit it worked surprisingly well.

ugly guts

I inserted the guts of the machine and had to follow the existing wire in and keep the controller towards the front. As you can see, it’s pretty ugly, as well I used hot glue to affix the boards to some wood which was then affixed with hot glue to the inner casing. It’s not an ideal solution but it relieves me of having to use bolts and it was fast.

working

standing

And there you have it, it seems to work. No fire, or smoke and it works as programmed (kind of). Now I’ll have to go to work and build a new base, one to keep the unit steady, also I think I’ll add a little piezoelectric tweeter for audible confirmation of time selected.

Anyways, I’m glad I made it this far on the project in such a short amount of time.


Comments (0)

Permalink

Fucking around with VB2005

So I’ve decided to get my feet wet again with programming after a long hiatus doing other things like photography and electronics. I thought I wouldn’t have any problem programming again but little did I realize how trained your mind becomes with certain patterns of thought through programming. Electronics, being a utilization of a natural force, is often non-linear in nature and required a different mind set, even small numbers of components can produce complex results/problems.

So for the last few days I’ve been trying to make a new program based on an idea I’ve had for some time, the name of this idea is Notary. Notary is a very simple program in implementation but if you keep up with entering data into it, it becomes useful.

Here is the premise of Notary:

  • User(s) are greeted with nothing more than a window with a text box.
  • The User enters any kind of text, for example, a phone number along with a name or a description of how you solved a problem
  • the text is stored in a very simple database, essentially an ascii file with record headers and unique IDs
  • The user can then later search the database to retrieve information that is directly or indirectly related to a search term

This sort of approach has probably been taken before but in much more complicated ways. I intend for the computer to search and present the information appropriately rather than the user trying to wrack their brains to make the data useful or search the data.

Here are some of the key ideas:

  • Make the interface simple. Hence, the simpler and easier it is to use, the more likely a person is to enter the data.
  • Allow future replacement and deletion of data, but never get rid of it, allow for future recovery and allow indirect search through this void data.
  • Allow 2nd to 3rd order matches to a keyword, in other words, allow the relationships from the keywords have record commonalities from 2 or 3 levels away. Inference of this kind, especially on large databases, allows for unexpected info recollection.
  • Allow database blending, thus you can have multiple databases blended together from various locations at any time.

Hopefully I can implement these ideas well. I’ll keep working on it, and if anyone actually reads this site, I post it as well in one of my side pages.

Notary

Simple.

Comments (0)

Permalink

Got the PCBs Back!

Well, they turned out about as good as I’d hoped, the new PCBs are pretty cool. This whole time I’ve been learning electronics I’ve been building boards by hand; That is a foolish move. I took Sam’s advice and got them done up at APCircuits and the result was good. Here are some pics!

Populated and unpopulated

New PCB

Comments (0)

Permalink

PCB creation is fun

Been playing around with Multisim lately. I must say, it beats the tar out of using veroboard for all of my circuits. Just for whoever reads this, here’s a screenshot of my board.

PCB

I sent the files off to APCircuits for rapid prototype board construction. I’ll post a pic when they’ve sent it.

Comments (0)

Permalink

Had a good ride yesterday

If it hasn’t been explained on this site before, which it hasn’t, I’ve been commuting to and from work for the last 11 months or so. Even in the winter the ride isn’t too bad. Since winter was gone and the trees are donning their full plumage, I decided to do a good ride on my new tricross to Bon Accord. It was an interesting experience.

When I was about 10-12, I used to ride with my parents to various places on the countryside. Since then I’ve forgotten how long and boring 20km is on the flat, lonely roads of the Alberta prairies. The hot sun beating down on you is like punishment for daring to ride to another location on the tarmac built for cars. Needless to say, I forgot what a drag it is, but also how interesting the scenery is and the connection you gain to the true nature of distance on your ride.

Anyways, I didn’t make it all the way to Bon Accord since the sun would’ve waned too far on the way back, lest I be run down by a local yokel in his Quad Crew Ultra-Mega Cab GMC Gas Guzzler(tm) Pickup Truck. Also I wore standard shorts instead of my bike shorts. That was a mistake, chafes-o-plenty. Next time I’ll be a little better prepared; Lights, proper shorts, side panniers instead of a backpack and perhaps an earlier departure time will all be part of my course of action.

I was going to go for another ride today, perhaps to Morinville, but my body wouldn’t let me. Two passes through the sturgeon valley and some tough hills have exhausted me and despite my continual bicycle commute, I had to rest. I took the day off today and watched the boy learn to ride his bike.

36 Km to Edmonton

Not very welcome after turning around and feeling a blast of headwind in the face.

The path to bon accord

That is the path I took. 46.8km Total

Comments (0)

Permalink

Project Report

Following is a report of my progress regarding the viscometer. Having spent several months on this project and having gone through four mechanical iterations and umpteen electronic iterations of design, it’d be a good idea to go through and describe where I am in the project, and where I have to go in order to follow the project to completion.

Electronic Side

Magnet Drive (click image to see full size)

Magnet Drive

This unit is the main magnet drive. It is responsible for the pulse width modulation control of the four H-Bridges below it. Each H-Bridge is fully optically isolated, can happily push 15A at ~3KHz with any duty cycle. The H-Bridges were also designed in such a way that they don’t produce much power supply noise and very little inductive hiccup. The Board on the top has a microcontroller that controls the four H-Bridges and accepts input from the main control board and the dip switch set on-board for debug purposes.

The unit has been fully tested (waveform, heat and max current) and works, no more modification or re-design is required.

Input Totem (click image to see full size)

Input Totem

This unit was built to stem problems arising from EMF and Static discharge. Earlier versions of the project would suffer from random shutdowns, errant signals and noise. I wasn’t entirely sure for some time why certain events would occur for no reason but even pressing a switch sometimes was enough to roast a microcontroller. I recently tracked it down to long input lines picking up noise and also generating power dips when, say a switch, is activated. This unit isolates the inputs from the faceplate and debounces the signal in order to remove potentially hazardous voltages from making it to the mainboard. This unit also dissipates large transient voltages through the use two voltage suppressors per input line.

Currently this unit works and has been tested. It does require some additional programmatic tweaking.

Main Motherboard (Click on image to see full size)

Visco Motherboard

This unit comprises of a larger PIC18F microcontroller with a 4 digit LED display, this is the primary control board. This board is responsible for controlling the Magnet drive, The LCD Front Panel Display, The Debug Display (The one on the board), calculating the results of data, outputting said result and it also handles the filtered input. This is basically the ‘brain’ of the machine and this particular part of the project has gone through the greatest number of iterations, probably 8 or so.

This unit, circuit wise, works and has been tested. It still requires programming as the entire unit has been redesigned and functions in a different fashion than the previous versions.

General overview (Click on image to see full size)

Overview

This is a general overview of what the internals are going to look like when assembled. Of course, these are not the final positions of each unit and a couple of units are missing from this picture (namely the +5v isolated supply and the Serial Out board)

Mechanical Side

The Current Design (click on image to see full size)

Solidworks Viscometer

This is the latest design of the unit. Several design changes have been made in relation to the previous 6 designs (3 were made). Following is a list of changes.

  • Made the magnet units smaller but longer, opting for size in heat-sink area.
  • Magnets are closer together towards the paddle
  • Sensor unit no longer consists of two reed switches and now consists of one hall effect sensor.
  • Timing is found by center point activation rather than activation at extents of travel.
  • Wiring is changed from Single solid-core Teflon coated wire to shielded, multi-lead stranded wire for easier assembly and maintenance. Also the shielding provides protection for outside interference and electrical problems.
  • Top and bottom plates are solid instead of multi-piece in order to simplify manufacturing
  • Paddle is shorter and has less area, PWM will ensure proper shear rates on paddle.

The previous designs had the following flaws:

  • Distance to paddle from magnets was too great, creating a ‘dead’ spot in the center of travel
  • Making a magnet larger does not mean greater field intensity at larger ranges. Each previous iteration was based on the false assumption of larger=stronger.
  • Reed switches were problematic. Either moisture or improper magnetic application proved to create intermittent contact on the switches making for a difficult to track problem.
  • Previous units were susceptible to heat problems. Smaller magnets, lower current and warm-up cycle solved the issue. Plastic sometimes melted under large loads
  • Units were difficult to assemble, thus, difficult to maintain in an industry setting.
  • Units had lots of nooks and cranny s making it difficult to clean.
  • Previous paddles were either too larger or were of the incorrect length at both the signal and Thrust sides.

As far as this part of the unit is concerned, I’m not far from completion, aside from machining.

What is left to do?

So far, not much is left to do on a surface level. I have the following items to complete.

  • Finish design for unit (Decide on arrangement and potting of sensor)
  • Machine parts for prototype
  • Finish some programming on the input totem.
  • Start testing with dummy board
  • Once tests on mechanical portion are done, main board needs programming
  • Program main board (in no particular order)
    • Confirm and program communication scheme
    • Derive algorithms for appropriate sampling and error correction
    • Program debug display
    • Program for parallel LCD display
    • Create initial setup and calibration routines
    • Create run-time user interface and system.
  • Test, test, test.

That’s the list thus far, and completed as per my knowledge.

It should also be noted that I’ve built an automated rotary paddle type viscometer (rudimentary prototype) that is functional and can easily be adapted, with appropriate components, for in-line use. I’ve also produced a working vibratory viscometer, it however doesn’t follow non-Newtonian fluids well.

Hopefully this was informative, thanks for reading.

Comments (0)

Permalink

Long time no write.

Well, it’s been a while since I’ve written anything in my blog. I suppose I’ve had plenty of reason to having found all kinds of neat stuff out and been taking fewer photographs. I suppose it’s been the winter, I’m tired of the droll scenery and the brown… everything. I guess instead of posting things that matter, I’ll post a few of my favorite pics that I’ve taken. The odd thing is, the favorites of mine differ from what other people seem to like, even in my own photo pool.

This week, I’ll try and start riding to work again, I’ve been errant for the last week. I’ve been lazy I guess.

Comments (0)

Permalink