Академический Документы
Профессиональный Документы
Культура Документы
Living
Outside
Play
Technology
Workshop
Table of Contents
Attiny25/45/85 PWM generator and Servo tester! Updated Code! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 7: Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 8: Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 9: Ideas! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Image Notes
1. That is the servotester
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Image Notes
1. Unisolated wire
2. Solder
3. 10 kOHM potentiometer
4. Terminals with screw
5. attiny45
6. PCB
7. NPN transistor
8. a single resistor :(
9. Jumpers
10. IC holder
11. Terminals
Image Notes
1. Attiny45
2. BC516
3. BC558
4. Potentiometer
5. Output in the next step
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Image Notes
1. Sometimes solder points are broken
Image Notes
1. 5V on theese pins
2. 0V on those 3
3. PWm on this 3 pins
4. this is connected
5. this too
Image Notes
1. pwm signla goes here
2. 5V go here
3. to here
4. 5V here
5. PWM here
6. 0V here
7. to here
8. PWM
9. 0V
10. 5V
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Image Notes
1. Sometimes solder points are broken
Image Notes
1. That is the servotester
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
https://github.com/Jan--Henrik/Attiny-PWM-generato...
Step 7: Testing
Finally, your own personal PWM generator using a Attiny25/45/85 is ready for testing! :)
First plug your 5V power source in, it is recommended to use one with a current monitor, because if the current go staright up to more then a few Ampere, you made a
mistake (troubleshooting in the enxt step).
Mine uses a current of 10-20mA
I used an old oscilloscope, but you can also build your own one!
Just check out my other Instructable, How to build a Oscilloscope!!
http://www.instructables.com/id/USB-Oscilloscope-with-Signal-generator/
Importand: never place jumpers in the same row!!
Video of the Output signal!!
Image Notes
1. That is the servotester
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Step 8: Troubleshooting
Current goes to high:
shortcircuit on the PCB
Built around transistors fals
Built around IC fals
...
No PWM at the output:
make sure you emasure against 0V not against 5V
check connections on the board ( maybe something not soldered)
IC not correctly plugged in
Oscilloscope right set?
PCB catches fire
... -.-
Image Notes
1. Sometimes solder points are broken
Step 9: Ideas!
Idea:
Instead of a potentiometer you can add a heat-dependent resistance and instead of a servo you can add a pc fan
to control the speed of you pc fan, to cool your pc with more effectiveness.
Its jsut an idea, to add sensors instead of a potentiometer...
Image Notes
1. My selfmade heat sensor, with a heat-dependent Resistor
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Related Instructables
Attiny25/45/85
Police Light,
with Arduino! by
Jan_Henrik
Arduino ISP to
ATTiny85 by
baelza.bubba
Arduino, the
Simple code! by
Jan_Henrik
ATTiny powered
Arduino
Projects - I
made it at
TechShop by
madebyjoe
Arduino
ultrasonic range
finder, with IC
lcd display! by
Jan_Henrik
Attiny85 RF
Transmitter to
Arduino Uno
Receiver
(Manchester
library /w
Arduino 1.0) by
finlander912
Advertisements
Comments
16 comments Add Comment
jaker3278 says:
Jan,
I wrote my own pwm controller for a different microcontroller without using any built in pwm module using the following method:1. set up an interrupt to generate 50*255 times per second. - so that you can time every 1/50th of a second in 255 little time slices.
2. use a counter variable to count the interrupts as they happen and reset every 50 interrupts.
3. use another counter variable then to count from 1 to 255 interrrupts in that 1/50th of a second.
4. when the first counter resets to zero then set the pwm output to high. then, when the second counter hits your target width (by comparing its count with the
pot input (suitably scaled to fit 1-255 range) you set the pwm output low.
so, every 1/50th of a second the output goes high and then after a period determined by your pot value it will go low until the end of that 1/50 of a second
when it will go high again etc etc.
hope that helps.
cheers
jakers dad
Jan_Henrik says:
Okay, interresting, i will try it :)
Thank you!!
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
jaker3278 says:
Jan,
sorry, I mangled that explanation a bit. You actually only need one interrupt counter if you dont need to keep track of the number of seconds. see
attached image which hopefully will make things clear.
of course you may need to take into account that position control only wants pulses between 1 and 2 mS long and not the full 20mS of the 50Hz
period. My pwm was for speed control rather than position (and i was controlling acceleration so i needed the seconds info) but all the same it will
work and is amazingly easy actually.
good luck
Jakers dad
Jan_Henrik says:
tchai says:
Hello,
In order to test servo, why do you need transistor on the signal output?
Jan_Henrik says:
The idea is to also directly drive Motors and lamps with PWM :) you can remove it, when you only want to test servos!
SergioA says:
sorry, what could be replacement for BC516? here i can not get it.
Jan_Henrik says:
domints says:
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/
Jan_Henrik says:
domints says:
Jan_Henrik says:
alterator says:
Jan_Henrik says:
bezo88 says:
nice work. looks good. you can make a servo tester with a 555 timer
Jan_Henrik says:
http://www.instructables.com/id/Attiny254585-PWM-generator-and-Servo-tester/