The Sandman (short story)

The Sandman (short story) is a short story by Ernst Theodor Amadeus Hoffmann, which he wrote in 1817. It's a science fiction horror story.
Plot.
When he was a child, Nathaniel snuck out of his room at night and watched his father work with an alchemist named Coppelius on creating robots called automatons. When Nathaniel was scared and screamed, Coppelius decided to take his eyes out of his head and put them in an automaton but Nathaniel’s father stopped him so Nathaniel woke up thinking it was a nightmare. Years later a man named Coppola came to Nathaniel to sell him glasses and Nathaniel threatened to throw him out a window because he reminded him of Coppelius. Nathaniel wrote to his girlfriend Clara and her brother Lothar telling them what happened to him in his childhood but they think it's a false memory so Nathaniel breaks up with Clara. After Professor Spallanzani tells Nathaniel that Coppola comes from Italy and Coppelius is from Germany, Nathaniel buys a telescope from Coppola. Then Nathaniel sees Spallanzani’s daughter Olympia with the telescope and falls in love with her. Then Coppelius tears her human eyes out of her machine head and runs away as it turns out Olympia is an automaton. Nathaniel has a nervous breakdown and starts to have psychosis. After Nathaniel gets better he decides to marry Clara but then he sees Coppelius with the telescope and goes violently insane. Nathaniel kills himself and Coppelius tears his eyes out of his head and runs away laughing with them probably planning to use them when making new automatons.
Freud’s analysis.
Sigmund Freud wrote an essay on The Sandman in which he came up with the idea of the uncanny which is also the source of the idea of the uncanny valley.