Go Down

### Topic: 555 IC as servo driver (Read 2067 times)previous topic - next topic

#### surepic

#30
##### Oct 14, 2018, 05:47 amLast Edit: Oct 14, 2018, 05:52 am by surepic

I built exact same circuit without any modifications of capacitors or resistors, luckily even have 47K pot.

But I`m not getting duty cycle below 2ms.

50hz its holding perfectly tested with freqmeasure library.

duty cycle I`m taking via pulseIn() on HIGH

this is image for schematic from same website.

and attached is printscreen how its holding 50hz.

why I cant get short duty cycles ? resistors that I used are 20% tolerant but each measured with multimeter before putting on the board to be sure they all have right values.

calculations for duty cycle from that website.

Code: [Select]

The formula used is as follow:

t= 1.1RaC

Ra is the total of R4 and R3. So, the minimum pulse time when R4 is set to 0, is:

t= 1.1 x 8200 x 0.0000001

t= 0.902 ms

Note that this minimum pulse width time is longer than the trigger pulse to ensure that the pulse width generator doesn't constantly generate0.65ms pulses one after the other, but at a steady +- 50Hz interval.

WhenR4 is set to maximum, the time is

t= 1.1 x 18200x 0.0000001

t= 2.002 ms

#### wvmarle

#31
##### Oct 14, 2018, 06:00 am
So what duty cycles do you get for different settings of that pot? And different values of the timing cap and resistor?

Are you using ceramic or film type caps for the timing?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### surepic

#32
##### Oct 14, 2018, 06:09 amLast Edit: Oct 14, 2018, 06:10 am by surepic
Im using 2x555ics not 556. All caps are ceramic 103,104 and 224k

Problem is with second 555ic circuitry cos first one is generating 50hz picture attached.

10k pot one side 1900-2000us returned from pulsein(), fully turned to opposite side veryhigh values didnt even noted them.

Didnt change values for capacitor and resistor because of calculations by that guy are right it "must" produce 1ms duty cycle when fully off.

#### wvmarle

#33
##### Oct 14, 2018, 11:59 am
To get a stable output frequency, use film capacitors (not polarised). Ceramic capacitors are not good for timing, very unstable, the numbers in your screen shot (which you should simply have posted as text) show it's drifting. Polyester film type is normally good enough.

It it doesn't react.to the pot I suspect your wiring is wrong there. Take it out, measure the resistance with your multimeter, see if it behaves the way you expect.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### surepic

#34
##### Oct 14, 2018, 03:29 pm
Initially installed polyester capacitor forgot to mention both 220nf caps are popyester 630v.

Frequency in screenshot is stable i i took a shot right when i adjusted to 50.8hz after that screen was scrolling with 50.8hz .

It does react to the pot but minimum value is not less than 1.9-2ms . If pot turned the opposite side i am getting very high duty cycles.

Will replace pot with fixed resistor see what will happen.

I suspect breadboard connection and resistance of wires. I had issue with wires on esp8266 circuit and solved only soldering them.

#### wvmarle

#35
##### Oct 14, 2018, 03:37 pm
Breadboards can cause problems indeed with connections. In your case I'd suspect the pot itself, though.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### Grumpy_Mike

#36
##### Oct 14, 2018, 03:38 pm
Just change R3 to a lower value, say 1K.

#### wvmarle

#37
##### Oct 14, 2018, 03:52 pm
That would do the job - but doesn't explain the very high duty cycles. That shows an unexpectedly high resistance in the pot, and why I suspect something is wrong with that pot.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### surepic

#38
##### Oct 14, 2018, 04:17 pmLast Edit: Oct 14, 2018, 04:18 pm by surepic
Wvmarle you are right its pot/board connection. I have to press it down to get low values when released its giving very high resistance. Pot is working when outside the board.
Second as i mebtioned i installed 2x220nf on each 555. But schematic asks for second 555 only 100nf. Cant explain how i come up with 220 on board instead of 100 :-).

Will change the pot to resistor anyway i need 3 positions 1ms 1.5 and 2ms.

#### wvmarle

#39
##### Oct 14, 2018, 05:27 pm
2x220 nF in series is equivalent to 110 nF... sometimes have to go with what you happen to have on hand :-)
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

#### surepic

#40
##### Oct 14, 2018, 08:17 pmLast Edit: Oct 14, 2018, 08:21 pm by surepic
values for R4 if someone will be interested in building this circuit:

measured right from pot and rechecked with resistors after that.

1ms 4K9
1.5ms 10K1
2.0ms 13k

tolerances of my resistors are 20% so I assume you can round values if using silver or gold stripe(band) resistors.

value for R2 16K2.
Thanks everybody for participating in this discussion.

#### Grumpy_Mike

#41
##### Oct 14, 2018, 10:37 pm
Quote
tolerances of my resistors are 20% so I assume you can round values if using silver or gold stripe(band) resistors.
I have not seen silver and gold bands on resistors for about 40 years. The widest tolerance you can get these days is 5% ( old gold band ) with 1% resistors being a fraction of a cent more expensive.

Anyway because there is a pot in the circuit it doesn't matter. Only with R1 might it matter a bit, but not much.

#### ReverseEMF

#42
##### Oct 15, 2018, 03:12 am
Well, if this idea wont work then i will put arduino nano or micro and will forget about 555 forever :-))

Mike why you were driving servo via fet instead of mosfet? Isnt it more efficient in this shcematic to use mosfet? Something like 2n7000?
I'll take a stab: first I'll assume you mean bi-polar when you wrote fet.  If so, then:
Based on the 4k7 pull-up, that servo doesn't require much current to drive it, thus bipolar vs MOSFET is trivial, since power loss is trivial.
BTW: a 2N7000 is not a good choice for 5V switching.  More like 2N7002, or even VN2222LLG
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

#### surepic

#43
##### Oct 16, 2018, 02:52 pmLast Edit: Oct 16, 2018, 02:59 pm by surepic
Now i need to switch whole circuit from 3.3v 20ma gpio. Current consumption for the circuit with motor is approximately 550ma-560ma 5v.

Any suggestions what transistor/mosfet to use?

#### ReverseEMF

#44
##### Oct 16, 2018, 04:45 pm
Now i need to switch whole circuit from 3.3v 20ma gpio. Current consumption for the circuit with motor is approximately 550ma-560ma 5v.

Any suggestions what transistor/mosfet to use?
When you say 550mA-560mA, are you talking average current, peak current, or
And, when you say "motor", are you still talking about a Servo, or is it an actual morot?  And if so, what kind of motor?  Typical brushes included DC motor, or something more exotic?
And will there be any PWM involved?  Or, is it just a strait ON for awhile, OFF for awhile?
And, I guess the ultimate, qualifying question is: when you say "whole circuit", do you mean that same circuit, but controlled from a 3.3V port, rather than a 5.0V port.  And, will the rest of the "whole circuit" be powered at 5V?  In which case, is this a question of voltage translation?

Why am I confused?  Because there are two opposing hints
• "whole circuit" might imply, "original circuit"
• yet, "what transistor/mosfet to use" implies a disregard for the "circuitry" that comes before the transistor/mosfet.

In other words, are we disregarding that apparent settled upon circuitry, or is this a question about how to drive the settled upon circuitry?  Or, is this a whole new question?
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Go Up