It's impossible. With four pieces you can make at most different weights.
However, if you are allowed to "subtract" weights (e.g. by using a balance scale and putting one weight on the opposite end) then it's possible. Use 1,3,9,27 kg. This turns out to be a problem involving base 3. Also, 1+3+9+27 = 40.