26

Re: FilaWinder Documentation

Is everything else running the way it should, with the guide setup and the knob controlling the speed of the motor in manual?  When in Auto mode, is the middle button setting the guide position the way it should?

Make sure the laser line is running across all four sensors and not missing one of them.

You can view the result of the calibration in Arduino.  Download Arduino http://arduino.cc/en/main/software and plug the board in to USB.  Under Tools select the Com port the board showed up on, and then select Tools/Serial Monitor.   Switch to manual and hit the middle button to start calibration.  When the calibration routine ends, the Serial Monitor should show a set of Maximum values and Minimum values for each sensor.  They should all be similar.  If you have a multimeter you can also test the resistance of each photocell to make sure they are all getting similar readings.

27

Re: FilaWinder Documentation

The laser line is good,  but when in manual mode
The pot only moves the arm but doesn't control the motor speed.
The motor just runs a constant slow speed.  The motor starts
After a pause when setting the left arm
Limit while in Auto Mode.  I have arduino software
And will hook it up.   I assume you use terminal mode
To catch ASCII strings.  Thanks for helping me sort this out.

28

Re: FilaWinder Documentation

Connected up the serial port and got a string
Of numbers.   73, 368, 73, 368, 73, 367, 73 ....
Don't know what that means, but any 4 in a row
Doesn't look like its in the same range.
Analog voltage across the sensors from top to bottom
Is 0.414, 0.312, 0.442, 0.369 Vdc.

29

Re: FilaWinder Documentation

Now that I have seen the strings, you might consider outputting
An R or L or C or A to indicate control switch closure.
It would make remote diagnostic easier.

Just a thought.

30

Re: FilaWinder Documentation

It's not the sensors, since the knob isn't controlling the motor.  It sounds a little like when the firmware isn't working right.  Try reflashing it-

https://www.dropbox.com/s/unsmu9c6qbbk3 … der_v7.zip

Before uploading it, add the PID and QTR libraries by going to Sketch/Import Library/Add Library and pointing it to the QTR and PID zip files.

31

Re: FilaWinder Documentation

I reflashed the nano, but got same results.  Very nice coding by the way.

The string of numbers keeps rolling out the serial port and doesn't stop.  I thought it was supposed to stop after 10 seconds.

Also kit has Nano 328, if using Nano 168 the analog ports/pins are numbered differently.  I was wondering if you were aware of this and if it might  be a source of the problem.  It could be looking at the wrong ports.

Hope this is helping.   It appears to be stuck in sensor calibration.

32

Re: FilaWinder Documentation

Here is a version that has a serial readout of the button and switch states, knob reading, motor speed, guide position, filament position, etc.  When you hit the button to calibrate sensors, it should pause the readout during calibration and output a line of Min values and a line of Max values, then continue.

v8 requires a jumper on the pair of pins at D11 (second from the left under the arduino) to activate the serial readout.  This is because all the extra activity tends to make the servo jerky and reduce the responsiveness of the sensors.  If you don't have a jumper handy, you can use v8b which doesn't require it.

There was also an issue where the top speed of the spool in Auto mode was less than the top speed in manual.  I scaled the PID output so that the top Auto speed is the motor's full rpm.  This might make its response a little more jerky, but I haven't had a chance to test it since I'm in the middle of installing the beta Filastruder motor.

https://www.dropbox.com/s/0r9j52fpd1ogw … der_v8.ino
https://www.dropbox.com/s/y60g6gwgsi0rf … er_v8b.ino

33

Re: FilaWinder Documentation

Thanks for the test software.  I used version 8b with the following results:

Hall = 1 and goes to 0 when magnet comes around
Right = 0 fixed
left = 1 until button is pushed and goes to 0
center = 0 fixed
auto = 1 for manual position and 0 for Auto
Knob = 0 to 1023 as it is rotated clockwise
Guide Pos = 204.00 fixed
Mot Speed = 100 fixed
Loop Pos = 3000.0 fixed

Checked switches and controls at plugs on Motherboard and all short properly when activated.

