Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain > FB Software


Reply
 
Share Thread Tools Display Modes
Old 12-29-2008, 02:22 PM   #1
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
New Project Help

Hi All. Hope everyone had a great Christmas.
My latest project is for a car that I am building from scratch. It started as a pile of tubing and some scribbly sketching on a table. I'm using a Ford 302 and a T5z 5 speed manual transmission. What I would like to do is to shift the trans electrically. I thought of using stepper motors but I know that they can forget where they are if stalled so I think I will use a geared 24v motor. The trans uses one shaft to shift. The shaft moves fore and aft or rotates to position the gears. I plan on using opto switches to provide feed back for shaft position.
So ... 3 opto switches to indicate rotation. SR1, SR2, SR3.
3 opto switches to indicate fore and aft position. SL1, SL2, SL3.
1 opto switch to indicate clutch position. SC1
1 opto switch for UP shift. SU1
1 opto switch for Down shift. SD1
1 MO pushbutton switch for Reverse. SREV1
2 electrically actuated Micro Clutches (common in printers) EC1, EC2
1 speed sensor signal fron rear wheel for Reverse and "No you really don't want to down shift to 1st gear at 60 mph"

Neutral would be SL2 and SR1 or SR2 or SR3. (the fore and aft center position is neutral regardless of rotation)
1st gear would be SR1/SL1
2nd gear would be SR1/SL3
3rd gear would be SR2/SL1
4th gear would be SR2/SL3
5th gear would be SR3/SL1
Reverse would be SR3/SL3

Now a very important note: the shaft must be in position SL2 before the shaft can be rotated.

How do I move the shaft? I use a dc gear reduction motor coupled to a shaft. The shaft has two micro clutches, one for SR and one for SL. Power is transmitted to the shifting shaft in the trans by timing belts. Rotational force uses a splined shaft (so it can slide back and forth) and the fore and aft force uses a lead screw and nut.
Power up the motor, energize EC1 and the shifting shaft rotates, energize EC2and the lead screw nut turns which causes the shaft to move fore or aft.

So after powerup of the system (before engine start) push in the clutch (SC1 ON) and the shifter initializes by going to the SR1/SL2 position (neutral and positioned for 1st gear). Now how it does that depends on where the trans was on shutdown.

If the trans was in 1st gear it would go like this:
Clutch in
Motor - On, Clockwise
EC2 - ON until SL2 turns ON then EC2 OFF
Motor - off
Neutral indicated on LCD screen

If the trans was in 2nd gear:
Clutch IN
Motor - ON Counter Clockwise
EC2 - ON until SL2 turns ON then EC2 OFF
Motor - off
Neutral indicated on LCD screen

To shift into 1st from neutral:
Clutch in
Motor - On, Counter Clockwise
EC2 - ON until SL2 turns ON then EC2 OFF
Motor - off
1st gear indicated on LCD screen

To shift from 2nd to 3rd:
Clutch IN
SU1 - Momentary ON (or could be latching if it would makes things easier)
Motor - On, Clockwise
EC2 - ON until SL2 turns ON then EC2 OFF
Motor - off
Motor - On, Counter Clockwise
EC1 - ON until SR2 turns ON then EC1 OFF
Motor - off
Motor - On, Clockwise
EC2 - ON until SL3 turns ON then EC2 OFF
Motor - off
3rd gear indicated on LCD screen


And so on. You can see that the direction of the motor may have to be changed up to 3 times in one shift. I could possibly use 2 motors but space is limited.

So now my questions.
Can the brain handle this?
Any suggestions on how to word the logic section of the code ( or any of the code for that matter)?
Do I need to use an opto isolator or can I just hook them to the analog inputs direct?
Just in case a shift gets stuck (or maybe looses power) I need a way to cancel the shift and go back to neutral, both automatically maybe based on current draw or manually by pushing a button (maybe on the LCD screen).
Any help would be appreciated and when this is project is up and running I'll post all the info I have.
General thoghts?
Phone # of a good shrinK
quick503 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 12-29-2008, 04:01 PM   #2
Constant Bitrate
 
Join Date: Jun 2008
Location: Georgia, USA
Posts: 172
Dan2008 is an unknown quantity at this point
Quote: Originally Posted by quick503 View Post
...Phone # of a good shrinK

1-800-nuts-r-us

Seriously, that is an ambitious project. I don't have anything to offer as far as coding goes, but I do have a suggestion.

You might consider some sort of throttle-limit switch just in case of a missed shift. That would keep you from spilling 302 guts all over the road due to over-revving (translate: been there, done that).
__________________
Thanks,

