Mark Clapson also downloaded tens of thousands of indecent images of children from the internet.
Luc Chignell, prosecuting, said that Clapson was arrested after police received information and as a result searched his home.
Over 30,000 indecent images of children were found on devices belonging to Clapson.
Mr Chignell said: “There were indecent images of children on several devices.
“In addition to that, officers found images which it is clear the defendant was responsible for taking using a hidden camera.
“It is clear that on his own admission he has a sexual interest in children and acted upon it in these ways.”
Clapson, 39, of Cawkwell Hill, Cawkwell, near Louth, admitted three charges of voyeurism and three charges of producing indecent images of children.
He also admitted three charges of making indecent images of children involving a total of 31,213 images, and further admitted possession of 24 extreme pornographic images.
Clapson was jailed for two years and nine months.
He was placed on the sex offenders register indefinitely and given a life long sexual harm prevention order.
The devices he used to access the illegal images were ordered to be forfeited and destroyed.
Judge John Pini QC told Clapson that the lives of the victims who had been secretly filmed have been shattered.
“This has had an absolutely devastating effect,” said the judge.
David Eager, in mitigation, said that Clapson admitted to having a sexual interest in children and since his arrest has sought counselling.
“His conduct was appalling and he knows it was appalling,” said Mr Eager.