In a medium large bowl, mix baking soda with essential oils. Stir to combine until no clumps are left and all baking soda feels slightly damp to the touch.
Spoon the combination into a big jar. Punch a few holes into the lid, then shake to sprinkle the mixture over the carpet (or you can simple use a large salt shaker if you're unable to poke holes in the jar lid).
Lightly spread with a carpet brush (or a vacuum cleaner brush) so that baking soda gets into the carpet fibers.
Leave on for at least 30 minutes then simply vacuum. If your carpet is really stinky, let the mixture sit for several hours or even overnight as I mentioned above.
Please note, this deodorizer is just a temporary fix to your carpet problems. They'll still need to be washed at some point, especially when very dirty and smelly.