More wood chuck lighting questions


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    First, I must apologize. I assumed that you'd assume I wouldn't try to turn on 20 LEDs at one time with a 12F683. I'm only turning one at a time. The total current draw at any one time including LED and chip functions is around 25mA and that's well within the capacity of the voltage regulator.


    Second, the computer I use for programming isn't hooked up to the internet so I had to recreate part of the programming here. Why I can't install Microcode studio on this computer is something the IT guys will have to fix.

    Finally, schematics. We use a different program for schematics and all I had was LTSpice. The schematic shows U2 as being an LT1585-xxx. Well I couldn't find a 78L05ABZ in their symbols library so I used an LT1585 and hope you can make the necessary corrections.

    So here are my issues. I get different results during program operation and ICSP. For instance, when I first wrote this all the LEDs were ghosting during the off time of the LEDs. Now the program is running correctly without the ghosting. I don't believe I am doing anything different form then to now in either programming or circuit construction. When I try to do ICSP with the power supply I have always had to disconnnect all but the programmer from pin 7 but the program will load. Yet, while under battery power and pin 7 disconnected from the circuit I can't get the program to transfer. I get an error something like error in instruction set 0028. If it matters all of this is on a proto board.

    What can I do to first, make sure the program will run correctly without the ghosting? Second, why does ICSP act differently from the power supply to the battery?

    As you can tell, I'm new to this. Some patience will be required no matter what my user name infers.
    Attached Images Attached Images

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Well, I figured out part of the problem. To eliminate the ghosting issue I added GPIO=%000000 in the main part of the program after the TRISIO= noghost. That seemed to eliminate the odd LED lighting up willy nilly.

    What I don't understand is why I can't do ICSP under battery power. Initially the voltage was a couple of hundred millivolts higher than the power supply but after running this for a week or so the voltage is now around 4.6VDC. Program will run but I have to hook it up to the power supply to program it.

    As usual your thoughts are appreciated.

  3. #3
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    I always like answers and Darrel, from MELABS, provided one so I thought I'd play nice in the schoolyard and share. I've been trying to get 20 LEDs to light sequentially using a 12F683 for several months. I could never get one LED to light without another ghosting. I'd thought my code was the issue but it turned out to be the circuit itself. The circuit attached to this reply works. You can look further up the thread to see what doesn't. The code previously attached does work, even in the new circuit, but Darrel again came to the rescue with a significantly simpler and more elegant way to do it. That code is also attached.I apologize for the run on. My computer form some reason doesn't like carriage returns today.
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    Quote Originally Posted by AvionicsMaster1 View Post
    ...
    I hooked up the circuit to 4 x 1.5AA batteries through a TO-92 5V regulator
    ...
    At best this configuration can provide 6 volts to the voltage regulator.


    Quote Originally Posted by AvionicsMaster1 View Post
    ...
    I couldn't find a 78L05ABZ in their symbols library
    ...
    http://pdf1.alldatasheet.com/datashe...8L05ABZAP.html

    This voltage regulator has a voltage drop-off of 1.7 volts:

    6Vin - 1.7Vdo = 4.3Vout

    At full charge, the best you can get is 4.3 volts; things can only degrade as the batteries weaken.

    Try adding an extra battery (5 x 1.5).

    7.5Vin - 1.7Vdo = 5.8Vout

    7.5 input volts is not going to put the voltage regulator in danger.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    Well, thanks. For the voltage regulator I was indicating I couldn't find the symbol for a 7805 in LTspice library.

    I'm not real sure your math is correct though. As long as I feed >5V into a 7805 regulator, unless it's overloaded, I should get very close to 5V out. With 4 batteries I'm inputting around 6V so until the batteries discharge somewhat then I should have 5V.

    I think the 12F683 will work down to 3.3V so all I'm really buying with the regulator is the time it takes to discharge from 6V to 5V. Which may or may not be significant but for me it is.

    If I'm missing something, please let me know.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    I think the 12F683 will work down to 3.3V
    Maybe, but what about the LEDs?

    You want to read up on drop-out voltage.

    Here is an excellent tutorial:
    http://www.afrotechmods.com/videos/v...r_tutorial.htm

    If the link doesn't work, it's on u-toob:


    EDIT: Oh yeah, forgot to say, it's a must-watch video even for those that know this stuff. He's hilarious!
    Last edited by Demon; - 18th May 2011 at 05:12.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    I saw his Ultracapacitor videos... He is absolutely nuts!

    No question about it.

    Ioannis

  8. #8
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    In an effort to finally complete a project, here is the final schematic and diagram for a shadow box I made for one of my co-workers. There may be a few final tweaks once he sees what's available but with cut and past I can make it work.

    The schematic is from Darrel Taylor and the same as previously but I've added it again for clarification. Although his LED numbers may not match my LED numbers exactly you get the point on how it's wired. Others on this forum may recognize parts of my program as e-mails texts or chats and for those I'm extremely greatful.

    With the help of the NAP 4 line the PIC draws <5nA most of the time and draws only about 250nA when it does wake up for a few mSec. This should extend battery life considerably so I've taken out the relay, voltage regulator and their associated headaches.

    I post this mainly for review to see where I could have saved a keystroke here or repetitition there. If you've got some constructive comments please add them. Thanks.
    Attached Images Attached Images
    Attached Files Attached Files

  9. #9
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    Is it just me?? or is your .doc file corrupted??

    I can open the .pdf but not the .doc file.
    I could open the .doc file from your earlier post but not your last post.

    Thanks
    dwight
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  10. #10
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: More wood chuck lighting questions

    Any chance to see a picture of the final project?

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