Patents are vehicles useful in commerce.
You have a good idea. Whether you need a patent depends greatly on the facts of your particular circumstances and, in particular, what you hope to accomplish with your invention. Patents are granted for novel and non-obvious compositions of matter, processes and methods, instruments, machines, software driving machines, etc. Without discussing your particular goals there is no simple answer to the question of whether you need a patent. Ultimately, whether a patent is valuable depends upon your success in commercializing your invention, and how well your patent protects your final products.