PDA

View Full Version : how to control 555 resisters with PIC



KB3BYT
- 6th December 2006, 06:28
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?

websmith
- 6th December 2006, 06:46
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

KB3BYT
- 6th December 2006, 07:38
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.

Darrel Taylor
- 6th December 2006, 08:11
"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>

sayzer
- 6th December 2006, 08:55
"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!


-----------------------------------------

Acetronics2
- 6th December 2006, 10:29
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 / ._ ._.. ._ .. _.

KB3BYT
- 6th December 2006, 14:48
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.

Acetronics2
- 6th December 2006, 15:17
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 / ._ ._.. ._ .. _.

KB3BYT
- 6th December 2006, 15:30
I can do that.
Thankyou.

skimask
- 7th December 2006, 03:23
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

KB3BYT
- 7th December 2006, 03:39
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.

skimask
- 7th December 2006, 03:50
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

KB3BYT
- 7th December 2006, 04:20
thanks for the info

skimask
- 7th December 2006, 04:27
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

Acetronics2
- 7th December 2006, 08:25
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

Luciano
- 7th December 2006, 11:01
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

skimask
- 7th December 2006, 14:27
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