Where are you at? I'd look into the zoning to see if you could even do what you're considering. I know that around here in Michigan, a barn is an accessory building, cannot have plumbing or residence quarters and cannot be built on a lot without a residence already constructed (or in progress at the same time).
Our property is in Southern Illinois. I do believe we can do what I stated. You could probabaly do that anywhere so long as the building on your property is reported to the county authorities correctly as a "Barn Home", not just a Barn. The fees and taxes will be a bit higher, and the building inspection process will be the same as a residence and not an outbuilding. But yes, it can be done.
When I read about the restrictions and taxes imposed upon folks by the states, I thank God we made the decision to settle in Texas. We have built two barns and numerous outbuildings on our place over the years and without asking the governor for permission even once.
Good luck with your project.