The YB-40 was the bomber escort variant of the Flying Fortress, where the Y stood for "service test". This aircraft was produced by converting existing B-17Fs in an attempt to provide additional firepower to achieve better defenses for B-17 daylight bomber forces which were suffering appalling losses in their raids against German targets on the European continent.
The first XB-40 prototype was produced in November of 1942 by the Vega division of Lockheed. They converted a standard Boeing-built B-17F (serial number 41-24341) to escort configuration by adding a dorsal turret in the radio compartment position carrying a pair of 0.50-cal machine guns, a chin turret underneath the nose equipped with a pair of 0.50 cal machine guns, and twin gun mounts instead of the usual single gun mounts at each waist position. The regular top, belly, and tail turrets were retained, bringing total defensive armament to fourteen 0.50-inch machine guns. Additional protective armor was fitted for better crew protection. The bomb bays were replaced by storage areas which carried additional ammunition for the guns. The normal ammunition load was 11,135 rounds, which could be increased to 17,265 rounds if the fuel load was reduced. The first flight took place on November 10, 1942.
Twenty more Vega-built B-17Fs were converted to YB-40 configuration, plus four TB-40 trainers. Although they bore the Vega model number of V-139-3, because Vega had higher-priority production projects, the planes were actually modified by Douglas at Tulsa, Oklahoma from Vega-built B-17F airframes. A variety of different armament configurations was tried. Some YB-40s were fitted with four-gun nose and tail turrets. Some carried cannon of up to 40-mm in caliber, and a few carried up to as many as 30 guns of various calibers in multiple hand-held positions in the waist as well as in additional power turrets above and below the fuselage! Oddly enough, there don't seem to have been any photographs ever published of these 30-gun YB-40s (insofar as I am aware), although I have seen some drawings.
In the spring of 1943, the 327th BS of the 92nd BG based at RAF Alconbury were issued 12 YB-40s for operational combat tests. The first operational YB-40 sortie took place on May 29, 1943 against St. Nazaire. Eight other missions were later flown, the last one taking place on July 4, 1943. Five kills and two probables were claimed during these missions, with the loss of one YB-40. Very early on, it was found that the net effect of the additional drag of the turrets and the extra weight of the guns, armor, and additional ammunition was to reduce the speed of the YB-40 to a point where it could not maintain formation with the standard B-17s on the way home from the target once they had released their bombs. The YB-40 could protect itself fairly well, but not the bombers it was supposed to defend. Consequently, it was recognized that the YB-40 project was an operational failure, and after less then ten missions the YB-40s were withdrawn from service, and the surviving YB-40s were converted back to standard B-17F configuration or used as gunnery trainers back in the States.
However, the YB-40 was to have one lasting impact--the chin turret originally introduced on the YB-40 was later adopted as standard for the B-17G series.
XB-40: Conversion of B-17F-1-BO 41-24341 YB-40: Conversions of B-17F-10-VE 42-5732/5744, B-17F-30-VE 42-5871, and B-17F-35-VEs 42-5920, 5921, 5923, 5924, 5925, and 5927. TB-40: Conversions of B-17F-25-VEs 42-5833 and 5834, B-17F-30-VE 42-5872, and B-17F-35-VE 42-5926.