1 (edited by tonycstech 2019-06-29 08:35:12)

Topic: Filawinder servo mod idea

First of all i'd like to ask MODS to create forum for filawinder because its a unit of its self different from filastruder all together.
Thank you.

When servo pushes the arm left and right, it encounters allot of resistance sometimes.
I looked at the WELLZOOM winder and they are using mechanical screw that simply slides filament guide left and right along the width of the spool.

So i came up with my own setup reusing original hardware but it does not work.
SERVO does not turn none stop until i say so, but only to a limit less then 360 degrees on either direction.
I need some kind of motor that will continue to turn to a desired point and then back.

Picture shows the idea (already tried and it works great except for the motor)
http://soliforum.com/i/?AKQX1dg.jpg

Any ideas ?
What motor do i need and what changes do i need in the firmware of the filawinder board and how ?

Original motor is [Positional servo] but i think i need [Continuous rotation servo]

thanks !

2

Re: Filawinder servo mod idea

Hobby servos have a defined range of motion, typically limited by the pot that is used to indicated its position.

There are some continuous types available from various sellers. There are also some tutorials out there that show how to mod an existing position based motor.

Once you get into continuous types though, you need something to tell the servo to rotate opposite once it reaches its desired position. (end stop switch, optical etc.)

You could also use a stepper motor to do the same thing.

Continuous rotation servo:
https://www.adafruit.com/product/154?gc … LUQAvD_BwE

3

Re: Filawinder servo mod idea

I ordered Continuous rotation servo.
Filawinder already programmed to reverse direction, correct ?
All i have left to do is to change potentiometer to a different once that will turn 360 instead of just left to right, correct ?

4

Re: Filawinder servo mod idea

Some servos use an encoder disk instead of a pot. I have never seen a 360 pot. Do they even exist?

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

5

Re: Filawinder servo mod idea

probably be better off using a small stepper to turn the screw

Sd4 #9080 with a glass bed. E3d chimera duel extruder. Paste extruder , duet wifi.
Lawsy carriages. linear bearings. Y axis direct drive, Kinect scanner
SD4#8188 glass bed, lawsly carriages, E3d v6, octoprint http://www.ustream.tv/channel/hotrod96z28
Filastruder/filawinder, Custom Delta 300mm x 600mm

6

Re: Filawinder servo mod idea

I was just going to say the same thing about the screw. That is how filabot does it.

7

Re: Filawinder servo mod idea

I'd like to but i dont know how.
Filabot and wellzoom windes do same thing i guess but i did not see it up close to know how its done.

8

Re: Filawinder servo mod idea

tonycstech wrote:

I'd like to but i dont know how.
Filabot and wellzoom windes do same thing i guess but i did not see it up close to know how its done.


The guide runs to and fro on a screw like the Z axis of a printer. A limit switch at each end triggers the direction change.

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

9

Re: Filawinder servo mod idea

if you know the length of the screw and the screw pitch, you can count the stepper motor pulses to determine when to reverse direction. This would eliminate the need for switches

10

Re: Filawinder servo mod idea

coolio986 wrote:

if you know the length of the screw and the screw pitch, you can count the stepper motor pulses to determine when to reverse direction. This would eliminate the need for switches

This works till something happens that causes the motor to miss a step or more. Then the whole thing is thrown off. That's why printers still use switches instead of steps due to reliability.

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

11

Re: Filawinder servo mod idea

Thats right.

But then again, even with switches once you loose steps you have to re-home it anyway.

Since printers don't hit their endstops every time they make a movement, they are not always used. There is some expectation that they will work as designed.

12

Re: Filawinder servo mod idea

For the continuous rotation servo mod, IIRC, a gear is removed from the servo that connects the motor to the pot. Then another gear still connected to the pot is super glued in place to prevent the pot from ever turning again. This then forces the PID position loop in the servo to never reach its destination, and therefore it always remains turning until you send it a PWM command to stop.

The basic idea is, the pot is glued into place using super glue, and preferably glued into its middle of rotation position. Motor is commanded to turn in CW or CCW direction via PWM signal, and magnitude can be adjusted by how much PWM is sent. Since the pot never changes position, the motor never stops turning until you send it a PWM signal that adjust its "error" back to 0.


This is one way to do it:

https://www.instructables.com/id/Conver … -Rotation/

This is another way to do it:

https://learn.adafruit.com/modifying-se … n/overview

13

Re: Filawinder servo mod idea

Well i have already received my continuous rotation servo today.
Plugged it and to see what happens.
It constantly rotates in one direction and position knob does little to nothing.

