Everyone has a favourite Katie Morag story.

The adventures of the red-haired heroine who resides on the fictional Isle of Struay have been a staple of Scottish bedtime reading for the best part of three decades.

As we huddle out of the cold, sipping coffee as thick as tar and watching sheets of driving rain sweep across the rugged Hebridean landscapes, Mairi Hedderwick is recounting how she first breathed life into the feisty tomboy whose antics are set to captivate a new generation.

A few metres away, a television crew is in the process of adapting her books for a CBeebies series which will air early next month. It's a day which, for Hedderwick, has been a long time coming.

"Everyone says it's the 30th anniversary, but I had Katie Morag for four years - with half the synopsis and some drawings done - before she was taken on by a publisher," she recalls. "So, I know she is at least 32 years old - if not older."

Hedderwick's books were first optioned by Scottish filmmaker Don Coutts in 1997 and developed as an animated series. In 2005, Coutts, the director of the acclaimed romantic comedy American Cousins, announced he was working on a live-action adaptation of Katie Morag, to be filmed on the Isle of Lewis, in which ITV had reportedly expressed an interest.

But it didn't come to fruition, production rumoured to have stuttered due to similarities with another children's TV series then enjoying soaring popularity, Balamory, which was also set in a small Scottish west-coast island community.

The plans were shelved, but three years ago Coutts and his wife Lindy Cameron, who co-own Cromarty-based production company, Move On Up, took their pitch to CBeebies. The BBC gave the project the go-ahead, commissioning 26 episodes last November. In April, eight-year-old Cherry Campbell from Glasgow was named to play Katie Morag, with filming taking place in Lewis between May and August.

Which is how we find ourselves reminiscing about the indelible part Katie Morag has played in Hedderwick's life. While Lewis will provide the backdrop for the television series, it was another Hebridean island, Coll, that inspired her books. She first arrived there "purely by accident" as a 17-year-old in the summer between leaving school and starting art college after spotting an advertisement for a "mother's help" in the then Glasgow Herald. For Hedderwick, it couldn't have been more different from her upbringing in Gourock, Inverclyde. "Here was this way of life where you had to fill the oil lamps first thing in the morning, get milk from a cow and go to the well with a bucket for water," she says.

But even as a young child Hedderwick, 74, always had an inkling she would one day fall in love with island life. "Our house looked onto the basin of the Clyde and every Friday at 9.30am a boat would go past," she says. "I was told it was going to 'the islands' and I always wanted to go there. It was explained to me that, looking across the Clyde to the hills of Cowal, that's where the islands were. This was long before I learned to read maps, so over the hills and faraway - something dropped in very early on."

That first summer was to spark an enduring relationship with Coll, Hedderwick raising her own family on a croft there. "We had eight breeding cows and 70 draft ewes. It was an idyllic time and a wonderful way to bring up children," she says.

Hedderwick was illustrating children's books when an editor suggested she write her own. From the seeds of her imagination sprang the fiery-haired Katie Morag McColl and the glorious Isle of Struay.

The youngster lives above the island's only shop, where her mother is the postmistress. Fiercely independent, Katie Morag can typically be found in her trademark white jumper, kilt and wellies. Her best friends - and role models - include the polar opposites, Grannie Island and Granma Mainland. Grannie Island wears dungarees and drives an ageing tractor, while Granma Mainland is always dressed up to the nines.

The magic of Hedderwick's books lies in her mesmerising, intricately detailed illustrations. But in 1984, when the first one was mooted, full colour reproduction was hugely expensive and almost proved a deal-breaker for US publisher Viking which, alongside Birlinn, had invested money.

Nor was that the only stumbling block. An illustration of Katie Morag sitting on her grandfather's knee raised eyebrows, with fears it could be construed as inappropriate. "It originally wasn't a granny who was Katie's best friend, it was a grandfather who was roly poly, smiley and called 'Grinpa,'" says Hedderwick. "They [the US publishers] were a bit uncomfortable. America was leading the way with political correctness. They said they weren't happy with the intimate relationship the little girl had with her grandfather. When you look back now it all seems ridiculous, but that was the deal."

She hatched a shrewd but simple solution. "I'd done quite a lot of the art work so I changed the head and the old grandfather, who drove the grey Fergie tractor in his dungarees and green wellies, became 'Grannie Island'. Out of it has come this wonderful character who, over the years, has taken on a persona that I don't think a grandfather could have."

To her surprise, Hedderwick found herself unexpectedly hailed for her bold feminist statement. She smiles, shaking her head at the memory. "We had our croft and, heavens, I drove a tractor. Women drive tractors in rural areas," she says. "That's why, when I got the chance to do another book, I deliberately created the other kind of female, just as a kind of laugh at this feminist acclaim I'd been given."