Dan
Dan2008 is offline   Reply With Quote
Old 12-29-2008, 04:11 PM   #3
Constant Bitrate
 
mx270a's Avatar
 
Join Date: Aug 2003
Location: Iowa
Posts: 167
mx270a is on a distinguished road
I use a FB to control steering on a farm tractor. I have two relays, each going to one side of a solenoid that controls a hydraulic valve. I also have a sensor to tell me what angle the steer axle is currently at. All I do is feed a target steer angle to the logic and it will issue left or right commands to get the steer axle to that target point.

Personally, I'd use two potentiometers to determine where the shifter is currently. Seems easier to read two inputs to determine the location than to read through the 6 switches.
mx270a is offline   Reply With Quote
Old 12-29-2008, 04:27 PM   #4
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
Over Rev protection sounds like a great idea (not that I have EVER missed a shift ).
Using pots sounds like a good idea. I just wonder how temperature will effect the readings. The temperatures could go from below freezing to 150 degrees or so.
quick503 is offline   Reply With Quote
Old 12-29-2008, 07:03 PM   #5
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
I know I'm getting this wrong. Can someone point me in the right direction? I want to use an analog input to turn the output on or off. If the analog input "sees" more than 4v (but less than 5v) then the output would turn ON ... less than 4v then OFF.
This is what I have so far.

<!-- Begin Digital Output Instances -->
<iochannel id="Output0" port="0" brain="My Fusion Brain 0" type="digital_output">
<defaults defaultstate="off"></defaults>
</iochannel>
<!-- End Digital Output Instances -->

<!-- Begin Analogue Input Instances -->
<iochannel id="Input0" port="0" brain="My Fusion Brain 0" type="analogue_input">
<options history="0" auto_average="false"></options>
</iochannel>
<!-- End Analogue Input Instances -->
</io>

<logic>
<!-- Begin Logging Setup -->
<all_logging>
</all_logging>
<!-- End Logging Setup -->

<!-- Begin Variable Declarations -->
<all_variables>
<variable name="Variable_Analogue_Input_0">0</variable>
</all_variables>
<!-- End Variable Declarations -->

<!-- Begin Logic Declarations -->
<all_statements>
<if fire_on="logic" minimum_delta_vote_time="100" id="Logic for Analogue Input 0">
<parameter1>
<boolean_operation type="greater than">
<parameter1>
<variable do="get" name="Variable_Analogue_Input_0">
</parameter1>
<parameter2>
<number>4</number>
</parameter2>
</boolean_operation>
</parameter1>


</if>
</all_statements>
<!-- End Logic Declarations -->
</logic>
quick503 is offline   Reply With Quote
Old 12-30-2008, 04:44 PM   #6
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
Couple of more questions. If I change the software by editing the xml file when does it take effect? Do I need to remove power from the FB (reboot it)/
If I use the configurator to add just a digital output to be default "ON" should I be able to read 12v on the output pins?
Thanks
quick503 is offline   Reply With Quote
Old 12-30-2008, 04:54 PM   #7
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
You are on the right track, but you want "if input X is greater than Y volts", and what you have is "if variable Z is greater than Y volts".

So change that variable to the input you want. Also are you editing that manually?

All that statement will then do is check if the input is greater than 4v. If it is or isnt, it will go woohoo and move to the next statement. To make it turn on/off an input you will need to add some then and antithens.

So the then would be when it evaluates true, so turn output ON.
The Antithen would be when it evaluates to false, so turn output OFF.
2k1Toaster is offline   Reply With Quote
Old 12-30-2008, 04:58 PM   #8
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
Quote: Originally Posted by quick503 View Post
Couple of more questions. If I change the software by editing the xml file when does it take effect? Do I need to remove power from the FB (reboot it)/
If I use the configurator to add just a digital output to be default "ON" should I be able to read 12v on the output pins?
Thanks

To make changes all you need to do is restart MDX.

If you make an output have default on, then as soon as MDX starts, that output will turn on. The LED will light if the jumper has not been removed. The output pins will be whatever power voltage on the DC Jack all the time (regardless of output state). If you are powering via USB, and have no DC jack connected, no voltage will appear on the output pins. When an output turns on, the ground pin activates and completes the circuit turning things on.
2k1Toaster is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 12-30-2008, 05:27 PM   #9
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
I just tried using the configurator and Ninja Kitty to make an xml file. I added the Fusion Brain and one digital output. I set the default state to ON but it wouldn't keep the setting so I edited it manually. I started MDX but no light. I do have the 12v power supply attached. I need to get this to work so I can have someplace I can go to to say "I know this works" when trouble shooting. Do you have any experience using opti sensors? Also can I use the 5v pin on the analog input to drive the signal high?
quick503 is offline   Reply With Quote
Old 12-30-2008, 05:53 PM   #10
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
OK, I used this in the Logic area and it worked.