I think filastruder needs to be programmed to make X amount of turns one way and another.
The Min and Max turns are set by the button pressed, just like with the original, but i have no idea how to do that.

14

Re: Filawinder servo mod idea

Does Tim know what PWM is output in the firmware?

Frequency and width?

15

Re: Filawinder servo mod idea

The firmware is open source, you're welcome to look at anything you like.

16 (edited by tonycstech 2019-07-21 23:49:12)

Re: Filawinder servo mod idea

I am working on replacing SERVO with a basic 12V motor that powers my own guide system.
http://soliforum.com/i/?g16cUcV.jpg
Motor is triggered by 5V Relay.
5V has to come as ON and OFF from somewhere so i decided to use UNUSED pin from the board A4

Pin A4 is analog pin. It has output on the board (see picture below)
http://soliforum.com/i/?A1fcsX9.jpg

This works ONLY in AUTOMATIC mode.
Using modification in firmware from 2017 (see modification below) i added A4 pin as LOW (no power) by default
When filament drops low enough to activate the spool motor, A4 pin becomes HIGH (5V is ON)
That will trigger 5V relay.
5V relay will pass 12V coming from [Fan] pins through and activate my filament guide system.
The now 12V will enter into 2 sets of relays. Those relays are very special because they allow me to reverse motor direction by utilizing momentary switches. I tried multiple relays and countless switches, nothing will work but latched/bistable relay (see picture below explaining it)
http://soliforum.com/i/?5wCeYht.jpg
I think i need to have 2 of those relays in order to reverse polarity to the motor based on which momentary switch is pressed at which relay.
Maybe i can use just one of those to trigger another basic 2 channel relay to to deversing ? Will see.

I have yet tested the mechanism using these relays so i dont know yet how i will wire it. No diagram as of right now.
But i have tested other relays and countless types of switches so i know those wont work no matter what you do.


I use Arduino 1.8.9
Required library: QTRSensors by Pololu
Library can be downloaded from Tools/Manage Libraries
=====================================================
=====================================================
Select:
Board/Arduino Nano
Processor/ATMega328p (old bootloader)
COM/What ever number device is connected to
Programmer/ArduinoISP
=====================================================
=====================================================
Open filawinder.ino
Locate:        pinMode(12, INPUT);
Add under:    pinMode(A4, OUTPUT); //added line

