1 (edited by jesse 2013-07-22 00:06:44)

Topic: Filament Measuring Device

I received parts to build an automated filament measurer.


The 4 pins on the caliper will need wires soldered to them to be connected into a breadboard.

https://sites.google.com/site/marthalprojects/_/rsrc/1358797433163/home/arduino/arduino-reads-digital-caliper/caliper_port2.jpg?height=181&width=320

https://sites.google.com/site/marthalprojects/_/rsrc/1358797054939/home/arduino/arduino-reads-digital-caliper/levelshifter2.jpg?height=160&width=320

Here's some more info on the process: https://sites.google.com/site/marthalpr … al-caliper

An arduino will be used to collect data from the caliper and pass it through the serial port to the computer.  Hopefully the data can be passed directly to the 3d printer's arduino microcontroller eventually.  The part cost is around $15 USD.

Updates hopefully coming later in the week.

2

Re: Filament Measuring Device

Nice! It looks like I have one on the way that uses a CCD array. Let us know how it goes!

3

Re: Filament Measuring Device

If you put together my spring loaded caliper from Thingiverse, it is important to get the bearings as absolutely parallel as possible.  Making it from aluminum would be ideal, but for printing use a high fill and don't accept any warping.  Take care to keep everything flat when gluing the parts to the jaws if you don't screw them in.  I tried to use screws, but I accidentally got one of the jaws too hot with the drill and hardened it.

If the bearings are at a little bit of an angle, either from construction or bending, the measurement will be a little different depending on where the filament is, side-to-side.  When you are looking for .01mm accuracy, it doesn't take much to throw it off.  For best results use a little bit of PTFE tube to guide the filament as close as possible to the bearings and another to pick it up on the other side.  I also found that the reading was more accurate if I opened the caliper, ran the filament through, and then let it close.  If you let the filament push the bearings apart by itself as you feed it through, something will bend a little bit before it slides and the measurement will be maybe .04mm short.

4

Re: Filament Measuring Device

Theres also this version, doesn't use calipers, instead uses a Barcode Scanner and is accurate to 0.01mm's supposedly...

http://www.thingiverse.com/thing:89044

5

Re: Filament Measuring Device

adrian wrote:

Theres also this version, doesn't use calipers, instead uses a Barcode Scanner and is accurate to 0.01mm's supposedly...

http://www.thingiverse.com/thing:89044

That's the one I have on the way. smile

6

Re: Filament Measuring Device

Can someone familiar with electronics tell me if this looks right?

http://i.imgur.com/NYbC718l.jpg

7

Re: Filament Measuring Device

Looks like you're using those BC548s as level shifters/inverters? Circuit seems fine.

8 (edited by jesse 2013-07-28 22:37:42)

Re: Filament Measuring Device

Thanks Tim.  Actually one thing was wrong.  The GND on the digital gauge needed to be connected to GND on the arduino.

The system is up and running, it does about 1-2 measurements per second.

http://i.imgur.com/TxMQ1E6.jpg

http://i.imgur.com/AtF8aMS.png

Here's a test program for checking the wiring to the arduino.

int pin;

void setup(){
  pin = 22;
  Serial.begin(9600); 
  pinMode(pin, INPUT);
}

void loop(){
  Serial.print("PIN ");
  Serial.print(pin);
  Serial.print(" is ");

  if (digitalRead(pin) == LOW)
    Serial.write("LOW");
  else
    Serial.write("HIGH");
  Serial.write("\n");   
  delay(1000);
}

This is the sketch to read the digital thickness gauge (or a digital caliper)

int i;
int sign;
long value;
float result;
int clockpin = 22;  
int datapin = 23;
unsigned long tempmicros;

void setup() {
  Serial.begin(9600);
  pinMode(clockpin, INPUT);
  pinMode(datapin, INPUT);
}

void loop () {
  while (digitalRead(clockpin)==HIGH) {} //if clock is LOW wait until it turns to HIGH
  tempmicros=micros();
  while (digitalRead(clockpin)==LOW) {} //wait for the end of the HIGH pulse
  if ((micros()-tempmicros)>500) { //if the HIGH pulse was longer than 500 micros we are at the start of a new bit sequence
    decode(); //decode the bit sequence
  }
}

void decode() {
  sign=1;
  value=0;

  for (i=0;i<23;i++) {
    while (digitalRead(clockpin)==HIGH) { } //wait until clock returns to HIGH- the first bit is not needed
    while (digitalRead(clockpin)==LOW) {} //wait until clock returns to LOW

    if (digitalRead(datapin)==LOW) {

      if (i<20) {
        value|= 1<<i;
      }

      if (i==20) {
        sign=-1;
      }

    }
    
  }

  result=(value*sign)/100.00;    
  Serial.println(result,2); //print result with 2 decimals
  delay(1000);
}

