An investigation into the conditions of Chinese workers has revealed the human cost of producing Apple iPhones and iPads.

The research has revealed allegations of excessive working hours at two Apple plants in southern China.

It has also uncovered an "anti-suicide" pledge that workers at the two plants have been urged to sign, after a series of employee deaths last year.

The investigation gives a detailed picture of life for the 500,000 workers at the Shenzhen and Chengdu factories run by Foxconn, which produces millions of Apple products. The report accuses Foxconn of treating workers "inhumanely, like machines".

Among the allegations made by workers interviewed by the Centre for Research on Multinational Companies and Students & Scholars Against Corporate Misbehaviour are claims that excessive overtime is routine, despite a legal limit of 36 hours a month. One payslip indicated the worker had performed 98 hours of overtime in a month.

Workers were sometimes pressured to take only one day off in 13. In some factories badly performing workers are required to be publicly humiliated in front of colleagues. Crowded workers' dormitories can sleep up to 24 and are subject to strict rules.

Foxconn produced its first iPad at Chengdu last November and expects to produce 100 million a year by 2013. Last year Apple sold more than 15 million iPads worldwide.

Foxconn manager Louis Woo confirmed workers sometimes worked more than the statutory overtime limit to meet demand but claimed that all the extra hours were voluntary. Workers claim that, if they turn down excessive demands for overtime, they will be forced to rely on their basic wage - about 1350 yuan ($257) a month for a 48-hour week.

Asked about anti-suicide netting being fitted beneath the windows of workers' dormitories, Woo said: "Suicides were not connected to bad working conditions. There was a copy effect. If one commits suicide, then others will follow."

Apple said: "Apple is committed to ensuring the highest standards of social responsibility throughout our supply base. Apple requires suppliers to commit to our comprehensive supplier code of conduct as a condition of their contracts with us. We drive compliance with the code through a rigorous monitoring programme."