I need some input to solve an issue with my EV conversion

Hi this is my first post on the forum, so first some background info. I live on the island of ARUBA. I am not yet into robotics, but since about 3 years ago I have become very involved in using and promoting renewable energy. I currently produce 100% of my home energy( 55-60 Kw Hrs/day) from wind and solar, using a grid tied and a off grid battery storage system. Now that I have all that working the way I want I started my next project which is converting a ICE vehicle into an all Electric Vehicle. So far this project is coming along quite nicely. Now, here is the part where I am very sure I have come to the right place for.
The car I am converting is a 1999 Smart ForTwo. This car actually has a manual gearbox and clutch, but it only has 2 pedals like an automatic, and drives just like an automatic. The clutch is operated by an electric motor, there is also a shifter motor that changes the gears as you are driving. All of this is controlled by the ECU. Since I will not be using the internal Combustion Engine and its ECU anymore I basically have no way to shift gears. Now normally you don’t shift gears to much in an electric vehicle except when going from city to highway driving, so I will have to shift every so often, but I will not be using the clutch any more After taking the gearbox apart, and doing a lot of research I figured out that the shifter motor is a PMDC brush motor that through double gear reduction(36:1) turns a cylinder that has 3 grooves in it that move the gear selector levers. This cylinder has a range of about 350 degrees and also has a small shaft with a 5K potentiometer attached on the outside of the gearbox. The motor itself has 6 wires to it with the outside 2 wires being the 12 V power wires, and 4 smaller wires. The motor draws about 6 Amps when shifting thru the gears, and 25 amps when it is stopped by reaching the groove ends in either direction which I am sure is not supposed to normally happen. The 5K pot has 3 wires and I attached 5 volts across the outside 2 and have recorded the voltage from the center tab for each gear position. I will post these values if you need them, but they are basically 8 values ranging between 0.50 and 4.85 volts. I tried doing something with limit switches, but most of the time it under/over shoots the correct position that I need, and the motor does not hold the position, so it slips out of gear. Since I am new to servo’s I need some input on what I need to set this up so I can somehow select a gear number and have the motor go to the correct position and stay there until I want to shift again. I will greatly appreciate you suggestions on what equipment I will need and any other input you can give me. Thankyou

Hi, I have waited a few days, but still no reactions, Do I have to supply more info?? Just ask and I will deliver. Do you need pics. No problem. What i would like is to find out what kind of hardware would work for me and some guidance in how to set it up. just lead me in the right direction and I will fine tune it to do want I need, of course with some occasional help from my new friends. Just think of my soon to be Smartcar EV as a future Smartbot transformer that runs on enviromentaly friendly solar energy. Come on people, help me do my tiny part to help our planet by shifting from fossil fuel to driving on solar power.
WOW, As I was writing this my son was brought home by his friends because he fell while skateboarding and he said he sprained his ankle. he asked me if I had an Ace bandage to wrap it so he could go back to hang with his friends. I said no way, you are going to the ER. Sure enough, he had fractured his fibula, and also chipped another bone in his ankle. Thank God that’s all it was. As a parent you are always worried about your child being in a serious car wreck or something, so in that respect what happened is not that bad. I hope somebody can give me some ideas here for my project. Thank you.
Sunxxpress

Well, your project really doesn’t have much to do with lynxmotion products. That being said, I’d suggest you disassemble as little of the tramsmission as possible. You need to figure out what was sent from the ECU to the transmission, and duplicate that to some extent. I’d shoot for having a toggle switch or rotary switch mounted on the steering wheel to change gears. You might find some info in the arduino forum below as there some projects there concerning engines and ECUs.

arduino.cc/forum/index.php

