Hello all,
In need of some advice. I am in the process of designing a system for my boat that would allow me to change my controls over to fly-by-wire. I know some boaters will say that it makes my boat less bullet proof but i would disagree but none the less that is for a different topic. What i am questioning is the setup that i would like to use i am wondering if i will be taxing a single mega too much that it won't be able to preform properly.
So lets start with my boat. It is a twin engine dual helm boat. The engines are gas and they are stern drive mercruisers. To be exact mercruiser pre-alphas attached to gm 250 inline six engines.
What i am looking to accomplish. I want to monitor the engines and control them. realistically there is not much to that. I only have three things on the engine i need to sense and to servos to control the engine. But now multiply it by 2.
Basically it would break down like this:
Monitor engine speed (tach driven by coil pulse)
Monitor coolant temp (single wire sensor measured by voltage divider)
Monitor Oil pressure (single sire sensor measured by voltage divider)
Control servo for Throttle
Control servo for Out drive shifting
Servo for throttle will be controlled with a rheostat
Shifting will be done with three push buttons
Helm selector with push button
Push button for engine sync
Now multiply that all by two!
I did have a thought of braking down monitoring and control of each engine to a total of 4 chips, one for monitoring one for controlling on each engine. I would like to stay away from this if i can for two reasons. If possible if it was all on one board i could in theory piggy back two ecm's (thats what i will call the megas) in parallel but separate out the power such that if one failed all i would have to do would be to power down one and power the other up and i would be back in working order. The other advantage that i could gain would be that i could develop my engine sync control. Engine sync would allow both engines to be speed synchronized within a set tolerance of each other and controlled with only one throttle control. this feature can be really nice while on longer cruises.
So advice... would one mega be able to handle this?
I totally understand the statement about only running one line at a time, that was more what i was wondering about processing power, i am trying to figure out how much latency?* (lag) i will experience in my cycles. But i guess the only way to find out if its going to work is to try it... well at least set up a trial.
As for redundancy i am going to keep the install easy to be able change out servos easily. Realistically this way would end up with redundancy where right now if i broke a control cable there is no back up, minus sit on top of the engine and do it manually, which can still be done with the electronic system.
I really like the thought of this because because i can add in safety feature of only allowing one helm to be active at a time, found out yesterday as the sister-in-law bumped the throttle handle on the flybridge while i was trying to set the anchor.... let just say my kill switches work great, and our anchor was set very firm....
for the record though, the Arduino is a "microcontroller" not a "microprocessor". the difference is that it only handles one instruction at a time.
No that is not the difference. For a long time microprocessors had only one core and only did one instruction at a time. It is only quite recently there has been multi core processors ( when you get to my age quite recently is about 10 to 15 years ).
The thing about a microcontroller first off is that it is a Harvard architecture machine, that means the program space and the data space are separate. You can't go executing instructions that you stored as data. Next all the units of a computer system are integrated into one chip. That is the program memory, data memory, CPU and peripherals (timers, A/D and so on ) are all on the same piece of silicon.
A microprocessor on the other hand has a Princeton architecture, where the data space and program space are one and the same thing. One of the very early programs I wrote on a microprocessor was one to take bytes and use then to define tones. But the data bytes I used were the bytes of the code doing the conversion. It sort of played itself. All the units of the computer are separate and use an external parallel data bus.
For servos for the shifting, they will require the most force i am looking into window wiper motor servos. They look pretty rock solid. as for throttle its a butter fly valve on a carbs, no force there.
As for safety i have come up with lots of tid bits that i want to add. First to switch helms you have to hold the helm selector switch, which will be momentary, at the helm you are wanting to operate for a couple seconds. While doing this the throttles will have to be brought to idle before the controls will activate, still on the fence about making it have to be in neutral before it will allow helm change.
This might be a better question for else where but i figured i would start here. I understand functions and how to use them but do they offer any processing advantage or disadvantage when running?
Have not found a good answer to that, just seems to be that most people like them to help keep their code organized or to call the same process in different way or times.
I understand functions and how to use them but do they offer any processing advantage or disadvantage when running?
No. But they make the code a lot easier to read and write, and also are more efficient in terms of code space.
Thanks Mike, that's what i was gathering just wanted to make sure i didn't miss anything.
i started a build thread so we will see how this goes.
@tallguy64:
I do not spend as much time in these forums as I did once, but that being said to set the tone...
This forum used to have an unwritten rule about not assisting in automobile projects that involved personal liability; such as steering, engine, transmission, or breaking, Etc. Projects about engine monitoring, acceleration, deceleration, etc. were OK.
Now, I'm not a mouthpiece for this forum and I have no legal training but you may want to give some thought to the liability issues you are dancing with....
- modifying any controls (steering, speed, fuel) may invalidate your property & liability insurance even if such modifications are made to enhance the specific control functionality.
- other than insurance, modifications may run afoul of local, state, or Federal laws.
Ray