It's nuts that you started work without agreeing on price beforehand, or agreeing to an hourly rate with an estimated number of hours and permission to continue once you hit that threshold. But since you did, you're now at the predictable result where the cost he imagined doesn't line up with reality. And you'll likely have to decide if your friendship is worth eating a fair amount of your labor costs. Or if the principle of the thing (or your need to actually get paid for the time you put in) wins out and it's worth fighting with him over it and leaving him with the feeling that you ripped him off.
Maybe get him to start his own Pinside thread, and then he can describe the job you did as he sees it and get his own random internet estimates. They're likely to be higher than whatever he's got in mind, and might help bring him closer to your number.