The ballast resistor is used to limit the current through the LED and to prevent that it burns. If the voltage source is equal to the voltage drop of the LED, no resistor is required. The resistance of the ballast resistor is easy to calculate with Ohm's law and Kirchhoff's circuit laws.Feb 5, 2012