Last year an American company microchipped dozens of its workers . In a "chip party" that made headlines around the world, employees lined up to have a device the size of a grain of rice implanted under the skin between their thumb and forefinger. At first, Todd Westby, the CEO of Three Square Market, thought only about five or six people - him and a couple of directors, some of the people who worked in the IT department - would volunteer. But of the 90 people who work at the headquarters, 72 are now chipped; Westby has a chip in each hand. They can be used to open security doors, log on to computers and make payments at the company's vending machines.

Can he see it taking off at lots of other companies? "Not necessarily," he says. Or at least not yet. It's partly a generational thing, he believes. "You may never want to be chipped but if you're a millennial, you have no problems. They think it's cool." There are other uses for it - two months ago, the company (whose core business is selling vending machines and kiosks) started chipping people with dementia in Puerto Rico. If someone wanders off and gets lost, police can scan the chip "and they will know all their medical information, what drugs they can and can't have, they'll know their identity". So far, Three Square Market has chipped 100 people, but plans to do 10,000.

The company has just launched a mobile phone app that pairs the chip with the phone's GPS, enabling the implantee's location to be tracked. Last week, it started using it with people released from prison on probation, as a replacement for ankle tags, which Westby describes as "intimidating and degrading". Could he ever see the company using GPS to track its chipped employees? "No," he says. "There's no reason to."

Not all firms would agree. Tech companies are coming up with ever more bizarre and intrusive ways to monitor workforces. Last week the Times reported that some Chinese companies are using sensors in helmets and hats to scan workers' brainwaves and detect fatigue, stress and even emotions such as anger. It added that one electrical company uses brainwave scans to decide how many breaks workers get, and for how long. The technology is used on high-speed train drivers to "detect fatigue and attention loss". While this sort of technology may have legitimate safety applications - a similar project was carried out with Crossrail workers using wristbands that sensed fatigue - it's not hard to see how it could creep into other areas.

In February, it was reported that Amazon had been granted patents for a wristband that not only tracked workers' locations in the warehouse as they "picked" items to be dispatched, but could "read" their hand movements, buzzing or emitting a pulse to alert them when they were reaching for the wrong item. In the filing, Amazon describes it as being able to "monitor performance of the placing of the incoming inventory item into the identified storage location by the inventory system worker".

There are tech companies selling products that can take regular screenshots of employees' work, monitor keystrokes and web usage, and even photograph them at their desks using their computers' webcams. Working from home offers no protection, as all this can be done remotely. Software can monitor social media usage, analyse language or be installed on employees' phones to monitor encrypted apps such as WhatsApp. Employees can be fitted with badges that not only track their location, but also monitor their tone of voice, how often they speak in meetings and who they speak to and for how long.

Employees have always been watched at work, and technology has always been used to do it. But where it was once a factory foreman with a stopwatch, or workers having to physically clock in and out, now "all of that physical stuff has gone into digital technology", says Andre Spicer, professor of organisational behaviour at Cass Business School. "It captures things that you weren't able to capture in the past, like how many keystrokes are people taking, what are they looking at on their screen while they're at work, what kind of language are they using. And surveillance follows you outside the workplace now."

How much of this is legal? In the UK, employers are allowed to monitor which websites you look at while at work, says Philip Landau, a partner at Landau Law Solicitors who specialises in employment law. "However, the device they monitor must be partly or wholly provided by work. Employers must also give prior warning if they are going to monitor your online activity, and should make you aware of the relevant social media policy." It is also legal to monitor keystrokes, though again employees must be told they will be watched. "In companies where this system is in place, it is not uncommon for employers to speak to employees if they feel that their number of keystrokes is low," says Landau. "It is worth noting that a high number of keystrokes does not necessarily mean high levels of productivity and vice-versa."

Employers could theoretically use your computer's webcam to see when you're at your desk but "there should be a justification for such monitoring, and you should be informed of it beforehand. You should also be informed what the pictures will be used for, and how they will be stored." As for GPS tracking, "a company may track any vehicles that they supply to their staff. However, the data they collect must only be used for the management purposes of the company. Any GPS device is not allowed to be turned on if the employee is using the vehicle for personal reasons outside of work."

James Bloodworth spent a month working as a "picker" - the person who locates the products ordered - for Amazon in March 2016 for his book Hired: Six Months Undercover in Low-Wage Britain . "We carried this handheld device at all times and it tracks your productivity," he says. It would direct workers to the items they need to find on the shelves in one of Amazon's vast warehouses. "Each time you picked up an item, there would be this countdown timer [to get to the next item] which would measure your productivity." Bloodworth says supervisors would tell people how productive they were being; he was warned he was in the bottom 10%. "You were also sent admonishments through the device saying you need to get your productivity up. You're constantly tracked and rated. I found you couldn't keep up with the productivity targets without running - yet you were also told you weren't allowed to run, and if you did, you'd get a disciplinary. But if you fell behind in productivity, you'd get a disciplinary for that as well." It didn't feel, he says, "that you were really treated as a human being". Workers had to go through airport-style security scanners at the beginning and end of their shifts, or to get to the break areas. He says going to the loo was described as "idle time" and once found a bottle of urine on one of the shelves.

