Speed regulator for sewing machine


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Speed regulator for sewing machine

    Hi Jan,
    I don't understand.....
    The AD654 is a Voltage-to-Frequency converter, it takes an analog voltage in and outputs a frequency which is what you're feeding your servodrive, correct?

    Using the HPWM command and a simple RC lowpass filter will give you an analog voltage from 0-Vcc for a duty cycle of 0-100% and as far as I can see the AD654 should be able to "get down" to 0kHz with 0V input signal. Are you saying that the output frequency of the AD654 is not reaching 0Hz when the input voltage is 0V?

    Are you aiming to get rid of the AD654 feed the servo-drive directly with the PIC?

    Can you upload a schematic? What servo drive are you using?

    /Henrik.

  2. #2
    Join Date
    Dec 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Speed regulator for sewing machine

    Name:  speed.png
Views: 1132
Size:  33.0 KB
    Hi Henrik
    I guess I am rambling a bit. The circuit that uses the ADC (AD654) works quiet well. What I am trying to do is use the PWM output to give me a frequency output of 0 to 15 kHz. I can get to 15 k with no problem but I cannot get below 1.3K due to the limitations of the PWM circuit.

    The idea was to use the PWM and vary the frequency (HPWM 1, 127,W5). This seems to work as I can set the variable W5 to give me 2000 at 0 input and ramp up from there. But I am stuck with the base frequency of 2K

    What I am trying to come up with is circuit that will mask the first 2 kHz. I seem to remember doing something similar many many years ago using discreet logic. My guess now is to use the timers and interrupts to capture the pulses to isolate the first 2k.
    Thanks for reading this any ideas would be helpfull.
    Servo drives are Gecko G320X.
    Jan

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Speed regulator for sewing machine

    Hi Jan,
    OK, that makes sense. Yes, the PWM circuitry in the PIC can only go so low. Using a lower oscillator frequency will also change the lower limit of the PWM frequency, at 4MHz you'd be able to get down to 245Hz - even lower if you also change PIC to a 16F1xxx device - but it will never go to zero.

    I don't know of any "frequency subtractor circuit" and if one exists you might as well use the V/F converter chip and I don't think generating a frequency with the CCP module, feed it back into the PIC and trip an interrupt on it is the way to go. You can equally well use the timer to internally generate an interrupt. However, generating interrupts at tens of kHz might be stretching it. Another issue is that you require 50% dutycycle, this means that for 10kHz output frequency you're going to have to generate interrupts at 20kHz. However, the G320X accepts "Active" pulses of as Little as 1us so I don't see the reason for the 50% dutycycle?

    Finally, while the PIC is servicing the interrupt it won't count any pulses. The COUNT command sits in a software loop monitoring the the input and counts the transistions it sees. When the PIC is servicing the interrupt it can't count pulses. You'd be better off counting them with hardware counters but then you need yet another timer as the timebase interrupt....

    In either case it's going to be tricky to get the dynamic range you need. You're going to have to use different methods depending on "where" on the speed curve you're at.

    Is 15kHz the desired max frequency?
    Does it have to go to all the way to 0Hz? Can you live with 10, 20, 50Hz?
    The schematic shows the 16F84A, is that the one you're using? Can you move to another one?

    Sorry, no solutions, only questions....

    /Henrik.

  4. #4
    Join Date
    Dec 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Speed regulator for sewing machine

    Hi Henrik
    Thanks for looking at this.

    I am using a 16F88, I forgot to change the name.

    Yes I really need 0 speed. When the X and Y movement stops the sewing machine needs to stop.

    I am not sure if 15 kHz is required. I started off with a much lower frequency but I was having trouble with acceleration and deceleration time of the sewing machine motor. The faster I set the encoder the better the response time became.

    Wel my first design does work so I will stick with it.

    Thanks for your thoughts. I will let you know if I make any improvements.
    Jan

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Speed regulator for sewing machine

    Hi Jan,
    You can always get 0Hz by simply not sending any pulses at all. What I actually meant was what the lowest "start frequency" needs to be.
    Anyway, keep us posted!
    /Henrik.

Similar Threads

  1. Replies: 0
    Last Post: - 7th August 2008, 09:02
  2. State machine programming
    By tjstevens in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th April 2007, 22:45
  3. Help - ID a 3.0V regulator (SOT23-5)
    By badcock in forum Off Topic
    Replies: 0
    Last Post: - 8th June 2006, 15:00
  4. voltage regulator help - ot
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 17th May 2006, 00:37
  5. Help with a Parallel I/O to Machine Interface?
    By john meiers in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th September 2005, 18:50

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts