how to control 555 resisters with PIC


Closed Thread
Results 1 to 17 of 17
  1. #1
    KB3BYT's Avatar
    KB3BYT Guest

    Default how to control 555 resisters with PIC

    When playing with a 555 timer there are two resisters and a capacitor connected to the 555 on pins 6,7,8 and ground.

    Changing the values of these resistors and one cap will control the 555
    oscillator output.

    Is there any right way to attach a 555 to a PIC that will tell
    the 555 that the resistors or cap values are changing?

  2. #2
    Join Date
    Oct 2006
    Location
    Cape Town SA
    Posts
    23


    Did you find this post helpful? Yes | No

    Default

    The timing of the 555 is a function of the current drawn from these pins. Putting a transistor or FET in ths path and controlling its base/gate with PWM via a LP filter (series resistor and cap to ground) will do the job

  3. #3
    KB3BYT's Avatar
    KB3BYT Guest


    Did you find this post helpful? Yes | No

    Default any component suggestions?

    to Websmith...Can you suggest some values to try....
    like the resistor that is between pins 7 and 8 ... can I replace the resistor with a 2N2222 NPN transistor and connect pin 8 to the collector and pin 7 to the emitter and the PIC to the base?
    Do I need to put a resister between the PIC and the base? What value?
    Do I need to tie a cap to ground where that resister meets the pic? what value?

    Same questions about the resistor between pin 6 and 7.

    555 chips use a capacitor on pin 6 and 2 tied to ground to control frequency
    oscillation.

    There is a variable capacitor called a varicap and some diodes can have capacitance so is there a way to replace that pin 6,2 cap with a diode or
    varicap that is tied to the PIC also?

    I am a retired computer programmer and I do not know electronics as well
    as the electrical engineers so am limited by the example wiring diagrams
    provided by the PBP manual.
    As a ham radio operator I learned a bit about electronics and I dream up cool projects but I let more smoke out of components than I'd like to admit.
    It seems to me that if I can figure out how to mimic variable resistors and capacitors using the PIC commands then it would open up doors to lots of
    toys for me to play with.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    "Anything you can do, I can do better". Said the PIC to the NE555.

    I can see no reason to even attempt what you're proposing. The PIC can perform any function the 555 can do, without any external components. And do a bunch of other stuff at the same time.

    It would be like using a 300hp car engine just to regulate how fast your electric can opener turns. Not that someone wouldn't try that either.
    <br>
    DT

  5. #5
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor
    "Anything you can do, I can do better". Said the PIC to the NE555.

    I can see no reason to even attempt what you're proposing. The PIC can perform any function the 555 can do, without any external components. And do a bunch of other stuff at the same time.

    It would be like using a 300hp car engine just to regulate how fast your electric can opener turns. Not that someone wouldn't try that either.
    <br>


    I have seen people using 12C508 direct drop in 555 place upside down (different supply pins ).

    Compared to 555, 12C508 provides a better accuracy over a range of frequency they say. Thus, it comes to the cost at the end.

    555 is about the same price of a single general purpose transistor!


    -----------------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

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


    Did you find this post helpful? Yes | No

    Wink PIN 5 !!!! or controlled current ...

    Just play with voltage @ pin 5 ... see 555 Datasheet for that.

    Other ( read complicated for the use ...) thing to do is use the " constant current config" and drive this current with the PIC.

    Broadest freq range to be expected ...

    Hi, Darrel

    You're not right ... or right just for "classical" designs ...

    Alain / ._ ._.. ._ .. _.
    Last edited by Acetronics2; - 6th December 2006 at 15:20.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  7. #7
    KB3BYT's Avatar
    KB3BYT Guest


    Did you find this post helpful? Yes | No

    Default

    I thought I made my reasons for wanting to learn how to
    control the 555 resistor and capacitor rack.
    This isn't a question of how to make a PIC do something better than a 555.
    Its a specific question of how to control the resistors and capacitors aligned with the 555 to make the 555
    do something variable.
    And again....
    I'm not an electronics engineer.
    I am a retired computer programmer.
    So I don't always understand some of the things the electronics engineers take for granted when
    designing circuits so please tell me how to wire
    with more detail. All my wiring I get from the PBP manual and you know how sparce that is.

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


    Did you find this post helpful? Yes | No

    Wink The Reasonnable solution

    Soooo,

    In your case ... I only see digital pots ( AD 7376 i.e. ) wired in parallell to existing resistors ... or instead them.

    For capacitors ... small relays parallelling other values to those existing is the only easy way I see.

    Of course, The PIC will drive both ... and you might get no scale-holes !!!

    Sorry for the scheme ... but I consider you've to understand what you do !!!
    That's it ...

    Alain / ._ ._.. ._ .. _.
    Last edited by Acetronics2; - 6th December 2006 at 15:22.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  9. #9
    KB3BYT's Avatar
    KB3BYT Guest


    Did you find this post helpful? Yes | No

    Default good answer Alain

    I can do that.
    Thankyou.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    I had the same type of thing awhile back, thought I needed to use a 555 and a pot to generate a variable freq output. I used a 12F675 and 2 buttons to make a nice square wave, one button increased freq, the other decrease freq. 8 pins, 1 pin power, 1 pin ground, internal oscillator, 2 pins for buttons, 4 pins left over, 2 pins at main freq (inverted from each other), the other 2 pins running at 1/2 and 1/4 of the main freq. Was able to adjust it from 0hz up to around 200khz. Worked like a champ, took the same amount of board space, and I suspect took less time to program that PIC than it would've to calculate the correct values for a 555 to get a 50% duty cycle square wave.

    My 2 cents....
    JDG

  11. #11
    KB3BYT's Avatar
    KB3BYT Guest


    Did you find this post helpful? Yes | No

    Lightbulb how to control a resistance or capacitance

    OK OK OK
    a pic can do anything a 555 can.
    Again...
    I ask how the right way to do this task of using a PIC to
    control the resistance and capacitance of external circuits... for a real good reason.
    There are lots of example circuits that show how to build discrete component projects. There must be a 1000 of them out there.
    BUT
    when I want to do a PIC controlling project to interface those circuits... I don't really find ANY examples.
    So...
    I ask here if anybody knows a good way to make the
    replacement circuitry to interface a PIC where a resistor or capacitor is found in a circuit....
    because its the resistors and caps that are always attached to dials with pots and variable caps.
    Forgetting the 555....its all those other circuits I want to learn to interface.
    I just used the 555 as the example because there are sssssssssssoooooo many web sites devoted to showing the 555 pins layout...where plus and minus and ground lays compared to the pins....so anyone could find good references.

  12. #12
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Ok,Ok,Ok,...I smell what you're cooking...

    Well, for controlling programmable resistors, maybe check out the XICOR type programmable resistors (X9241 for example). XICOR makes them in various values (for instance one version might start at 0K and go to 1K, another might start at 0K and go to 100K). You can control them in PBP using I2C commands (just like accessing an external serial eeprom chip as shown in the PBP manual and wired up in almost the same manner), or, for that matter, a couple of the XICOR types only need 'up' and 'down' pulses to change their resistances. I can't remember thier numbers off the top of my head.

    Relatively simple-ish chips to use. I used them for voltage dividers in front of small amplifiers before. Worked good for me. And the resistance value seen by the external circuit would be completely independant of the PIC circuit controlling it (except of course for power/ground type lines).

    As far as change capacitors values, like they've said earlier here, small DIP
    relays switching different capacitors in/out of the circuit is about the only way to go. I wouldn't try to use a 4066 (correct number???) which is a multi pole digital switch, but it has built-in resistance due the MOSFETs in it, which will screw with the values quite a bit (I know, I've tried it).

    JDG

  13. #13
    KB3BYT's Avatar
    KB3BYT Guest


    Did you find this post helpful? Yes | No

    Default

    thanks for the info

  14. #14
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by KB3BYT
    thanks for the info

    If you really wanted to get crazy, you could easily drive an R/C aircraft servo to turn a rotary switch connected to a bank of capacitors (ya know, ka-chunk, ka-chunk, ka-chunk) and another servo to drive a linear pot. Drive servo's is easy with a PIC also. At least you'd have something mechanically silly to watch, something a tad bit over engineered.
    JDG

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


    Did you find this post helpful? Yes | No

    Talking The parrot ...

    Quote Originally Posted by skimask
    If you really wanted to get crazy, you could easily drive an R/C aircraft servo to turn a rotary switch connected to a bank of capacitors (ya know, ka-chunk, ka-chunk, ka-chunk) and another servo to drive a linear pot. Drive servo's is easy with a PIC also. At least you'd have something mechanically silly to watch, something a tad bit over engineered.
    JDG
    Hi Skimask

    before ... just learn how to fly models with old non proportionnal radios ...

    THEN you can talk about all that ...

    Ah ... look at the little ( humour ) difference between AD7376 and the XICOR X9xxx ...
    One can be used ... and the other NOT here.

    Alain

    Hi, KB3

    As the capacitor have one terminal to be grounded, you can use Mosfets like 2N7000 or BS 170 instead of the relays.
    But it will introduce a small parasitic capacitor ... if it doesn't matter, that would be simpler to build.

    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 " !!!
    *****************************************

  16. #16
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Same problem when the TV remote controls were introduced.
    To replace the potentiometers, ICs + fixed value resistors
    were used.

    From the 4000 Series CMOS:

    Quad Bilateral Switches
    4016, 4066.

    CMOS Analog Multiplexers/Demultiplexers
    4051, 4052, 4053.

    * * *

    About the 4016:
    http://www.doctronics.co.uk/4016.htm

    * * *

    Modern Digital Potentiometers:
    http://www.maxim-ic.com/DigitalPotentiometers.cfm

    Best regards,

    Luciano

  17. #17
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics
    Hi Skimask
    before ... just learn how to fly models with old non proportionnal radios ...
    THEN you can talk about all that ...
    Ah ... look at the little ( humour ) difference between AD7376 and the XICOR X9xxx ...
    One can be used ... and the other NOT here.

    Alain

    Hi, KB3
    As the capacitor have one terminal to be grounded, you can use Mosfets like 2N7000 or BS 170 instead of the relays.
    But it will introduce a small parasitic capacitor ... if it doesn't matter, that would be simpler to build.

    Alain


    Who says I haven't used non-proportional radios, with them ol' 45v batteries in the TX's...big ol' switches, big ol' boxes...etc.
    Besides that, I've got a pilot license now. I've still got to train my arms to be a little more proportional on those crosswind landings

    AD7376 - X9xxx - One can be used, the other can't.... Looks to me like both could be used.
    What am I missing?


    As far as using the 2N7000 to switch the cap's in and out...
    Q: Even if you drive the '7000 fairly hard, it'll still have a couple of ohms across the drain-source. Won't that mess with whatever cap it's connecting into the circuit like the 4066? I know the 4066 is a lot worse and it affected my circuit.

    JDG

Similar Threads

  1. The best way to control a servo with a PIC
    By The Master in forum Off Topic
    Replies: 41
    Last Post: - 19th October 2008, 02:44
  2. PIC relays control
    By flipper_md in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 1st October 2008, 16:03
  3. Motor Control PLC with a PIC
    By sougata in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd November 2006, 07:59
  4. Pic Control With Software
    By Agent36 in forum General
    Replies: 5
    Last Post: - 18th October 2006, 18:18
  5. Need help on pic to pic flow control (simple problem I think)
    By khufumen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 00:34

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