questions
brandan
Posts: 52
Question 1:
How do you control voltage of an output?
Question 2:
How you get voltage or Resistance of an input?
How do you control voltage of an output?
Question 2:
How you get voltage or Resistance of an input?
Comments
1. If its a Stamp, you can a) turn a pin full on or full of with the HIGH and LOW or b) set it to some value between about 0 volts and 5 volts with the PWM command and a small capacitor. See the Helpfile under PWM.
2. If its a Stamp input, its either on or off. You can determine that switching point by applying an adjustable voltage to the pin and writing a short program to tell you when the pin switches from 1 to 0. The RCTIME works by using this same principle to turn a varying input voltage into a varying number you can use in your program. See the Helpfile under RCTIME.
If your assignment is asking about the input impedance of a Stamp input, set up a circuit with a milli- or micro-ammeter and measure the current going into the Stamp pin when its being used as an input.Then use Ohm's Law to calcilate the impedance being presented by the pin.
memorize is Ohm's Law. You'll use it a lot. One way to control voltage is with a voltage divider. You can measure voltage across a resistor. Resistance and current are calculated differently in series vs parallel circuits. I'm assuming you're beginner and I apologize if I misread your questions.
One way you can control voltage with a microprocessor is by using a technique called Pulse Width Modulation (PWM). For example, PWM can be used to control the glow of LEDs. Other methods might require transistors or mosfets if you want to use more voltage than your microprocessor normally operates at.
To limit current going into a microprocessor pin, you can place a resistor between the pin and whatever your input might be. To reduce voltage going into the pin, you can use a voltage divider or even a diode arrangement, depending on your little heart's desire.
It is all about E=IxR and P=ExI. The voltage and current come from the power supply... either a battery or power pole, the Resistance can be inserted to limit both voltage and resistance. That is the extremely simplified explanation.
From there we begin to use 'non-linear' devices to regulate.. such as transistors and MOSfets and diode.
Try the Navy's free electronics course for a good intro to fundamentals. It is called NEETS. The authors did a good job of introducing a lot of basics to newcomers.
http://jacquesricher.com/NEETS/