Roberto Bartini had designed and built the
Stal-7 airliner whilst he was the chief designer at the ZOK NII GVF (). The performance of the Stal-7 was exceptional, particularly in respect to its payload: at gross overload weight over 56% of the total weight was payload. During flight trials with maximum all-up weight the prototype crashed on takeoff in early 1938, resulting in the arrest of Bartini and his imprisonment in a
Siberian gulag in February 1938. The Stal-7 lay unrepaired until
Vladimir Yermolaev was appointed as chief designer at
OKB-240 after Bartini's arrest, with the task of transforming the Stal-7 design into a long-range bomber, a task made easier since Bartini had reserved space for a bomb bay in the fuselage. After repair the Stal-7 carried on with the flight-test programme, including a record-breaking nonstop flight on 28 August 1939 when it flew
Moscow—
Sverdlovsk—
Sevastopol—Moscow; a distance of at an average speed of . The DB-240 prototype flew for the first time on 14 May 1940 and began its State acceptance tests on 27 September 1940. The weaker engines prevented the DB-240 from reaching its designed performance. It could only attain at instead of the expected at . Its defensive armament was deemed inadequate and other problems included an excessively long take-off run and engine defects. However, these did not offset its virtues of a heavy bomb load and long-range ( carrying of bombs). It was ordered into production at Factory No. 18, in
Voronezh, as the Yermolayev Yer-2. A Yer-2 was modified with experimental
Mikulin AM-37 engines, a reinforced undercarriage, armored seats for the navigator and gunner, and 12.7 mm UBT machine guns in place of its original ShKAS weapons. It first flew in July 1941 and was able to reach at , but the range was reduced to carrying of bombs. One significant problem with this version was the excessive takeoff roll which hindered operations from grass airstrips. The engine was unreliable, however, and had cooling problems that the Mikulin
OKB did not have the resources to resolve so it was cancelled in October when the factory was forced to evacuate from Moscow by the German advance. The
Charomskiy M-40F Diesel engine was also evaluated in a Yer-2 in 1941. This engine, like all Diesels, offered a greatly reduced
fuel consumption compared to a standard gasoline-powered engine, but at a great penalty in weight. These engines increased the gross takeoff weight to which required the undercarriage to be reinforced and the wing area increased to keep the same
wing loading. The M-40F-powered aircraft reached a maximum speed of at . However, the M-40 was not yet ready for service use and the project was cancelled. The aircraft/engine combination did have enough potential that development work continued using the closely related, but more mature,
Charomskiy ACh-30B Diesel engine. The cockpit was modified to accommodate two pilots side-by-side and the wing and tailplane areas were increased. The 12.7 mm UBT machine gun in the dorsal turret was replaced by a
ShVAK cannon and the nose and ventral ShKAS machine guns were exchanged for 12.7 mm UBT machine guns. Up to of fuel could be carried. The Yer-2/ACh-30B was placed into production at Factory No. 39 in
Irkutsk at the end of 1943 and the first production aircraft was submitted to its State acceptance trials the following month. Some excess aircraft were converted as Yer-2ON VIP transports. ==Operational history==