Northampton Town will play Rochdale from League One after the draw was made live on BBC 2 on Monday evening.
The tie will be played over the weekend of November 7, 8 or 9.
Manager Chris Wilder, meanwhile, is keen for Kelvin Langmead to go out on loan and get some first-team football under his belt as he continues his comeback from injury problems that have all but sidelined him since March 2013.