Amazon says its scanning devices "are common across the warehouse and logistics sector as well as in supermarkets, department stores and other businesses, and are designed to assist our people in performing their roles", while the company "ensures all of its associates have easy access to toilet facilities, which are just a short walk from where they are working". It adds: "Associates are allowed to use the toilet whenever needed. We do not monitor toilet breaks."

Some of Bloodworth's colleagues, he says, were angry about the level of monitoring - "but it was more cynicism and resignation. Most of the people I met hadn't been in the job very long or were looking for other jobs. Every job was temporary and it was a workforce completely in flux." Has Bloodworth seen the future? Will we all be monitored like this by our bosses in years to come? Possibly, he says. "One of the things that has arisen in response to the book is that people say work is going to be automated anyway, or workers need to be more flexible, as if this is the way of the future and it's inevitable, which I think is quite dangerous. Amazon can get away with this because of political choices and because the trade union movement is quite weak. I think other businesses will look at Amazon, see they have had success with this business model - and seek to replicate it."

For his book Working the Phones, Jamie Woodcock, a sociologist of work at the Oxford Internet Institute, spent six months working in a call centre. You get a sense of the monitoring, he says, "from the moment you walk in. You have TV screens that have everyone's relative performance to each other displayed. Managers collect data on almost every single part of what you do. Every single phone call I ever made was digitally recorded and stored. In terms of monitoring, it's like being able to call back every single thing somebody has made on an assembly line and retrospectively judge it for quality. We all make mistakes and we all have bad days, but this kind of monitoring can be made retrospectively to sack people and is used to give people a sense that they could lose their jobs at any moment."

Monitoring is built into many of the jobs that form the so-called "gig economy". It's not easy to object to the constant surveillance when you're desperate for work. What has surprised Spicer is how willingly people in better-paid jobs have taken to it. "Prisoners in the past were forced to wear tracking bands but now we willingly put on step trackers or other kinds of tracking devices given to us by our employers, and in some cases we pay for the privilege." Companies such as IBM, BP, Bank of America, Target and Barclays have offered their employees Fitbit activity trackers .

It is part, Spicer says, of "this whole idea of wanting to improve or optimise yourself. A lot of technology is designed to not just feed back data about your performance to your boss, but also give it to you. I guess they're also seen as cool or fashionable, so it's not surprising they're taken up so readily."

Spicer has watched the shift away from "monitoring something like emails to monitoring people's bodies - the rise of bio-tracking basically. The monitoring of your vital signs, emotions, moods." Of Three Square Market's practice of chipping employees, he says: "You can imagine that slowly extending. You could imagine things like employers asking to have your DNA in the future, and other kinds of data."

Surveillance can have positive applications. It's necessary (and legally required) in the financial industry to prevent insider trading. It could be used to prevent harassment and bullying, and to root out bias and discrimination. One interesting study last year monitored emails and productivity, and used sensors to track behaviour and interaction with management, and found that men and women behaved almost identically at work. The findings challenged the belief that the reason women are not promoted to senior levels is that they are less proactive or have fewer interactions with leaders, and simply need to "lean in".

Still, says, Woodcock, "we need to have a conversation in society about whether work should be somewhere that you're surveilled". That need is perhaps most urgent where low-paid, insecure jobs are concerned. "If you work in the gig economy, you have a smartphone," Woodcock points out, and that smartphone can be used to track you. "I think because many of these workplaces don't have traditional forms of organisation or trade unions, management are able to introduce these things with relatively little collective resistance."

The Independent Workers Union of Great Britain is well aware of the issues of monitoring and data collection. James Farrar is the chair of its United Private Hire Drivers branch, and the Uber driver who won a legal battle against the company last year for drivers' rights. "They do collect an awful lot of information," he says. "One of the things they will report to you on a daily basis is how good your acceleration and braking has been. You get a rating. The question is: why are they collecting that information?" Uber also monitors "unusual movements" of the phone when someone is driving (implying it knows if someone is using their phone while at the wheel) and, of course, tracks cars and drivers by GPS.

"My concern with it is this information is being fed into a dispatch algorithm," he says. "We should have access to the data and understand how it's being used. If some kind of quality score on my driving capability [is put into an algorithm], I may be offered less valuable work, kept away from the most valuable clients - who knows?" It's not an unreasonable fear - the food delivery company Deliveroo already does something similar, monitoring its riders' and drivers' performance, and has started offering "priority access" when booking shifts to those who "provide the most consistent, quality service" . Uber, however, says its monitoring is intended only to deliver "a smoother, safer ride ... This data is used to inform drivers of their driving habits and is not used to affect future trip requests."

Not all surveillance is bad, says Farrar. In some ways, he would like more. He was assaulted by a passenger and is calling for CCTV in all vehicles, partly for the safety of drivers. "There is a role for surveillance technology," he says. Ironically, when Farrar went for a meeting with Uber to discuss the assault, the company made him turn his phone off to prove he wasn't recording it.