In Manual Mode, Press L to get:
Min Values: 259  314  224  264
Max Values: 942  956  928  947

Problems seems to be the stuck 0 for the Right and Center buttons, even though the wiring checks ok to the motherboard.

Still Puzzeled
Still Puzzeled

34

Re: FilaWinder Documentation

You get sensor calibration by pressing the L button?  It should be center.  Still doesn't explain the buttons being shorted on. I will probably need to send you a new control board, so PM me your address.  Until then, you can try assigning the right and center buttons to pins D11 and D10 on the expansion header.  If they work, that would point to a problem with the pins on the board.

Under //Digital Pins change guide_minPin to 11, and change sensor_setPin to 10 and plug them into those pins in the expansion section under the USB plug.

My test jig shorts the button pins, simulating a button press and gives me a light if they show as connected.  If somehow they are shorted on the PCB, then that is going to give me a positive result even though there is a problem.  I'm going to have to think on how to deal with that.

35 (edited by kb7vms 2014-01-30 05:13:39)

Re: FilaWinder Documentation

Reran test with nano removed from the control board.  Got the same result with Right and Center both still reading 0, so it appears to be isolated to the nano board.

Thanks for the test software.

36

Re: FilaWinder Documentation

malek1979m wrote:

I'll post the part on Thingiverse soon.

In case anyone missed it, Malek posted this up here:  http://www.thingiverse.com/thing:233877

Thanks,
Craig

Masterbatch, ABS and PLA Pellets available for UK and Europe.
http://www.emakershop.com/Seller=1324

37

Re: FilaWinder Documentation

In case anyone missed it, Malek posted this up here:  http://www.thingiverse.com/thing:233877

Thanks so much for that! I completely forgot to update my original post about that.

38

Re: FilaWinder Documentation

I have a Extrusion Bot and it seems to be extruding faster then my winder will wind, I am extruding 3mm. Is there a way to spped the winder up? I have the winder at full speed and it will not keep up.

39

Re: FilaWinder Documentation

Ian has faster motors available - shoot him a email: [email protected]. You could also drop the temp on the EB in the meantime.

40

Re: FilaWinder Documentation

Thanks i will email him and i will try your suggestion on the temp.

41

Re: FilaWinder Documentation

cybersarg wrote:

I have a Extrusion Bot and it seems to be extruding faster then my winder will wind, I am extruding 3mm. Is there a way to spped the winder up? I have the winder at full speed and it will not keep up.

I thought the EB comes with its own winder...

42

Re: FilaWinder Documentation

ExtrusionBot Winder-

http://www.youtube.com/watch?v=FSRYBb6PPYU

43

Re: FilaWinder Documentation

IanJohnson wrote:

ExtrusionBot Winder-

http://www.youtube.com/watch?v=FSRYBb6PPYU

http://static2.wikia.nocookie.net/__cb20130807201647/nickfanon/images/1/17/Not-bad-meme.jpg

44

Re: FilaWinder Documentation

kb7vms wrote:

Reran test with nano removed from the control board.  Got the same result with Right and Center both still reading 0, so it appears to be isolated to the nano board.

Thanks for the test software.

kb7vms reported a post, with the following reason:

kb7vms
Today 19:37:01
Filastruder → FilaWinder Documentation → Post #48217
Got the new nano today. Dropped it into thecontrol board and everything worked perfectly.Already built and installed the filament guageand platform extender. Really looks good.

Presumably he meant to reply...

45

Re: FilaWinder Documentation

IanJohnson wrote:

ExtrusionBot Winder-

http://www.youtube.com/watch?v=FSRYBb6PPYU

What... Is this... MADNESS?!

46

Re: FilaWinder Documentation

The guys making the extruders who think they want to integrate a winder have enough complexity to deal with on the extruder side, and spooling looks simple by comparison.  It isn't unfortunately.  You need closed loop speed control, tension, a way to guide the filament back and forth, and it all has to be isolated from the nozzle so you don't screw up the tolerance.  ExtrusionBot has only a rough on-off speed control and none of the rest.