<all_statements>
<if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
<boolean_operation type="greater than">
<parameter1>
<analogue id="SC1" time="0"></analogue>
</parameter1>
<parameter2>
<number>4</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="D0" vote_opinion="On" vote_priority="High"></do>
</then>
</if>
</all_statements>

I can't seem to figure out how to get the anti-then part. Do you do another <if>, </if> section but use "not"?

<if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
<boolean_operation type="not">
<parameter1>
<boolean_operation type="greater than">
<parameter1>
<analogue id="SC1" time="0"></analogue>
</parameter1>
<parameter2>
<number>4</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="D0" vote_opinion="off" vote_priority="High"></do>
</then>
</if>
quick503 is offline   Reply With Quote
Old 12-30-2008, 06:15 PM   #11
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
OK, got it. Here it is for others who might be struggling like I am.

<all_statements>
<if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
<boolean_operation type="greater than">
<parameter1>
<analogue id="SC1" time="0"></analogue>
</parameter1>
<parameter2>
<number>4</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="D0" vote_opinion="On" vote_priority="High"></do>
</then>
<anti-then>
<do function="Trigger Output" functionTargetID="D0" vote_opinion="Off" vote_priority="High"></do>
</anti-then>
</if>

</all_statements>
quick503 is offline   Reply With Quote
Old 12-30-2008, 09:54 PM   #12
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 8,862
2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future2k1Toaster has a brilliant future
Quote: Originally Posted by quick503 View Post
OK, I used this in the Logic area and it worked.

<all_statements>
<if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
<boolean_operation type="greater than">
<parameter1>
<analogue id="SC1" time="0"></analogue>
</parameter1>
<parameter2>
<number>4</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="D0" vote_opinion="On" vote_priority="High"></do>
</then>
</if>
</all_statements>

I can't seem to figure out how to get the anti-then part. Do you do another <if>, </if> section but use "not"?

<if fire_on="logic" minimum_delta_vote_time="100" id="Root Function #">
<boolean_operation type="not">
<parameter1>
<boolean_operation type="greater than">
<parameter1>
<analogue id="SC1" time="0"></analogue>
</parameter1>
<parameter2>
<number>4</number>
</parameter2>
</boolean_operation>
<then>
<do function="Trigger Output" functionTargetID="D0" vote_opinion="off" vote_priority="High"></do>
</then>
</if>

To do antithen, the icon right beside then is what you want. You can do it with another if statement, but it takes more code and makes things harder to debug later.

-- Nick
Sent from my HTC Touch Pro
2k1Toaster is offline   Reply With Quote
Old 12-31-2008, 09:55 AM   #13
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
I figured out how to control an output using an EE-SX1235A-P2 Photomicosensor. But I still haven't got an answer as to whether or not the FB and software will be able to do what I need. Am I barking up the wrong tree?
quick503 is offline   Reply With Quote
Old 12-31-2008, 10:37 AM   #14
Fusion Brain Creator
 
Join Date: Mar 2005
Posts: 2,197
greenman100 is on a distinguished road
Quote: Originally Posted by quick503 View Post
I figured out how to control an output using an EE-SX1235A-P2 Photomicosensor. But I still haven't got an answer as to whether or not the FB and software will be able to do what I need. Am I barking up the wrong tree?

You're not, we're just not sure what your question is, specifically?
greenman100 is offline   Reply With Quote
Old 12-31-2008, 10:39 AM   #15
Newbie
 
Join Date: Dec 2008
Posts: 15
quick503 is an unknown quantity at this point
I was referring to the senerio and questions in #1.
quick503 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Project announcement for mini keyboard and trackball combo AngryMan Input Devices 18 07-26-2006 10:50 AM
DIN compatable PC project don-m Worklogs 4 10-23-2005 11:11 AM
New Project: Contrast Mediaplayer pplante Software & Software Development 26 07-07-2004 12:06 PM
Hello!! CarPC project pics inside. bobbykokinos Newbie 11 03-29-2004 12:44 PM
RLion Project Webpage Reactor General MP3Car Discussion 0 02-18-2004 06:43 AM



All times are GMT -5. The time now is 08:33 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics