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

    Default More wood chuck lighting questions

    I've been working with a 12f683 trying to get 20 diodes working off one chip. So far the success has been rather good. Until today when I hooked up the circuit to 4 x 1.5AA batteries through a TO-92 5V regulator. I had been using an old computer power supply for the 5V and disconnected that to hook in the 5V from the regulator/battery setup to the same spot. Now, almost all the LEDs ghost blink while the program is cycling to the next LED. I assumed you couldn't get any cleaner power than from a battery but what vexes me is why they ghost light with the battery and not the power supply?

    Your thoughts would be appreciated.

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    well without any real details, my first guess is you are overworking your regulator. I am guessing that reg is only good for ~40mA with no heatsink. with heatsink, ~100mA. thats 5 to 10 led's at once with no reguard for other circuit requirments. Another guess is 6V (best case) is not enough for the reg to provide good 5V. so maybe browning out?

    Bottom line is more details will be needed I think for any real help to be had.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, AvionicsTaster

    YOUR SCHEME !!!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    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

  5. #5
    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.

  6. #6
    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

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    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!

  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

    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.

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