The cause of irregular periods could be due to hormonal imbalance, stress, chronic illness, polycystic ovarian disease, thyroid gland disorders or diseases, pituitary gland tumors or cyst, galactorrhea, prolactinomas etc. You should consult a gynecologist and get examined and investigated as soon as possible to know the exact cause of all these episodes. Given your history of obesity, PCOS is an important possibility to be ruled out.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.