Hi Robot Guru, thank you for your reply. I actually do believe that lynxmotion products are what I need. I did a massive amount of research on the web before I decided that this was where I had to be to find a solution. Just to clarify, disassembling the gearbox was the first thing I did. This is what I am good at. I used to drag race profesionally in the IHRA Pro Stock class. These are cars powered by 1850 HP 820 Cubic Inch V8 motors that run the 1/4 mile from a standing start in 6.23 seconds and cross the finish line at 220 MPH. Between each qualifying session or race we had 45 minutes to pull out the gearbox, reface the clutch plates , and if neccesary disassemble the gearbox to make gear ratio changes to adjust to the track and weather conditions, and stick it back in the car not mention all the other things that had to be checked. That being said I know how this gear box works. As I explained in the first post, the gear changes in this gear box are done by a 12 volt permanent magnet DC brush motor that rotates 36 revolutions in either direction depending on the polarity applied to the 2 outside wires on a 6 terminal plug, The other 4 wires are from what my research tells me from an encoder. there is a small disk on the motor shaft that spins past 2x very small three prong IC’s that are attached to these 4 wires. Please correct me if my assumption is wrong. A gear reduction system makes those 36 revolutions in either direction turns a gear selector drum about 350 degrees in either direction, with 8 positions on that drum corresponding to the different gear ratios of the gear box. This gear selector drum that only turns just under 1 full revolution either way, has a shaft extending outside the gear box that has a 5 K ohm pot attached with 3 terminals. Now, please understand, I am not being a wise guy here. I fully understand what has to happen in this gear box to be able to shift gears, at least the mechanical part. As for the original ECU, it is no longer part of the game. It shifted gears based on many inputs such as engine RPM ,wheel speed,manifold vacuum, throttle position, and a whole bunch more that do not exist any more. From what I have learned on the web this DC shifter motor/ encoder/gear reduction/ 5Kohm potentiometer combination tells me that this is a servo. I need a new way to make it work, and I think I came to the right place to find out how. You are the experts when it comes to servo’s, and I want to be educated. What is the purpose of the encoder? I first assumed it was a hall effect sensor, but its not. does it need a voltage input, and if so on which terminals?? What role does this signal play?? The motor draws 6 amps. Lynxmotion sells motor controllers that can handle up to 25 A. Why do you say these can’t work. I am not asking for a working solution on a silver platter. I want to learn. I can already think of a few other applications that I can apply this technology to. I really enjoy my projects, But I have learned a long time ago that it’s very easy to burn up stuff if you don’t know about how the circuits work. I really don’t want to buy stuff only to let the smoke out because I wrongly assumed that I had the right part when in fact I did not. I have seen that you have to write code to program the controller. In my freshman year in college I had to write simple programs in Fortran 4 and Basic on a massive teletype machine and I would save it on perforated paper tape. After so many years this is where I would need a lot of guidance. I know this group can help me.
If I am indeed in the wrong place, then maybe you can point me in the right direction.
I apologize for the lenght of this post.
Thank you
Andre Loonstra

If this gear train is still intact, you may be able to control it like a servo weather or not it is actually a servo. Hobby servos have a small internal H-bridge to provide for operating the motor in both directions. Does your motor setup have this capability? Not sure why it would have both an encoder and pot if both are essentially mechanically connected. Be aware that there are industrial servos that operate differently than hobby servos. Below are some schematics that show the usual internals in a typical hobby servo.

seattlerobotics.org/encoder/ … 3003C.html

openservo.com/Schematic3

Thank you, the gear train is definetely intact. The motor does not have an internal H- bridge built in, but by design it has to turn in both directions to be able to shift the gears up and down.
I could send pictures, but just asking first. I figure I would need something like the
Single H-Bridge - HS-5745 Servo Amp but it would have to be able to handle the 12 volts and about 10 Amps. the Pot from the gearbox would be attached to that, and I would also need a servo controller to send the H-bridge the pulsed signal, that would tell the H-bride the polarity of the output, and when to stop at the right position. r does the servo controller change polarity and PW and the signal wire is the feedback from the Pot that just goes thru the H-bridge. In my case I would only be using 8 positions and I assume this could be done with 8 different input voltages to the servo controller that also would have to be able to work at 12 V. Let me know if this is about right before we continue.
Again thank you

If the motor is a simple two wire one, you probably could make a simple setup similar to the below using relays. A slotted disk could be put on the shaft with the pot which would open the two limit switches when a shift position slot is encountered. A limit switch would be in series with the power to a relay. A push button would be used to jumper around each limit switch. When a push button is pushed, it supplys power to the relay until the limit switch closes when it moves out of the disk slot, at which time the button is released. The motor continues to run until the limit switch opens at the next shift point slot, causing the relay to deenergize stopping the motor. Limit switch, button, and relay for each motor direction.

http://web.comporium.net/~shb/pix/reversemotor.jpg

Thank you for the idea, but I already tried that exact setup in the drawing you posted except that Itested it wired directly thru the double limit switch/blocking diode setup( borrowed from an old C-band satellite dish jack) leaving the relays out. It does not work consistently. depending on the resistance the motor encounters on the different gear positions it never stops right on the money. if it overshoots a little then it will jump out of gear when power is applied to the gear box. I also tried a 2.2 Ohm resistance first in series, and then across the motor to slow it down, but in both cases it reduced the motor torque to where it sometimes would not even turn. The motor definitely needs the feedback so it applies a countering force if it were to move from the gear position that it is in. Is the problem that Lynxmotion does not sell a servo controller or H bridge that can operate at 12 V +/- 6Amps or do you have doubts that this is actually a servo mechanism?? Thank you

