Gamepad driver, I am afraid to lose the disc. So i will keep it here.
Media Tech MT1501 gamepad wireless driver
https://drive.google.com/file/d/0B57Rnj-YfbQFanVmaGhLYnllbEU/edit?usp=sharing
Friday, September 26, 2014
Tuesday, August 19, 2014
What is a servo motor (servo)
Servo motor is a motor, which we control by telling it at what angle it should be rotated and servo is trying to maintain that position.
How to work with it
Servo has 3 outputs: Power, Ground and Data.
On Data wire we apply PWM signal with different duty cycle, to control our motor.
There are a variety of different servos, so you still need to read datasheet, but this information will help you to start.
Now i will write about their structure, you don't need to know what is inside of them to use them.
How to work with Sharp Infrared sensor
I already wrote how to work with ADC In this article.
( In the simplest case ) Infrared Proximity Sensor - Sharp has 3 output pins: Vcc - Power, GND - Ground and Vo - Data. Depending on the distance varies the voltage at the output Vo, all that left is transform that data to digital information.
AVR Tutorial - ADC (Analog to Digital Converter)
ADC as you can guess converts analog voltage to digital number, so we could work with it in microcontroller. We can build simple ADC with comparator, it's a device which compares 2 signals (1 of them is some constant reference voltage) gives one otput if 1 signal is bigger and other if smaller.
ADC accuracy depends on it's resolution. e.g. if we have reference voltage = 5 V and our ADC is 10-bit, then on every bit we have 5 / ( 2^10 - 1 ) = 0.00489 or 5 mV, so we can't measure changes less than 5 mV.
Monday, August 18, 2014
Playing music on AVR with PWM
At first I tried to write code myself, but I failed many times.
So i searched for a working project and found it, AVR is using PWM and simple Piezo Buzzer.
Sources on Github
Introduction to Pulse Width Modulation (PWM)
PWM — Pulse Width Modulation
In general it's a method of controlling analog voltage by changing digital impulses width. In other words we can change analog signal with digitall signals.
In general it's a method of controlling analog voltage by changing digital impulses width. In other words we can change analog signal with digitall signals.
If we need to change LED brightness, we will connect it to the
variable resistor. If we need constant brightness we will compute our resistor, but still some of the power will be converted to heat on the resistor, well, it's not very efficient.
In addition we have to manually change resistance and sometimes that is impossible (RC cars).
variable resistor. If we need constant brightness we will compute our resistor, but still some of the power will be converted to heat on the resistor, well, it's not very efficient.
In addition we have to manually change resistance and sometimes that is impossible (RC cars).
Labels:
theory
Sunday, August 17, 2014
AVR Tutorial - PWM Signal Generation using Timers
In AVR microcontrollers PWM is implemented in hardware, all that left is configure it, by setting required bits in timer registers.
Labels:
AVR
Subscribe to:
Posts
(
Atom
)