When I saw the final version on Kickstarter I thought it looked like about where I was with the winder last April, and I had to solve a lot of problems since then.

47

Re: FilaWinder Documentation

IanJohnson wrote:

The guys making the extruders who think they want to integrate a winder have enough complexity to deal with on the extruder side, and spooling looks simple by comparison.  It isn't unfortunately.  You need closed loop speed control, tension, a way to guide the filament back and forth, and it all has to be isolated from the nozzle so you don't screw up the tolerance.  ExtrusionBot has only a rough on-off speed control and none of the rest.

When I saw the final version on Kickstarter I thought it looked like about where I was with the winder last April, and I had to solve a lot of problems since then.

I work in Software Development and just like this hardware development done by Ian and Tim, what most people fail to realise is that R&D and QUality Assurance will always need to take place.  If you don't do it before the release (like Tim and Ian) then it will almost certainly have to happen after the release or the product will fail.  The problem with doing it after the release is that you annoy a lot of customers in the process and probably end up losing a bunch of money (if commercial).

I picked both these products because I could the amount of wrinkle that had been ironed out before going to market, many consumers are distracted by the glitz and glam of the packaging.  I choose function over form (not vice versa)...  (Sorry, probably a bit OT considering the original topic of the thread)

Masterbatch, ABS and PLA Pellets available for UK and Europe.
http://www.emakershop.com/Seller=1324

48

Re: FilaWinder Documentation

cybersarg, would it not be possible to just print a bigger motor gear to make the spool turn quicker?

49

Re: FilaWinder Documentation

Hello,

I have the mechanics and wiring done by Filawinder.
If there is no firmware on the board?
If I give it power to do nothing at all.

Has the board no USB port? How do you get it the firmware?

50

Re: FilaWinder Documentation

/**********************************************************************************************
 * Arduino PID Library - Version 1.0.1
 * by Brett Beauregard <[email protected]> brettbeauregard.com
 *
 * This Library is licensed under a GPLv3 License
 **********************************************************************************************/

#if ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
#endif

#include <PID_v1.h>

/*Constructor (...)*********************************************************
 *    The parameters specified here are those for for which we can't set up 
 *    reliable defaults, so we need to have the user set them.
 ***************************************************************************/
PID::PID(double* Input, double* Output, double* Setpoint,
        double Kp, double Ki, double Kd, int ControllerDirection)
{
   
    myOutput = Output;
    myInput = Input;
    mySetpoint = Setpoint;
    inAuto = false;
   
    PID::SetOutputLimits(0, 255);                //default output limit corresponds to
                                                //the arduino pwm limits

    SampleTime = 100;                            //default Controller Sample Time is 0.1 seconds

    PID::SetControllerDirection(ControllerDirection);
    PID::SetTunings(Kp, Ki, Kd);

    lastTime = millis()-SampleTime;               
}
 
 
/* Compute() **********************************************************************
 *     This, as they say, is where the magic happens.  this function should be called
 *   every time "void loop()" executes.  the function will decide for itself whether a new
 *   pid Output needs to be computed.  returns true when the output is computed,
 *   false when nothing has been done.
 **********************************************************************************/
bool PID::Compute()
{
   if(!inAuto) return false;
   unsigned long now = millis();
   unsigned long timeChange = (now - lastTime);
   if(timeChange>=SampleTime)
   {
      /*Compute all the working error variables*/
      double input = *myInput;
      double error = *mySetpoint - input;
      ITerm+= (ki * error);
      if(ITerm > outMax) ITerm= outMax;
      else if(ITerm < outMin) ITerm= outMin;
      double dInput = (input - lastInput);
 
      /*Compute PID Output*/
      double output = kp * error + ITerm- kd * dInput;
      
      if(output > outMax) output = outMax;
      else if(output < outMin) output = outMin;
      *myOutput = output;
      
      /*Remember some variables for next time*/
      lastInput = input;
      lastTime = now;
      return true;
   }
   else return false;
}