And hence Granma Mainland "with all the make-up and the high heels" was born. "She's actually my mother," Hedderwick reveals. "My mother wasn't a rural person. When she came to the island she always had on her good court shoes as she stepped off the boat, wearing her turquoise bobble tweed coat with the fur collar. Granma Mainland is a wee bit of a memory of my mother."

The favourite of all her books, says Hedderwick, is Katie Morag And The Tiresome Ted because "as a big grown-up lady I kicked my teddy into the sea in a bad mood one day". While she refuses to elaborate on exactly how that episode came to pass, it did ignite the idea for a tale about sibling rivalry which sees Katie Morag welcome a new baby sister.

"I'd set that up in the previous story because Mrs McColl was very pregnant," she says. "You are seeing her full-term and, for me, that would be a talking point for children, looking at the illustrations and asking: 'Why has Mrs McColl got a very big fat tummy?'"

But when she presented Katie Morag And The Tiresome Ted for publication in 1986, Hedderwick was stunned to be told it might be too graphic for children. Her editor was uncomfortable with an illustration of Mrs McColl breastfeeding her new baby.

But Hedderwick stuck to her guns and it went in - but not without provoking some controversy. One American library felt compelled to take a marker pen to the image. Nor were they alone. "There were two libraries in Glasgow I know of who refused to stock that book because of Mrs McColl's naked breast," she says.

She was vindicated in 2007 when NHS Highland asked if they could use the illustration in a campaign to promote breastfeeding. Another book, Katie Morag And The Two Grandmothers, is part of a geography unit for six- and seven-year-olds in English schools called "an island home".

While Hedderwick has previously said she would be "quite happy if the character only remained in books", she conceded it was "high time that I let go of Katie Morag" and is looking forward to seeing her creation brought to life on the small screen. "I was totally against animation," she reiterates. "To me, Katie Morag is a real little girl. She is not a cartoon or comic character."

Given its target audience and geographic location, the comparisons with Balamory are inevitable but Hedderwick deftly bats them away. "Balamory was created for television, but this production is based on books which have been on the go for 30 years," she says. "There was no way when I created Katie Morag all those years ago I was thinking: 'This should be made into a film or television series.' I loved being able to show a way of life that many urban children hadn't a clue about."

The cast includes Barbara Rafferty as Granma Mainland, Ann Louise Ross as Grannie Island and Angus Peter Campbell as Neilly Beag. Lindy Cameron, an executive producer on the series, said her vision is for a "Waltons feeling" when viewers tune in to Katie Morag. "I loved that show as a child," she said. "The tingle I got at the end of watching an episode - that's what I'm hoping for with this."

While she and Coutts, who formerly co-ran Scottish indie Big Star In A Wee Picture with Stuart Cosgrove, have adapted all of the existing Katie Morag books for the 26-episode series, they did have to create some additional stories. But Cameron maintains that the television version will remain true to the essence of Katie Morag. "It's important that you are authentic - it's Mairi's creation and imagination," she says. "I remember calling her up and asking: 'What shall we call Neilly Beag's boat?' because it wasn't ever named in the book, then having this hour-long conversation."

Beside her, Hedderwick nods. "I don't think I imagined I would get this much respect," she says. "I thought right from the beginning that I had to let it all go and not get involved." The author describes watching filming take place on Lewis as like seeing a "pop-up book" of her stories created. Unsurprisingly, Hedderwick's books have prompted an influx of visitors to Coll over the years. Not least one little boy who arrived off the ferry and, when he couldn't find Katie Morag, promptly stamped a tiny foot and burst into tears.

"That can be quite difficult to handle , although I'm ruthless with children," says Hedderwick. "It's silly otherwise, she is enough of a fantasy in the books. I give them great, long lectures about what it's like to be an author. It's helping them understand what a book is.

"It doesn't fall out of the sky; there is someone who sits at a desk and thinks up the story just like they do. I've got a bossy editor like they've got a bossy teacher. That might be a bit disillusioning but, for me, it's the right thing to do."

Hedderwick, who now lives in Inverness-shire, has a letter pinned up in her study, addressed in a child's hand to "Katie Morag, the Post Office, Isle of Struay". Even after all this time she still treasures the full postbags which arrive each year.

"Some of the letters are addressed to me, some to Katie Morag," she says. "I keep them all - it's getting to be a big pile. It's a writing exercise the teachers give the children. They do the project in the term between Christmas and Easter so around that time there are mounds of letters. I don't reply to them all individually, but I do write to the class."

Hedderwick laughs when asked if she does that as herself or Katie Morag. "Myself - I think I would go mad if I was writing back as a child." n

Katie Morag will start on CBeebies on November 3.