I have a long history of messing up cooking raw pintos and the like. Jan, an expat friend from Taiwan taught me this trick.
In a 6 qt. Pan add dry beans and cover with water. Bring to a boil and add 2 teaspoons baking soda. Boil about 3 – 5 minutes. Drain and rinse beans. Cover with fresh water and bring to a boil again. Rinse several times and drain well. Add beans and 3 quarts of water. Simmer 1 hour or until tender. Add 1/2 chopped onion and 1 pound of ham chunks if desired.