It would be relatively easy to use a Bot Board II / Atom Pro microcontroller along with a SyRen 10 motor controller. The pot would be wired with ground on one end and +5vdc on the other. The center wiper goes to an analog input on the Atom Pro. Some inputs on the Atom Pro could be used to know when you need to shift, or what gear to shift into. When the shift input is set the microcontroller reads the analog input to determine where the servo is currently positioned to. It then determines which direction to rotate and begins rotating. The microcontroller then reads the pot in a loop. When the position is achieved the motor is stopped. This routine could be improved to include ramping the speed up and down so it does not overwork the motor and to prevent overshooting the desired position. This is pretty straight forward and would definitely work.

I’m not sure what the other outputs are. They could be some sort of encoder. Interfacing with encoders is not a trivial thing. It would require using interrupts at the least, and probably require some sort of assembly language programming.

Using a resistor to slow a motor down is not the preferred method. PWM will to a much better job at controlling the speed without losing the motors torque.

Thank you. Since this is an electric vehicle i would only be shifting gears when changing from city(stop&go) to highway driving. In all likelyhood I will only be using 2nd and 5th gear, but I would like to retain the ability to use any gear I want. So what I was thinking was a 8 position rotary switch or perhaps separate switches that could be switched on to go to a different gear. would the input to go to a different position just be a voltage between 0-5V?? If the encoder(??) is not needed to just change gears manually, that’s even better. It just needs to be very simple. When I get in the car I would put it in whatever gear I choose, and it would pretty much stay there. Forward or reverse is controlled by the Curtis 1238-7601 650 Amp controller(@108V). I did get a Arduino Mega 2560 board from my daughter for Xmas, but if you have what I need I will go with that and use the Arduino on a future project.
Could the MX-04 Servo driver be used as gear position input along with the SyRen 10 motorcontroller?? If it could, I could machine slots in the knob at the correct positions with a locking mechanism to prevent unwanted shifts. In the picture you can see the top of the gear selector drum. it is currently in second gear. the range of motion is from R to 6 so about 350 degrees


I appreciate your help, and am anxious to order once I know exactly what i will need.
thank you

Here are 2 more pics the first picture shows the complete mechanism with the motor shaft on the right.

The second shows the shiftermotor and the pot on the gearbox with the C-35 electric Motor attached in the back. i hope this helps make it clearer.

thank you for your time
Andre

The servo driver will not help here. There is no way to set the positions accurately and machining slots would be extremely difficult to set up to get the desired results.

There is no reason you need to use the Basic Atom Pro if you have the Arduino Mega. I know enough programming to get by with the basic language the Atom uses, but I have no experience with Arduino C. Do you have any programming experience?

The first thing I would do is connect 5vdc and ground to the two ends of the pot, and measure the voltage off the wiper when it is in each of the gears and write these numbers down. The Arduino board should be a good source for the 5vdc. Note this has to be regulated because if it’s not then the voltages will not be repeatable.

I would probably choose the RC input for the SyRen just because I’m familiar with it. Then maybe write a program to move it back and forth from two positions until it is reliable.

I will attempt to illustrate what the program would look like.

Thank you, Jim, No I do not have any programming experience which is why I am looking to something simple like the Servo driver. I am very good at metal fabricating and wiring, both AC and DC, and have a very good understanding of how electric circuits work but that ends when I get to PCB’s and IC’s.
So that’s where I will be needing the advice. I guess what would be important is that the gears could be changed very easily with a switch or something and not something where a laptop would be needed
to change gears, so if for instance my wife wants to use the car it would be simple to change gears for her. I understand that the position the servo goes to is determined by the pulse width of the signal the motor controller receives. the Atom pro would generate that signal, I assume based on the programming. If the signals for each gear position can be activated by a switch or several switches that would work for me
Thank you
Andre

Ok then. Yes it is certainly doable. The BotBoard II with Atom Pro is a microcontroller. It needs to be connected to a PC for programming only. Once it is programmed it is disconnected from the PC and it runs on it’s own. Yes all that will be required is the press of a switch to shift.

I can try to help you, but understand I will not be able to do it for you. I am not a great programmer. If you want to learn it’s not terribly difficult. If you have a logical mind or are good at solving abstract problems you might even enjoy it.

It’s funny seeing the big electric motor where the ICE used to be. Curious, do you know what the equivalent gear reductions are for the speeds? Wondering how much resistance the gearbox has. Interesting project!

So I would start by connecting the pot to the analog input. Then write a program to read the sensor, then send the value to the PC so you can see what it is. It will change as the pot is moved. These values would be important when you start moving the motor / pot.

var pot_position word '<- sets up the variable for storing the pot value. loop: '<- label, you can "goto" here. adin 0, pot_position '<- the variable pot_position now holds the numeric value of the pots position. serout s_out,i9600,"Analog input reading:",dec pot_value,13] '<- this sends the value to the PC so you can see it. pause 100 '<- a small 0.1 second pause, no need to go full speed here. goto loop '<- this makes it do the routine in a never ending loop.

When the values are defined the next step would be to rotate the motor. Then close the loop to make it operate as a servo, then finally add the inputs. Any interest?

