Western Africa south of the Sahara is divided into two east-west stretching ecological zones. To the north, the Sahel encompasses the semi-arid region stretching from Lake Chad to Senegal. The Sahel wouldn't be prime agricultural real estate but for the presence of several large permanent rivers flowing through it, including the Senegal, Niger, and Benue. With these, the region's inhabitants have several advantages - a reliable agricultural base, and the ease of movement afforded by a flat, sparsely wooded landscape.
To the south lies the region of dense forests - the home of many independent city-states. To the north of the Sahel lies the sand-sea of the Sahara, permanently inhabited only by desert nomads and scattered oasis dwellers. Beyond it, the Maghrib - the Mediterranean nations of Northwest Africa (Modern Morocco, Algeria, and Tunisia.)
NOTE: Many modern African states take their names from ancient states and empires. This doesn't necessarily mean that their is really any direct connection between them, so be careful. The boundaries of the modern Republic of Ghana, for instance, don't even overlap those of the ancient empire of Ghana.
Roman era and early Middle Ages: At the opening of the study period, the Sahel was truly a backwater, as trans-Saharan trade was very rare. All of that changed in the first few centuries of the study period due to two developments:
In each of these empires, the trading pattern was similar: Saharan salt was traded for gold and slaves from farther south. This, in turn, was traded with Berber nomads for manufactured goods from the Mediterranean world. Thus, if your ancestors lived in the Sahel in CE 1800, 1490, or 1000, their ancestors probably also lived not only there, but in the Maghrib and the adjacent forests of coastal West Africa (modern Guinea to Nigeria), and in the empty places in between, in earlier times.
Add to this the occasional attempt at military conquest from the north. There were two significant ones:
It got interesting around the turn of the seventeenth century when the Moroccans rolled into Songhay, whose eastern possessions were suddenly up for grabs. The rulers of Lake Chad filled this vacuum as their kingdom expanded to rule the Hausa cities of northeastern Nigeria.
About the Hausas: Throughout the study period, the dominant people of northern Nigeria have been the Hausas. They inhabit a region that is intermediate between the scrub brush of the Sahel and the forests of coastal West Africa and have served as intermediaries in trade between these regions. In some ways, their culture resembles that of the Sahelian peoples: they embraced Islam early on and are able to move freely through an open landscape. Like the peoples to the south, they formed a collection of independent city-states rather than large empires. That situation changed during the 19th century when they teamed up with....
The Fulanis: These were a nation of semi-nomadic pastoralists who spread out of the westernmost Sahel (Guinea and Senegal) throughout the entire region during the 15th century. For a couple of centuries they herded cattle in places not suitable for agriculture and interacted little with their neighbors. Then, in the 17th century, they embraced Islam and began to chafe at not being treated as first-class Muslims. The result was a series of jihads during the late 18th and early 19th centuries in which the Fulanis founded new Islamic states. The biggest of these was the kingdom of Sokoto which encompassed the entire Hausa region. The key to Fulani success here was their recruitment of Hausa intellectuals and opponents to the old regimes as allies. Thus, Sokoto became a Hausa-Fulani state that controlled trade through northern Nigeria and Niger. Thus, if your ancestors were Hausas in CE 1800, their ancestors could have included Fulanis living as far west as Senegal in CE 1490.