It could be the food; could you change to a different brand? I believe puppies need the puppy versions though, because they are growing so fast. It also sounds like it could be colitis, which both my dogs have had and it is pretty scary. Both were tested and everything was fine. It just seems to have to run its course. It could be due to stress or changes in the dog's life (did you just adopt him recently? He could be a little stressed due to the change in environment, etc.). A good site to visit to check on the quality of your dog's food is dogfoodadvisor.com.
If you think your dog ate something, maybe he needs an x-ray?