Symbolism will hang heavy this weekend when Barack Obama visits Soweto, the cradle of South Africa's black liberation struggle, and Robben Island, the prison where Nelson Mandela, who remained in critical condition in hospital last night, languished for years, plotting his nation's rebirth.

Obama should not expect red-carpet treatment from all South Africans, despite the historic affinity between the civil rights and anti-apartheid movements. Workers, students and Muslim groups are among those determined to give Obama a bumpy landing when he descends on Africa's biggest economy.

"NObama" is the cry from the Congress of South African Trade Unions (Cosatu) and the South African Communist party, which have called for "all workers" to join mass protests including a march on the US embassy in Pretoria on Friday.

Academics and students have vowed to boycott the University of Johannesburg's award of an honorary law doctorate to Obama. The Muslim Lawyers' Association has called for the president to be arrested as a war criminal.

While these may appear fringe group stunts that US presidents face all over the world, South Africa is an unusual case. Cosatu and the Communist party form a "tripartite alliance" with the governing African National Congress (ANC) and expect to be heard. Cosatu in particular, with 2.2 million members, is central to the ANC's election machinery and well rehearsed in mobilising demonstrations that have been known to turn violent. The secretary general of the Communist party, Blade Nzimande, doubles as the country's higher education minister and the ANC has plenty of self-professed communists and Marxists with a flair for anti-western rhetoric.

Obama is a target for those who prefer to blame South Africa's malaise of inequality and joblessness on global capitalism rather than the ruling ANC.

Bongani Masuku, Cosatu's international relations secretary, said: "Obama is perpetuating American foreign policy. The US is an empire run on behalf of multinational companies and the ruling class of America. US foreign policy is militarising international relations to sponsor and make their own weapons."

Many in Africa had impossibly high hopes for Obama, the son of a Kenyan. But Masuku added: "I'm not disappointed because I didn't expect anything. It's not about the individual; it's not about the race he came from. It's about the class he represents. It's like he's the gatekeeper for white monopoly capital. He promised things we knew he wouldn't be able to do."

Guantánamo

That view is not confined to militant union organisers but extends to some members of the revered struggle generation. Denis Goldberg, who stood trial with Mandela in 1963-64 and was sentenced to life in prison by the apartheid regime, said: "I don't like the idea of Guantánamo Bay; I think this is reprehensible.

"The unending assumption of depending on Chinese credits to finance your wars elsewhere – I think it's outrageous what's going on. I don't have final answers but we need to ask questions of the big powers – all of them."

Such is Cosatu's influence on the ANC that its attacks on the US – from Palestine and Guantánamo Bay to the "ruthless and savage looting of our natural resources" – have sparked warnings of a diplomatic rift.

Ian Davidson, shadow international relations minister for the opposition Democratic Alliance, said: "This is President Obama's first state visit to South Africa and is a significant event for the country to further our relations with the United States. It should not be blighted by Cosatu's cheap political-point scoring. This move by Cosatu is an embarrassment to South Africa."

On the surface, US-South African relations are cordial and have improved since the presidencies of George Bush and Thabo Mbeki, though Washington's intervention in Libya alienated many here. But while many young South Africans were caught up in "Obama-mania" five years ago, those with longer memories bitterly recall Ronald Reagan's failure to oppose apartheid.

Tom Wheeler, a former South African diplomat who began work in Washington just before the Kennedy assassination 50 years ago, said: "There's a gut anti-Americanism and anti-westernism that lurks in some of the communities. It may be a hangover from the days when a lot of ANC people travelled to the Soviet Union, and America was regarded as the great colonialist."

A demonstration is planned for the University of Johannesburg's Soweto campus on Saturday, where the president will meet young African leaders in a "town hall" event.

With first lady Michelle and their daughters, he will then travel to Cape Town to visit Robben Island and meet retired archbishop Desmond Tutu, never shy of speaking his mind on western warmongering.

Mandela

Perhaps the only living South African more famous than Tutu is Mandela. Obama has met him once, in a Washington hotel in 2005. The prospect of the first black US and South African presidents coming face to face is a spin doctor's dream, but could backfire if the ailing Mandela is seen to be exploited.

Goldberg, 80, said: "I think it would be such an intrusion on an old man who's ill. We exploit Nelson Mandela and I object to that. We need to respect this great man's privacy because people go to see Nelson Mandela not to support Nelson but to gain support for themselves, and this is exploitation."

Speaking from Washington, Ben Rhodes, the White House deputy national security adviser for strategic communications, said: "While we're in South Africa, we are going to be very deferential to the Mandela family in terms of any interaction that the president may have with the Mandela family or with Nelson Mandela.

"Ultimately, we want whatever is in the best interest of his health and the peace of mind of the Mandela family. And so we'll be driven by their own determinations in that regard.

"We'll be in touch with them. The president wants to support them in any way. He's supporting them with his thoughts and prayers as it is. And if he has an opportunity to see the family in some capacity, that's certainly something that we may do."

Rhodes added: "The president has always seen Nelson Mandela as one of his personal heroes."

Obama's three-nation tour, starting in Senegal on Wednesday night, is only his second to sub-Saharan Africa as president, and his first solely to the continent, after a fleeting visit to Ghana in 2009. Rhodes admitted that Africa had been "under-represented" in Obama's travel to date and said trade and investment would top the agenda.