Wow, I had to go do something for a while and I just came back to find all this great stuff.Excellent.
Thank you Jim. help is wonderful I am very logical and love solving problems like doing a EV conversion, and that’s exactly what this whole process of making this gearbox work has been about, when most everybody else is telling me there is noway except with the original ECU. I have been working on solving this for about a month now, and when I started I knew nothing about servos, controllers and drivers, I also now know everything about that gearbox, and found a neat website all about robotics that has sparked my interest for something in the future.
Yes I am very Interested in fact, please make me a list of the items I will need so I can order these
right away. It will take a couple of weeks before I get them here in ARUBA. In the meantime I can download the manuals and start reading up on writing code. I had already measured voltages from the pot, but I see already that I will be able to read them exactly to my PC from the pot, so best to wait till I get the stuff. You asked about the gearbox ratios. It’s actually a pretty neat gearbox. It’s has six forward gear ratios, but is in fact only a 3 ratio gearbox combined with a 2 ratio differential in one unit. So you shift 1,2,3 in the first final ratio, and 1,2,3 again in the second final ratio to get 4,5,6. Here is a link to the gear ratio charts. it’s the first column in the top table.
evilution.co.uk/304 It’s low on friction, and I have also removed the reversing gear, and will use synthetic transmission fluid instead of gear oil to reduce it even more. here are 2 more pics for your enjoyment.


I want to state that this could be done for less money, but would require a much steeper learning curve. These components are pretty easy to work with.

You will need the following components.

lynxmotion.com/p-252-bot-board-ii.aspx
lynxmotion.com/p-468-basic-a … 8-pin.aspx
lynxmotion.com/p-564-syren-1 … oller.aspx

You may need this.
lynxmotion.com/p-699-usb-to- … cable.aspx

So no reverse gear cause the motor is reversible. You will only need to switch from high and low ratios. Do you need to be able to set to neutral as well?

A 35 hp three phase AC motor being driven by nine batterys sounds interesting. How does that work? Also, does the transmission have clutches to take the load off of the gearing when a shift occurrs?

Alright, I just placed my order, so now I will wait patiently and read up on writing code. Any good sources about code I should checkout???
Thank you for the shopping list Jim. That’s right, the motor is reversible so I chucked the reversing gear. It was just a small idler that canged the output shaft direction. If I could just shift the low to high ratio alone that would the best solution. Unfortunately the shifting mechanism won’t allow that and I want to be able to use all the gears anyway.

This is an AC motor kit that uses a high performance Golf Cart motor. The Curtis controller converts the 108 V DC (9x12 V in series 100 Ahr deep cycle AGM batteries) to 3 phase AC, and also has regenerative braking. thunderstruck-ev.com/ac-35.html They predict 75 mph top speed,
50+ km range, and that it should leave most cars in the dust when the traffic light turns green.
The car used to have a clutch, but I left it out because I would have had to place the motor a few inches further from the gearbox to acomodate it and then the whole deal would not have fit anymore. So I will only change gears when stopped in order to go from city driving to highway driving. The speed limit in Aruba is only 50 mph so it should not be a problem. I will post how that works out when I get to that stage. I will post updates, and I appreciate the advise

Hi all, I’m back again. I received my parts from Lynxmotion, and all I can say is that it was probably the neatest method of protecting the contents of a package I have ever received. It was almost too pretty to cut open. So, after I unpacked the items I started playing around with my new toys.
anyway to get straight to the point, I had good results, and bad results. First the bad. I was playing with the Syren motor controller using a pot to make the motor change directions and stop. Well, even with Red and Black wires and clamps I still managed to hook up the wires backwards and that was it for the controller. I already have a new one on the way, and this time I will be using plugs to hook up the power. The good results were that i figured out how to load programs on the Bot Board/Atom Pro, and get them to run. I loaded the code you wrote for me to get the positions for the different gears from the Pot. At first it told me there were errors in the program, so I went over it and noticed that the variable name in the output line was different. after I changed it the program worked fine. Hey Jim, did you put that glitch in there on purpose to see if I could figure it out?? Anyway, The gear positions from the Pot are
Reverse 973
Neutral 897
1st gear 817
2nd gear 697
3d gear 544
4th gear 347
5thh gear 224
6th gear 62
The way I picture this working is that the Gear position sensor Pot from the gearbox goes to an analog input on the bot Board. when a different gear is selected the program compares the current position to the selected one and reads an error. Depending on whether it’s a positive or negative error the program sends a pulsed signal to the S1 terminal of the Syren telling it which way to spin the motor, and to stop the motor when the error is 0. That’s a very basic explanation, and I hope it’s kind of correct. If not then please correct me, and get me started in the right direction to write a program. Oh, Is it possible to have the controller I messed up repaired??