I don't know how to make a homemade carpet cleaner , but I did find a great one called Folex ( $6 at home depot ) . Even though this has no harsh chemicals and no odor it is hands down the best I have found ! It is a spray , that can be used in a carpet cleaning machine . I know there are no harsh chemicals , because my sister accidentally drank some ( long stupid story ) I called poison control and they said not to worry , it is made up of soaps ! Good luck !
I like the one from Dollar Tree. It's cheap and it works really well
I used vinegar and baking soda. 1 tsp baking soda, 1 Tbsp vinegar, 2 cups warm water. The vinegar scent will fade fairly quickly.
Use an oxygenated powder like OxyClean or Awesome Orange mixed with water in the liquid reservoir. Works better than the commercial shampoos.