pause puts me in sleep mode


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default pause problem on 16f73

    thanks for your response mister_e. i know that the hardware is sufficient for my purposes, but oddly enough the buttons are actually between 5+ and pic,weird.

    also, i bought bunch of 9 volts, and still same problem. this only happens when i use the pause command. if the solenoid is programmed to ONLY BE ON WHEN THE BUTTON(on a different port) IS HELD TRUE, it works fine. but if i tell the solenoid to stay high for 1 seconds (PAUSE 1000) the vdd drops to 3.5. dang!

    is it possible that some of the power to "help" drive the solenoid and/or PIC, comes from a data port? conversly, will defining (TRISX) to many pins as outputs (not necessarily HIGH), will draw excesive current?

  2. #2
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default PAUSE problem discovery!

    ok guys i made a breakthrough of "KFC snacker size" proportions.

    OK so im hungry and not funny. but i am gaining on my pause problem.
    today i found out that if i short out portc.2 it will "turn off" my solenoid "driver" the only way for the driver to turn fully off is to short it. portc.2 =0 doesnt go low enough.

    secondly, i found out how the driver works. my solenoid red wire is connected to a 5+, and the black wire of the solenoid is connected to 2 transitors in parallel. one of the transiters set the sink bias to make the solenoid "driver" at a 4.4 volts on the ground side, even when portc.2 is low. and when portc.2 goes high, it sinks the solenoid over 5+. thereby fireing the solenoid.

    This has led me to beliver that when i ground out the portc.2 pin, which in turn turns off the driving transistor, which turns off the solenoid.

    that can only mean that when i put portc.2 = 0 it is not going low enough. how do i make portc.2 less than 0 it really wierd cause as soon as i short portc.2 with my vdd goes back up to 5+.

    ive tried swapping solenoids and batteries.
    Last edited by EDWARD; - 6th May 2005 at 08:19.

  3. #3
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default board pics

    my pictures are at:
    http://pg.photos.yahoo.com/ph/edward...bum?.dir=/6008

    yo, i took some pics of my board and put them in a yahoo photo album thing. feel free to check em out. basically it shows the pic, the solenoid/batery harness side and a full view. one of the pictures has a mspaint drawing on it. oh yeah the picture i upside, sry forgot to rotate before i started editing.

    BTW i think i figured out my lcd probem that was posted in pbc. ill just have to make my own subs and with all the data you great people have given me it should be a snap (oh here i got being all optimistic again)
    thanks to whomever sent me to

    (lcd HD44780 commands)
    http://www.geocities.com/SiliconVall...d/commands.htm

    and
    lcd.bas example (it will open browser as txt file if u click it)

    http://www.melabs.com/resources/samples/pbc/lcd.bas

  4. #4
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    EDWARD,

    could you draw a schematic of the "solenoid-driver" part?
    It is still not clear to me what this looks like.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  5. #5
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default schematic for solenoid/driver

    ok i tried to make a shcematc for ya. disregard the black box around the circuit if any.

    Im not sure if the (B) PNP transistor is in fact a PNP, it could be some weird 3 pin device.

    also its werid how there is a 5+ going into the solenoids RED supply and 4.2+ going into the solenoid on the BLACK supply. when i drive the npn base high (portc.2) the solenoid gets "stuck on" the 4.4 that was present on the BLACK is now 0vdc. and the RED is at 3.5 vdc, meaning the vdd is at 3.5.

    even if i drive the portc.2 LOW the transistor stays on cause the board has "crashed". now i cant read the voltage at the transistor base because when i put the (my multimeter) black probe on the battery ground and the red probe
    on the NPN base it drives the base Low making te solenoid turn off, and putting 5+ back on the VDD, thereby reseting the pic to the top of the program. if i disconnect the solenoid, i get all the expected reading at the expected times, e.g. portc.2 will actully out a 5+ vdc when i tell it to and 0vdc when i tell it too.

    lastly, im telling you there is not a harware problem, power supply problem, solenoid problem. i have tested all my parts on another board, that still has the old code, and they work.
    Attached Images Attached Images  
    Last edited by EDWARD; - 7th May 2005 at 00:11.

  6. #6
    Warrier's Avatar
    Warrier Guest


    Did you find this post helpful? Yes | No

    Default

    Hi:

    Looking at your schematic a few things can be explained:

    The B transistor is connected as a forward biased diode! It drops about 0.6v and hence you see 4.4volt on the black wire of the solenoid.

    When A transistor is turned on by taking portc.2 hi, it shorts out this diode to ground and very little current will flow through the solenoid! In fact voltage across it cannot exceed more than the Vce of the B transistor.

    Since this is a functional board I have to assume that this configuration cannot be correct... The 5volt regulator usually drops about 1.5volts across it.

    When the solenoid is ON (Vdd goes down to 3.5v as you note) the regulator output is being short circuited and it may be going into a voltage foldback current limit mode.

    I have to assume that the LED works because you have a series resistor and LED takes only a few mA to turn on and the 5v regulator is able to supply that.

    You can do two things:
    1. Remove B transistor and replace it with a diode (1N4148 or 1N4001) with its cathode connected to the red wire of the solenoid (+5v)
    2. Connect a capacitor (100uF) between the output of regulator and ground - if this is not already in the circuit.

    I don't think it has anything to do with your code or the PIC. Of course you can clean it up by not using so many GoTo statements.

    As for transistor A, as Steve correctly points out it may be a digital version (base resistors are built in). You can verify this by looking at the voltage on portc.2 when it goes hi - if it is close to 5v then the transistor is a digital type. Otherwise portc.2 will only go upto 0.6volt. In latter case you must add a 1k between portc.2 and the base of this transisitor.

    hope these are helpful

    -warrier

  7. #7
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Im not sure if the (B) PNP transistor is in fact a PNP, it could be some weird 3 pin device.
    I would assume (B) is a Diode in a three pin package.
    (Cathode should be connected to the red wire of the solenoid, anode to the black wire.
    Is there any SMD code printed on it?
    also its weird how there is a 5+ going into the solenoids RED supply and 4.2+ going into the solenoid on the BLACK supply.
    with the NPNs (A) base low there is a voltage drop of about 0.8V accross the solenoid, this means there must be something else connected to the NPNs collector that is drawing current.
    when i drive the npn base high (portc.2) the solenoid gets "stuck on" the 4.4 that was present on the BLACK is now 0vdc. and the RED is at 3.5 vdc, meaning the vdd is at 3.5.
    looks like the solenoid draws more power than the Vreg can deliver, that causes the voltage drop at the Vreg's output.
    even if i drive the portc.2 LOW the transistor stays on cause the board has "crashed".
    If the transistor stays on, the base isn't low !
    now i cant read the voltage at the transistor base because when i put the (my multimeter) black probe on the battery ground and the red probe
    on the NPN base it drives the base Low making te solenoid turn off, and putting 5+ back on the VDD, thereby reseting the pic to the top of the program. if i disconnect the solenoid, i get all the expected reading at the expected times, e.g. portc.2 will actully out a 5+ vdc when i tell it to and 0vdc when i tell it too.
    Questions:
    1. what is the resistance of the solenoid?
    2. what kind of multimeter are you using and what is it's input resistance in the voltage range you have selected?


    lastly, im telling you there is not a harware problem, power supply problem, solenoid problem. i have tested all my parts on another board, that still has the old code, and they work.
    are you really sure the schematic matches the board?
    Last edited by NavMicroSystems; - 7th May 2005 at 16:17.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  8. #8
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default pause command

    yes its a led and a resistor series.

    the transistor b is a digital type cause i do get 5v when i disconnect the solenoid.

    I cant stress enough how harware is not the issue here. These boards are all surface mount, and i cant go cutting 1000+ traces guys. I didnt design 'em, or have anything to do with the manufaturing process. This device can be coded proprerly to work, i know this. i dont mind if the code idnt prtty, or has long boot sequncces(i have an lcd issue as well). im putting up some more pics in that yahoo album. ill double check that schematic for errors.

    great info guys thanxs.

Similar Threads

  1. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  2. Replies: 11
    Last Post: - 12th July 2008, 02:36
  3. Pic to LanC
    By grounded in forum Off Topic
    Replies: 9
    Last Post: - 24th June 2008, 00:12
  4. Fade out LEDs question
    By Sam in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd June 2008, 10:50
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 03:46

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