I'd encourage looking at battery powered string trimmers.
Black and Decker makes a few. However, I must admit that I have not been impressed with their 12V versions. I've been interested in one of the 36V B&D String trimmers. If you match the voltage of your trimmer with the battery, you should be able to connect it up directly if you wish.
If you wish to make your own, look for an older windshield wiper motor, or other small 12V DC motor.
You can also run your system with an inverter, and normal 110V/220V power. You'll have to match the power requirements with the inverter. Inverters less than 1000W are cheap, but 2000W or 3000W might be better, and can generally be found on E-Bay.
Do you have a solar panel yet?
You can get the flexible panels that are often small with low power generation. Or, you can get larger rigid panels.
A controller?