"What we hear from our businesses is that they want to get in the game in Africa. There are other countries getting in the game in Africa – China, Brazil, Turkey. And if the US is not leading in Africa, we're going to fall behind in a very important region of the world."

But some analysts believe Obama's absence speaks volumes about how his administration has treated Africa as an afterthought.

Irony

Steven Friedman, director of Rhodes and Johannesburg universities, said: "It has to be said that one of the great ironies of the debates about how we should receive Barack Obama is that, while a lot of South Africans are very sympathetic to him because he's the first African-American president,

"I don't think that it's unkind to say that he's done absolutely nothing for this continent. In some respects, George W Bush did more for Africa than Barack Obama. So any sense that this is Africa's president who's actually out there trying to win the continent for the US is not the case. I can't remember a US administration that has shown less interest in the continent than this one."

Obama will arguably be playing catch-up with China, whose new president came to South Africa in March, managing in a couple of weeks what has taken Obama four-and-a-half years. China sped past America as the continent's biggest trading partner in 2009.

Friedman added: "Clearly China is now the dominant presence economically. I think the US still has far more political influence on the continent but this is not going to last for ever. Presumably at some point the Chinese are going to expect some sort of political dividend for their economic dominance."

Others, however, believe the picture is more complicated, noting that the US remains dominant militarily, politically and in capital investments.

Adekeye Adebajo, executive director of the Centre for Conflict Resolution in Cape Town, said: "Don't forget that the top countries they trade with – Nigeria and Angola – account for about 15% of their oil imports. Then you have Equatorial Guinea and Gabon. America still has very strong ties with all of those countries.

"I'm not sure this zero-sum approach where if China gains, the US loses, really holds. I don't think it's quite that straightforward, and I don't think the US has had a possessive approach to Africa in the way that France often has had. As long as it's able to protect its interests in key oil countries, I don't think it's really too worried. The US is co-operating with 35 African armies in its anti-terrorism activities, which is in some sense a sign of influence."

Senegal style

Before South Africa, there is Senegal. And for the Senegalese this trip is not just about the US president, but the first lady too.

Michelle Obama is a popular figure in many African countries, and women in Senegal say that there are specific trends emerging before her arrival.

"People in Senegal like Michelle Obama; they have received a positive impression of her," said a Dakar resident, Sophie Ly Sow. "I know women who have been copying her dresses – one dress in particular that she wore is very much in demand."

Michelle Obama has worn clothes made by African designers or featuring African-print material at high-profile events, making her the darling of some African women.

"Michelle Obama has been known to wear clothes made by African designers, and I don't think that goes unnoticed," said Kathryn Touré, until recently resident in Dakar, the Senegalese capital. "It shows a willingness for people in the White House to step out of the box and go global."

The first lady has been a particular fan of the Nigerian designer Duro Olowu, wearing one of his pieces to the United Nations general assembly in New York. Her profile in Africa was also raised by a solo trip in 2011, when she travelled to South Africa with her daughters, Sasha and Malia, and her mother. During the trip – an attempt to advance her international youth work – she met Nelson Mandela at his home in Johannesburg. Afua Hirsch

Flying visit

It is being described as the most expensive presidential tour ever, the Obama family's long-awaited visit to east, west and southern Africa will last less than a week but is expected to cost up to $100m (£65m).

The busy schedule is made possible by a monumental logistical operation.: instead of relying on local police, hospitals and other facilities, the US is in effect bringing a DIY city.

Hundreds of US secret service agents will be posted in secure facilities, while an aircraft carrier or amphibious ship with a fully staffed medical trauma centre will be offshore in case of an emergency, according to the Washington Post.

The paper said it had obtained an internal planning document that revealed: "Military cargo planes will airlift in 56 support vehicles, including 14 limousines and three trucks loaded with sheets of bulletproof glass to cover the windows of the hotels where the first family will stay.

"Fighter jets will fly in shifts, giving 24-hour coverage over the president's airspace, so they can intervene quickly if an errant plane gets too close."

On Thursday, Barack Obama will meet the Senegalese president, Macky Sall, and attend an event at the supreme court with leading regional judicial figures; the first lady will have tea with her Senegalese counterpart, and then visit the Martin Luther King school in Dakar.

Both he and Michelle will go to Gorée island, where they will tour the House of Slaves museum and meet civil society leaders. That night, they will attend a dinner hosted by Sall.

On Friday, the president will attend an event on food security, then fly to South Africa, where the next day the president will meet the president, Jacob Zuma, and hold a "town hall" event with young African leaders at the University of Johannesburg's Soweto campus. He will also hold talks with Nkosazana Dlamini-Zuma chairwoman of the African Union.

Michelle Obama, meanwhile, will have tea with one of Zuma's wives, then join schoolchildren at an MTV/Google Plus event at the Sci-Bono Discovery Centre, in Johannesburg. The Obamas will attend an official dinner hosted by Zuma.

On Sunday, they will fly to Cape Town to visit the prison museum on Robben Island.Obama will then stop at a community centre focused on healthcare with retired archbishop Desmond Tutu. He will go on to give the central speech of his African tour at the University of Cape Town.

On the final day, Obama will lay a wreath at the embassy memorial and visit a power plant, while his wife will take part in an African first ladies' summit hosted by the George W Bush Institute and attended by Laura Bush. David Smith