9

Re: Filament Measuring Device

How are you going to guide the filament through gauge?

10 (edited by jesse 2013-07-29 14:09:20)

Re: Filament Measuring Device

IanJohnson wrote:

How are you going to guide the filament through gauge?

A 3D printed part that has a 2mm hole on the front/back and a 6mm hole on the sides to allow the piston to pass through.

http://i.imgur.com/F7cEiads.jpg

11

Re: Filament Measuring Device

I'll have to give that a try. I avoided the thickness gauge because the filament would just be dragging through there.  If the pressure is light I guess it would be ok. It would be more accurate because it is a direct measurement without any other parts in between to affect it.  Also I keep getting stabbed by the depth gauge sticking out the back of the caliper.

12

Re: Filament Measuring Device

If the pressure was enough, it could probably replace your tensioner in the puller.

I picked up one of those thickness gauges, haven't had time to mess with it yet.

13

Re: Filament Measuring Device

So how would those bar code (thickness scanner) work?

I have a old keyboard wedge bar code scanner that I wonder if I could hack.

What would be required? I know most barcode scanners today are actually just a camera and the software analyzes the picture to get the reading. I am not sure exactly how the old keyboard wedge models worked.

Ralph

14

Re: Filament Measuring Device

Ralphxyz wrote:

So how would those bar code (thickness scanner) work?

I have a old keyboard wedge bar code scanner that I wonder if I could hack.

What would be required? I know most barcode scanners today are actually just a camera and the software analyzes the picture to get the reading. I am not sure exactly how the old keyboard wedge models worked.

Ralph

Ian and I have tried with linear CCDs, which a lot of barcode scanners are based on. We've had trouble getting fast enough exposure times with an arduino to not be overly sensitive to light. I have a custom linear CCD board with controller on the way hopefully, as mentioned above.

15 (edited by jesse 2013-07-29 20:27:35)

Re: Filament Measuring Device

Someone on #reprap on freenode asked, "How do you account for oval-shaped filament?"

They said a solution could be to wrap a metal wire around the filament and measures the distance change.

Is that possible to get a filament diameter from the circumference of an oval?

16

Re: Filament Measuring Device

jesse wrote:

Someone on #reprap on freenode asked, "How do you account for oval-shaped filament?"

They said a solution could be to wrap a metal wire around the filament and measures the distance change.

Is that possible to get a filament diameter from the circumference of an oval?

Roughly speaking, the formula for a circle will hold for the amount of variation you'd typically see.

I like the idea of two sensors at 90deg angles, personally.

17

Re: Filament Measuring Device

Here's an insert to keep the filament from popping out.

http://www.thingiverse.com/thing:125238

http://i.imgur.com/yruQxVps.jpg
http://i.imgur.com/wNqoczIs.jpg
http://i.imgur.com/WDU5ryXs.jpg

18 (edited by jesse 2013-07-31 23:10:07)

Re: Filament Measuring Device

If the filament diameter was fed into repetier host under "Flowrate", could that be used to fix any variations in filament thickness?

For example, GCODE says 1.75 mm for filament diameter and it changes to 1.55mm.  Would the flow rate become 1.55 / 1.75 * 100 ?

19

Re: Filament Measuring Device

Here's some information about putting the caliper into different modes such as fast read

http://hackaday.com/2011/01/12/hold-fas … l-caliper/

20

Re: Filament Measuring Device

Does anyone know if the Repetier-Max firmware has a way to pause the print?

If the filament is larger than 2.00 mm my printer jams.

I'd rather use the filament measurement sensor to pause the print.  Then I'd remove the fat piece before it ruins the print.

21

Re: Filament Measuring Device

http://forums.reprap.org/read.php?267,209755

What filament has 2.00mm diameter?!

22

Re: Filament Measuring Device

elmoret wrote:

http://forums.reprap.org/read.php?267,209755

What filament has 2.00mm diameter?!

A PLA seller gave me some scrap filament for free that's way off from the spec.

I guess I could use another arduino to check the filament size and use a macro to pause the job in rep-host.

23

Re: Filament Measuring Device

I'll be producing a couple of these devices in an upgraded version that measures x & y at the same time.

For those anyone interested, the price is $100 for an assembled version and $70 for a DIY kit.

24

Re: Filament Measuring Device

instead of the filament dragging on the contact I wonder if you could use bearing on one side and this Dial indicator roller on the other to contact the filament.

http://imageserver.grainger.com/is/image/Grainger/4CER8_AS01?$productdetail$

Ultimaker S3.

25

Re: Filament Measuring Device

Playing around with the gauge, I've noticed the edge of the plunger can scrape the filament.  It might be a good idea to file it a little bit.   What does the kit consist of?