How about using Solar Panals to provide the electrical power to separate the H2 from the O? H2 would be fed into the engines carburator like a gas/air mixture ratio, but H2/air mixture ratio instead. How would you control the exact measurements?
H2 has more energy per weight – but requires twice the volume of fuel. It is unsafe to transport as a liquid or gas (usually in a carrier medium of some sort) Solar panels are expensive (low output per $) and expire after some use. They are dirty and energy inefficient to make too. However: hydroelectric, wind, and sea technologies may offer some improvements in costs with oil prices as high as they are.
It's a great idea, but there are problems. The first is that hydrogen is very difficult to control; it is a small molecule, and very slippery. It is difficult to handle from that perspective; Teflon tape and other common plumbing techniques just don't cut it. Secondly, once you have the hydrogen, you'd have to compress it in order to put it into a cylinder of some sort. This takes electrical power, and in turn is wasteful. Compressed hydrogen storage has is own risks, including hydrogen embrittlement, and the peculiar nature of hydrogen (including having an invisible flame, and a remarkably wide flammable range) makes it quite dangerous. After all, relatively safe products such as propane gas and butane lighters- well-established and very common- are surprisingly dangerous, causing injuries and fatalities each year. In order for something that is more dangerous (hydrogen) to come to market as being a hydrolysis product, either the products will have to be home-made (and therefore more dangerous), or very expensive.
It's an idea that will be done someday. But right now the problem is that there are much cheaper ways to get energy and run cars. So no one would use this one, because it just costs too much. As other sources of energy get costlier, and we figure out how to make solar panels better and more cheaply, this will be done. The best way known now to use the hydrogen in a car is to put it into a kind of electricity generator called a fuel cell. Then the electricity runs an electric motor. Controlling the measurements into the fuel cell is pretty easy just with a simple flow meter.
Currently solar panels are rated at about 5 percent efficiency. That means that about 85 percent of the solar energy that is falling on it, is wasted. Electrolysis is also about 67 percent efficient. So the TOTAL amount of solar energy you would have converted into hydrogen is 67 percent of 5 percent. Using my calculator that comes out to: about 0 percent total efficiency. About 90 percent of your solar energy gets wasted in the process. A better alternative to solar panels would be solar powered sterling generators. Sterling engines are EXTERNAL COMBUSTION engines, like the old fashioned steam engine, and can be run off any heat source - including the sun. Heat from the sun is focused using parabolic mirrors, and the efficiency of a sterling engine / generator combination is rated at about 30 percent. Your TOTAL efficiency - both solar sterling and electrolysis combined - would be around 20 percent. If you are dead set on using hydrogen? Even though there are better alternatives? Such as alcohol? Then I would suggest storing it in titanium dioxide pellets. This way you can store the hydrogen, without it being in danger of exploding. You can ALSO ram a hydrogen container like this into a solid brick wall. Once again? Without fear of an explosion. Numerous studies have been conducted on this. As for controlling the exact measurements? Nothing in the air-fuel ratio of a car - - or the timing - which you are also going to have to change - needs to be exact. A good enough approximation will do. As for how you get your measurements? You need to compare the density of gasoline vapor with hydrogen gas. A comparison of the molecular weight of gasoline - - as compared to the molecular weight of hydrogen - should get you started in the right direction for this.