/* SetTunings(...)*************************************************************
 * This function allows the controller's dynamic performance to be adjusted. 
 * it's called automatically from the constructor, but tunings can also
 * be adjusted on the fly during normal operation
 ******************************************************************************/
void PID::SetTunings(double Kp, double Ki, double Kd)
{
   if (Kp<0 || Ki<0 || Kd<0) return;
 
   dispKp = Kp; dispKi = Ki; dispKd = Kd;
   
   double SampleTimeInSec = ((double)SampleTime)/1000; 
   kp = Kp;
   ki = Ki * SampleTimeInSec;
   kd = Kd / SampleTimeInSec;
 
  if(controllerDirection ==REVERSE)
   {
      kp = (0 - kp);
      ki = (0 - ki);
      kd = (0 - kd);
   }
}
  
/* SetSampleTime(...) *********************************************************
 * sets the period, in Milliseconds, at which the calculation is performed   
 ******************************************************************************/
void PID::SetSampleTime(int NewSampleTime)
{
   if (NewSampleTime > 0)
   {
      double ratio  = (double)NewSampleTime
                      / (double)SampleTime;
      ki *= ratio;
      kd /= ratio;
      SampleTime = (unsigned long)NewSampleTime;
   }
}
 
/* SetOutputLimits(...)****************************************************
 *     This function will be used far more often than SetInputLimits.  while
 *  the input to the controller will generally be in the 0-1023 range (which is
 *  the default already,)  the output will be a little different.  maybe they'll
 *  be doing a time window and will need 0-8000 or something.  or maybe they'll
 *  want to clamp it from 0-125.  who knows.  at any rate, that can all be done
 *  here.
 **************************************************************************/
void PID::SetOutputLimits(double Min, double Max)
{
   if(Min >= Max) return;
   outMin = Min;
   outMax = Max;
 
   if(inAuto)
   {
       if(*myOutput > outMax) *myOutput = outMax;
       else if(*myOutput < outMin) *myOutput = outMin;
     
       if(ITerm > outMax) ITerm= outMax;
       else if(ITerm < outMin) ITerm= outMin;
   }
}

/* SetMode(...)****************************************************************
 * Allows the controller Mode to be set to manual (0) or Automatic (non-zero)
 * when the transition from manual to auto occurs, the controller is
 * automatically initialized
 ******************************************************************************/
void PID::SetMode(int Mode)
{
    bool newAuto = (Mode == AUTOMATIC);
    if(newAuto == !inAuto)
    {  /*we just went from manual to auto*/
        PID::Initialize();
    }
    inAuto = newAuto;
}
 
/* Initialize()****************************************************************
 *    does all the things that need to happen to ensure a bumpless transfer
 *  from manual to automatic mode.
 ******************************************************************************/
void PID::Initialize()
{
   ITerm = *myOutput;
   lastInput = *myInput;
   if(ITerm > outMax) ITerm = outMax;
   else if(ITerm < outMin) ITerm = outMin;
}

/* SetControllerDirection(...)*************************************************
 * The PID will either be connected to a DIRECT acting process (+Output leads 
 * to +Input) or a REVERSE acting process(+Output leads to -Input.)  we need to
 * know which one, because otherwise we may increase the output when we should
 * be decreasing.  This is called from the constructor.
 ******************************************************************************/
void PID::SetControllerDirection(int Direction)
{
   if(inAuto && Direction !=controllerDirection)
   {
      kp = (0 - kp);
      ki = (0 - ki);
      kd = (0 - kd);
   }   
   controllerDirection = Direction;
}

/* Status Funcions*************************************************************
 * Just because you set the Kp=-1 doesn't mean it actually happened.  these
 * functions query the internal state of the PID.  they're here for display 
 * purposes.  this are the functions the PID Front-end uses for example
 ******************************************************************************/
double PID::GetKp(){ return  dispKp; }
double PID::GetKi(){ return  dispKi;}
double PID::GetKd(){ return  dispKd;}
int PID::GetMode(){ return  inAuto ? AUTOMATIC : MANUAL;}
int PID::GetDirection(){ return controllerDirection;}

and now?