I'm new to this stuff but I have an idea and I want to get into new things and expand some knowledge while building something that will be useful in a hobby that I enjoy already. I want to make a variable exhaust by using a valve to control the flow. My idea is to us a potentiometer (TPS) for input and use a servo to control the actual valve. I have never worked with computer stuff before so I'm a little lost at what device I should start with. Even if I was just to make a bench prototype. Should I even use an arduino? Should I use a Raspberry? Also I can't find anything about running the arduino from a 12v vehicle system, is it safe or would I need something to regulate the voltage better.
Start with the valve, then the servo to control it. Any Arduino can be programmed to control your servo. Test that setup and then apply the finished project to your motorcycle, then watch out for heat problems
You are correct, it is not a 12VDC system as many assume. It has a lot of nasties that you have to protect for. There are such things as load dump, double battery jump, low voltage etc. You can look into automotive electronics and find information on these. There is no one answer, all systems are different from manufacturer to manufacturer, model to model.
I doubt you will find a "Load Dump" on a motorcycle.
The crappy voltage on a vehicle is not hard to filter out. It needs a few components and some careful physical layout.
I'm not sure how one would vary the exhaust by a valve but...
Definitely not use a Raspberry Pi. Reason the RasPi's is running an operating system. It is actually a small Linux system. Not good for fast hardware access and is more likely to lock up.
My experience is getting the parts together and seeing how things play together. You can simulate a TPS by a simple pot for bench testing.
Question: Is this replacing what I think of as a throttle? If so you must consider failure modes.
It wouldn't be replacing a throttle so no failure codes to worry about. It is a valve to redirect exhaust. I have one on the bike already but it is vacuum operated and it just doesn't work properly with the engine vacuum.
What exactly is "doesn't work properly"? What do you expect it to do?
Does it work the way it was designed?