Adding Ports status to a variable


Closed Thread
Results 1 to 13 of 13

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Adding Ports status to a variable

    Hi,
    I can't see why the circuit wouldn't work below 4V. If the LED is a white one then I understand but if it's a normal red or green with ~2V forward drop then you should be fine on 3.3V. Besides, the LED is to be replaced by the transistor, right?

    Yes, the pulses are still at the full voltage and you are correct that it's something you should take into consideration however I don't think it would be a problem in this case. It's quite normal to run hava a higher power supply voltage in order to compensate for the I*R-drop in the windings etc, I don't think 25% "overvoltage" would be a problem. Do you have a datasheet on the motor?

    /Henrik.

  2. #2
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default Re: Adding Ports status to a variable

    I actually have a blue LED 3.5V forward, I just tried with a red LED 1.9V forward. The whe I hit 3.9V the PWM doesn't work, the LEDs remain at full intensity (Dimmed by the lower voltage but no difference from changing the POT).
    Here is the datasheet for the motor (model 2295)

    Mike

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


    Did you find this post helpful? Yes | No

    Default Re: Adding Ports status to a variable

    Hi,
    Personally I wouldn't worry about running the motor off a 6V supply.
    As for the circuit not operating properly below ~4V the only think I can think of is the POT command not doing the business. The manual says that the Pot/resistor should be 5-50k, you have 100k. It says to adjust Scale contstant to a lower value for large RC constants, you have the scale set to its maximum. Perhaps that's got anything to do with it.

    /Henrik.

  4. #4
    Join Date
    May 2009
    Location
    Montreal, QC, Canada
    Posts
    118


    Did you find this post helpful? Yes | No

    Default Re: Adding Ports status to a variable

    Since my first post, I have reduced the POT to 50K and I've used the code example given in the PBP book to adjust the scale and my value is now set to 30 so this is a mystery but I am not so concerned.
    I will use 2 diodes to supply the PIC and run the motor off the 6V, anyway the goal is to reduce the motor speed so it will be set to probably half duty-cycle. I didn't receive the motor yet but fingers crossed.

    Thank you Henrik for your help.

    Mike

Similar Threads

  1. activating i/o ports according to variable value
    By Picman in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 29th July 2010, 14:55
  2. accessing ports pins using an index variable
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th March 2008, 21:36
  3. adding new word variable ?
    By iugmoh in forum General
    Replies: 4
    Last Post: - 21st February 2008, 01:26
  4. STATUS re-curtain W
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 16:21

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