HELOC Interest Deduction Mixing Personal & Home Improvement

I'm having a hard time getting a straight answer and hopefully this community can help.  I opened a HELOC and used $14K of my HELOC for solar panels.  The interest on that is tax deductible from what I understand.  Now let's say I take out another $5000 in the same HELOC for non-home improvement things (paying down high interest debt, etc.).  Now I'll be mixing a home improvement project with a non-home improvement project in my HELOC.  How do you calculate the interest that's tax deductible?

 

Or should I open 2 HELOCs--one for home improvement and one for not?