You need more than just a fancy machine at home if you really want a fantastic morning caffeine shot. Ultimately, you have to get a bit geeky

'There is some cheffing instinct involved," says Jeremy Challender, a remarkably languid character for one whose life revolves around caffeine. But the co-founder of London's Prufrock cafe says that producing great espresso is "no more complicated than making bread". Get a recipe, then adjust it until you hit upon the shot of your dreams.

The coffee served at Prufrock and several other cafes is now so good that despite shelling out £100 on a De Longhi machine, my home attempts are a bitter disappointment. I've come to up my game but the sheer coffee geekery here has me feeling out of my depth. A blackboard advertises a "milk texture" class (sold out) and in the training area, all polished counters and prototype Simonelli machines, Challender casually flings about such befuddling notions as brew ratios, volatile aromatic gasses and TDS (total dissolved solids). Some intense hours later, I emerge with the lowdown on getting the best out of any machine.

The coffee

Decent coffee, like the stuff Prufrock uses from London roasters Square Mile, comes with a roast date. "Between about nine and 11 days after roasting is when we get really excited about the taste," says Challender. Their standard espresso is made from capao, a Brazilian single-origin dark-roasted bean. Dark roasts tend to be more complex, with chocolate and caramel flavours; lighter roasts are more fruit and florals.

The recipe

The drink you end up with depends on water temperature, dose of dry coffee, amount of espresso you're making, the time it takes the machine to produce your shot, and grind consistency. You'll need a small set of digital scales, and a timer to record the recipe.

Temperature

Prufrock's machines are set to between 92C and 96C. Some domestic espresso machines don't hold their temperatures as consistently as commercial behemoths. Perfectionists can find instructions at home-barista.com for pimping machines with a precise temperature control (a PID). Or accept your limitations and get the rest right.

The dose

"We most like the taste of our 30ml double espresso," says Challender, "when it uses 18g dry coffee, so that's what the coffee baskets in Prufrock's machines comfortably hold." A traditional Italian 30ml double espresso is made with a 14g dose.

Extraction and the grind

Challender prefers the coffee when it takes 30 seconds to extract - that's 30 seconds between switching the water flow on and off again. Timing depends on achieving good grind, which requires frequent adjustment as no two batches of beans are the same and even a change to the temperature of your grinder burrs (burr grinders trump blade grinders for evenness of grind, and won't overheat and cook your coffee) will make the fineness fluctuate. You need full control.

Perfecting your recipe

All of the above differs according to your machine, coffee and palate, so experiment. Once happy, keep an eye on the extraction time – if it comes through quicker than usual, your grind's probably too coarse.

Stove-top machines

Mocha pots aren't great, says Challender, but at least use freshly roasted and ground coffee, with filtered, preheated water ("so the coffee doesn't get overexposed to such a humid environment") and clean the pot religiously. He recommends filter coffee, with "plungers, pour overs, siphons, Aeropress etc" using water two minutes off the boil, and 60g a litre for all filter coffees.

Tip for perfection #1: Cleanliness

If the coffee pours unevenly through its spouts, your basket probably needs cleaning. "Oily residue can really taint the taste of a coffee," says Challender.

Tip for perfection #2: Tamping

The hot water will seek easy channels through the coffee so the grains must be uniform for full saturation and an exemplary brew. Collect the right amount in your basket evenly, smooth the surface, then give a decisive, firm tamp.

Tip for perfection #3: Preheat your group head

Before attaching the portafilter (the basket and its handle) to the machine's group head, run the hot water for a few seconds to rinse and preheat it.

… and finally: latte art

Whether you're working with a latte or its smaller, stronger cousin, the flat white, you don't need to aerate the milk as much as you would for a cappuccino. Rather than the whisked-egg-whites effect, you're after what Challender calls microfoam: "glassy-looking milk where the bubbles are so small you can't tell they're there". Always use cold milk. Purge any water that's condensed in your steamer (if your steam becomes watery over time, your machine probably needs descaling). Sit the steamer on the surface of your milk, slightly off centre so the milk starts to flow around it in a circular motion, rather than splattering uncontrollably. After a few seconds, when the milk has risen visibly, quickly submerge the steamer's tip, holding it half-way to the bottom of the jug to heat the milk until the side of the jug gets too hot to touch. A knock on the bottom should make a hollow sound, as perfectly cooked bread does. Use the milk within a minute, before it separates into liquid and foam.

When making latte art, the thing to remember is that pouring milk close to the coffee's surface (about 2cm) will give you enough traction to float your microfoam on the surface. Milk poured from higher (5-10cm above the cup) will sink beneath the surface. First, give the jug a few bangs on your worktop if you see any big bubbles in the milk, then make like a wine taster and swirl it around. Top your coffee cup up to half way to two thirds full with milk before lowering your jug for the floating. Then zoom out again to use your "thin pen" to manipulate the foam you've floated on the surface. Confused? This is something you really need to learn visually and then practice. A lot. Here's a video of Challender making a swan (then doing something fancy with chocolate). And the classic tulip can be seen here. My third attempt looks promisingly botanical but it ain't pretty.

• For details of upcoming courses at Prufrock visit prufrockcoffee.com