This is a good middle ground. Alternatively, you can charge an incredibly small amount for the book, like $1. Even asking for donations when you download the book suggests greater worth, in my mind.
This is exactly what I did with my first book. It is available for free on Leanpub, but I charge minimum for Kindle/print using Amazon KDP.
I just wanted to get my message across and learn something on the way. It also sells relatively well, but that is a side-effect of my initial intentions :)