Locate:        digitalWrite(12, HIGH);
Add under:    digitalWrite(A4, LOW); //added line
=====================================================
=====================================================
Locate:    
void setMotorSpeed(int thisspeed)
{
  if (thisspeed<minimumPullerSpeed && (millis() - timeToMinimumSpeed < maxTimeMinimumSpeed)) {thisspeed=minimumPullerSpeed; }
  else { timeToMinimumSpeed=millis(); }

Change to:
void setMotorSpeed(int thisspeed)
{
  if (thisspeed<minimumPullerSpeed && (millis() - timeToMinimumSpeed < maxTimeMinimumSpeed))
  {
    thisspeed=minimumPullerSpeed;
    digitalWrite(A4, LOW);
  }
  else
  {
    timeToMinimumSpeed=millis();
    digitalWrite(A4, HIGH);
  }
=====================================================
=====================================================

How ever i am facing a problem.
Due to my lack of knowledge for Arduino programming, this was the best i could come up with.
Every 2-3 seconds there is a spike in voltage on pin A4. Its very small and nothing to worry about, but its annoying to see.
IF someone can suggest to place my custom parts of code elsewhere so there wont be spikes ? That be great.

Post's attachments

filawinder-master.zip 22.46 kb, 1 downloads since 2019-07-21 

You don't have the permssions to download the attachments of this post.

17 (edited by coolio986 2019-07-22 13:53:15)

Re: Filawinder servo mod idea

Just spit balling here,

But there are a few reasons I can think of that could cause this spike every 2-3 seconds.

1. External factors, something externally is causing the spike (not the arduino). Maybe disconnect the A4 pin and monitor for any spikes.

2. A race condition in the setMotorSpeed function. The else statement is true multiple times during the function execution and the else causing a toggle in output state.

3. If the switch that controls manual / auto has a noise issue (very unlikely) it could call

if (digitalRead(toggle) == 0) {
  
pull_control();       //Go to the spool_control function for auto control
}

to run when the previous digital state was toggled to 1 (manual).

If you notice, digitalread(toggle) is called multiple times during the main program loop, and while this isn't a problem, it could leave an unknown execution state as the program continues execution. Meaning that digitalread(toggle) is queried each time its input state needs to be known.

Other ways of programming are reading the input once per loop and running the entire execution, then checking again next loop etc. But sometimes that isn't possible.

Another way to trap the issue is to do a Serial.println in the setMotorSpeed function:

void setMotorSpeed(int thisspeed)
{
  if (thisspeed<minimumPullerSpeed && (millis() - timeToMinimumSpeed < maxTimeMinimumSpeed))
  {
    thisspeed=minimumPullerSpeed;
    digitalWrite(A4, LOW);
    Serial.println("A4 set low");
  }
  else
  {
    timeToMinimumSpeed=millis();
    digitalWrite(A4, HIGH);
    Serial.println("A4 set high");
  }
}

This will tell you via the serial port if you code execution is firing multiple times just like A4 is.

18 (edited by carl_m1968 2019-07-22 14:17:12)

Re: Filawinder servo mod idea

The below image is a circuit that should allow you to do what you want and needs no logic to control it. Once it is started it should run by it's self. This is for 12 volt relays but there is no reason any other voltage can't be used. Just substitute 12 voltage line for whatever voltage you need.

http://soliforum.com/i/?vpJraMW.jpg

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

19

Re: Filawinder servo mod idea

What @carl_m1968 said, nice write up!!

20 (edited by tonycstech 2019-07-22 19:25:27)

Re: Filawinder servo mod idea

carl_m1968 wrote:

The below image is a circuit that should allow you to do what you want and needs no logic to control it. Once it is started it should run by it's self. This is for 12 volt relays but there is no reason any other voltage can't be used. Just substitute 12 voltage line for whatever voltage you need.

Are those switches momentary or they have to be pressed/flipped ?
Can you word the process so i can understand it better ?
I am using arduino relay modules.
Thanks !

21

Re: Filawinder servo mod idea

The switches are momentary and if you use your arduino latching relays it should work perfect  believe.

Just follow the diagram and use two of the Arduino relays. The blue connector is marked as it needs to be in your image. Just picture the entire module as a relay and  then use my drawing. The ground and 5 volts will hook up to the modules input as you have it now. The only difference in my drawing and you can omit it are the diodes across each relay. Your module has those diodes already.

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

22 (edited by tonycstech 2019-07-23 00:20:24)

Re: Filawinder servo mod idea

Easier said then done. I am a mechanic, not an electrical engineer like most of you. Some programming experience and basic electrical knowledge got me this far but not far enough to understand your setup with diodes.
Can you, using my picture, give each pin # a description ?
Thank you.
I'd rather use your system them mine. Mine is too complicated as i overthink allot of things in life including this.
This IS a 12V relay by the way.
http://soliforum.com/i/?kXUn6j4.jpg

23

Re: Filawinder servo mod idea

tonycstech wrote:

Easier said then done. I am a mechanic, not an electrical engineer like most of you. Some programming experience and basic electrical knowledge got me this far but not far enough to understand your setup with diodes.
Can you, using my picture, give each pin # a description ?
Thank you.
I'd rather use your system them mine. Mine is too complicated as i overthink allot of things in life including this.
This IS a 12V relay by the way.
http://soliforum.com/i/?kXUn6j4.jpg


Do you have two of the single relay modules? The issue is that this double module requires and active low to trigger it while your circuit is designed around an active high. Meaning the dual is switched by ground while the single is switched by power. It would be easier to use the single modules if you have two.

The dual module is designed to be operated by pins of and Arduino. Those pins need to switch to ground instead of power.

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

24 (edited by tonycstech 2019-07-23 07:18:52)

Re: Filawinder servo mod idea

Each channel is switched individually by connecting either 8 or 9 to 7 Gnd.
Is that what you need to know ?

I tried following your diagram.
Pretty sure i did it all right but its not working.
As soon as ground touches the coil, i get short circuit if diodes present.
Without diodes i basically get relay to trigger. I dont understand how grounding the coil through momentary switch would be any different.

Also its kinda hard to follow your diagram with the relay i have. I think i got the pins correct. Correct me if am wrong.
http://soliforum.com/i/?HQSetXW.jpghttp://soliforum.com/i/?nVAd9Li.jpg

25

Re: Filawinder servo mod idea

The diodes need to stay on the dual module. They protect the module from the surge caused by the coil being de-energized. If you removed them, put them back on exactly like they are in the picture of the module. Once you do that use the below diagram using the dual module and report back. SW1 and SW2 are the limit switches at each end of the unit travel.

http://soliforum.com/i/?aQfzr8B.jpg

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.