I want to change my thesis topic (to the extent that the ethos is still in tact) but my advisor does not agree. What can I do? I am doing a phd where my aim is to solve a problem A which is very interesting. My supervisor has got a lot of connections in a technology B and he claims to be an expert in B. I came to this group because of these accomplishments. But soon I realized that B is not really a great technology for A. 

So in my phd proposal I proposed a method which encompasses B but is more general (say R). Now I realize that I do not want to use B at all because my preliminary results are not encouraging. In fact, I am inclined to use E as a base technique which does not have any impact on R.  But my supervisor, who is interested in only publishing in B  and frowns upon everything else (it was a nightmare to convince him to let me work on R) is dead against it. He says that he is an expert in B and his vision of the group is not inclined with me trying other things.

There are other professors in my university who have worked in E and could collaborate but my supervisor won't collaborate with people from outside his kingdom. I also know professors from outside my university who could help me if needed. I could knock the doors of school committee in order to  help me but that would create a lot of problems as my supervisor wields a lot of power and influence everywhere.  

Another query is, is it ethical to collaborate with people outside the university (of course after letting my supervisor know) for my PhD work. My Masters supervisor would be happy to help me out.

Edit: After looking at comments, I am thinking that after all, it is MY PhD. Yes, I have spent 1.5 years, but 1.5 years is left. Why should I spend any moment of my life on something I find to be not exciting, particularly less exciting because it is forced on me. And in those 1.5 years I learnt to write well and also learnt 'A' which is important. Its not total waste. My supervisor has his agenda, and why should I give up mine to make him happy? His vision is fine, but he does not have the right to force his vision on me.
The problem that you are facing is that your supervisor is not necessarily wrong to say:


  He says that he is an expert in B and his vision of the group is not inclined with me trying other things.


As hard as this sounds, as the head of a research group one needs to make sure that the people in the group follow some sort of unifying theme or vision. Otherwise, it is basically impossible to build any sort of profile. I am personally not a big fan of visions that resolve around a specific tool rather than a problem set or topic, because this often leads to the kind of research that boils down to "we have a hammer, and use it to punch whatever problem we can think of", but unquestionably a lot of research groups work like that. It also makes sense on some level, because in many fields techniques are more difficult to master than learning new problems and application domains, so it makes sense to keep the thing constant that is hard to learn and vary the things that are easier to get into from scratch.

Realistically, if 'B' is actually useless for your project, and your supervisor is adamant that you need to be using 'B', you can either change what you are trying to accomplish (the 'A' in your terminology), or change supervisor. That being said, depending on what you mean with 'preliminary results', this seems far from obvious to me.


  Another query is, is it ethical to collaborate with people outside the university (of course after letting my supervisor know) for my PhD work. My Masters supervisor would be happy to help me out.


Ethical? Sure - but that does not mean that your supervisor needs to be happy about it or let you do it if (s)he perceives that your main work suffers from it. Look around on this site on the topic of side projects - this has been discussed a number of times here.