At Potsdam, Truman mentioned to Stalin (through an interpreter) that the US had just tested (actually during the conference) a bomb of immense power. Stalin played dumb, just nodded, but sent an inquiry back home to get a progress report on the Soviet bomb. The first Soviet test wasn't until 1949, and their designs were based on US designs stolen through espionage.
Stalin knew about the Manhattan Project long before Truman. Truman had no clue until TWO WEEKS AFTER he became president. Truman wanted to let Stalin know, and was planning on an exhibition before August 8th, which would serve as a warning to Stalin.