Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Very simple questions, could use some help getting started


Senior Member

Status: Offline
Posts: 161
Date:
RE: Very simple questions, could use some help getting started


Here are a couple of pictures of the tablet next to the cluster.   Appears to be a lot faster than the old labtop I used to make that last video.   Time to get the serial port working..

 

 



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

So much for the local Staples sales guy trying to tell me that OTG can't work.    The attached picture shows the adapter I made up covered in hot glue. This will all go away when the real cables show up.   

 



-- Edited by bigtoe on Sunday 16th of February 2014 03:12:30 PM

Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Member

Status: Offline
Posts: 23
Date:

Windows R/T 8.1?



__________________


Senior Member

Status: Offline
Posts: 161
Date:

RansomT, did you look at the tach accuracy after the mods a page back?  If you decide you would like to make your own extension cable for the cluster and want a calibrated one for making pulls, maybe we can work something out. 

The Lenovo IdeaTab Miix 2 is Intel based and runs the full blown 32-bit version of Windows 8.1 (RT was for the ARM).   This allows me to run my desktop software on this tablet rather  than spin a whole new application for a different platform. 

http://shop.lenovo.com/us/en/tablets/ideatab/miix-series/miix-2/#techspecs

It was $404 for the 64G version, two 32G flash cards, case and the USB cables.   

"T"ed off a cable to 5V lines of my home made adapter to power the tablet and Boost by Smith adapter.   Worked fine, so I connected an old D-Link USB 1 (PN# DSB-H4) and the tablet recognized it.  Plugged both the BBS adapter and a Microsoft mouse into the hub, no problem.   So far, I am impressed with it.   




-- Edited by bigtoe on Friday 14th of February 2014 04:58:09 PM

Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Member

Status: Offline
Posts: 23
Date:

I've worked some with Windows 8.1 RT, but didn't realized that you could run "normal" programs on a full blown 8.1.  I'm in the market for a tablet anyway.  wonder if this would be just as good?

 http://www.amazon.com/Dell-Venue-Pro-Tablet-Windows/dp/B00FEE7B1I 

 

and can you run ECUEditor on it?



__________________


Senior Member

Status: Offline
Posts: 161
Date:

Yes, because it's an x86 device, you can run most of your PC applications. I did not try the full blown ECUEDITOR but did load in my stripped down version and it appears to work the same as when run on the desktop.

Not sure about the Dell versus the Lenovo. I would guess the one you link to has similar performance if you order it with the same CPU and memory configuration. Then again, how fast does it need to be to collect data at 7800 baud.

I think its going to be a question of how robust they are. Can it survive the temperature, vibration, electrical noise, rain......



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

It looks like ECUEDITOR has support for the LC1 but I can't seem to find any information on how to set it up. 

 



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

ECUEDITOR seems to have at least the start of support for the wide-band on the Gen 1.   I did not spend a lot of time with it and not sure the code was ever finished.  Innovate has a new wide-band controller called the LC-2.     Currently I use the LM-2 which has the LCD, keypad, Flash card, CAN, USB, data logging (CAN, O2, analog and  tachometer) all built into a handheld. 

There is still a little more work to do on the basic logger.  There is still no way to post process all the stored data (you don't want to be using Excel for this).  There are a few other small things like saving the setup that need to be added as well.

The board I had wanted to buy that has an FPGA was bought out buy the same people who created Labview.  So far I have been unable to obtain the source code for it and am now looking for another way to collect the high speed data.   

 



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

The first of the USB OTG micro hubs arrived, shipped from China.  The hub appears to work fine with the Lenovo Miix 2 but it will not charge the tablet.

I picked up an LC-2 and it worked just fine.  I got one of their digital meters as well without doing any research.  Had assumed it just hooked in-line with the serial port but it is analog.  Notice how the LC2 displays 20.9 on my logger and the analog gauge shows 22.4. 



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Member

Status: Offline
Posts: 23
Date:

I ordered a Dell Venue this week ($235) and it has the same issue with the single micro-USB port being it's only way to charge.  However, I have found out that you can use a USB 3.0 docking station with them as long as you have the micro adapter.  One of the docking stations I found ($109) supports multiple monitors as well as keyboard/mice, USB 2.0 ports and USB 3.0 ports; however, same issue with a no charge condition when using the USB port.



__________________


Member

Status: Offline
Posts: 23
Date:

bigtoe wrote

 

I picked up an LC-2 and it worked just fine.  I got one of their digital meters as well without doing any research.  Had assumed it just hooked in-line with the serial port but it is analog.  Notice how the LC2 displays 20.9 on my logger and the analog gauge shows 22.4. 


 I've not used the LC-2, but the LM-1 has to be calibrated.   Differences in WBO2 sensors and ground offset are usually taken care of..



-- Edited by RansomT on Sunday 23rd of February 2014 02:52:54 AM

__________________


Senior Member

Status: Offline
Posts: 161
Date:

RansomT wrote:
bigtoe wrote

 

I picked up an LC-2 and it worked just fine.  I got one of their digital meters as well without doing any research.  Had assumed it just hooked in-line with the serial port but it is analog.  Notice how the LC2 displays 20.9 on my logger and the analog gauge shows 22.4. 


 I've not used the LCD-2, but the LM-1 has to be calibrated.   Differences in WBO2 sensors and ground offset are usually taken care of..


Yes, they all need to run through their calibration. 

The display will momentarily display Cal and then it will switch to reading a
percentage of oxygen. If the oxygen content now differs from 20.9% by more
than 0.4%, repeat the calibration.

Notice, the logger is showing 20.9 after calibration.  Also in my last video the LM2 is showing 20.9 after cal.    No problem with that.   But this gauge is analog, running on an analog output from the LC2.  

Cut about 7' of cable out of this mess so far.  Should make for a fairly clean install. 



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

RansomT wrote:

I ordered a Dell Venue this week ($235) and it has the same issue with the single micro-USB port being it's only way to charge.  However, I have found out that you can use a USB 3.0 docking station with them as long as you have the micro adapter.  One of the docking stations I found ($109) supports multiple monitors as well as keyboard/mice, USB 2.0 ports and USB 3.0 ports; however, same issue with a no charge condition when using the USB port.


If you find a standard charger that works when its running the USB, post it!   With the powered hub, the Lenovo will run the logger for at least 6 hours (on a new battery).  Then it would need to be removed from the bike to charge.   I was hoping to make some sort of billet case for it and strain relief that little connector to give it a chance to live. 

 



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

I was going to originally remove the 8 pin connector from the LC-2 cable the runs to the Bosch sensor.   After taking the LC-2 apart, I decided to just shorten the wideband cable.   The cable has two shielded twisted pairs.   Other than that the splice was no problem.   T&B makes some good heatshrink tubing that is sealed.      I just made up a new short cable for the LC-2's RS-232.   

Picked up an RS-232 to TTL cable that I plan to use to plug into the harness.   No problems with the Boost by Smith adapter.  Just trying to shrink the size.   

   



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Guru

Status: Offline
Posts: 963
Date:

Impressive project you have there.

__________________


Senior Member

Status: Offline
Posts: 161
Date:

Pot calling the kettle black. You three did a fine job laying the ground work for the rest of us. My personal thanks!

__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

I had been getting a little over 10 samples per second with my logger. Had not given it a whole lot of thought.

7812 BAUD, 8,N,1 or 1.28mS / Byte.
With the header, payload size, checksum and 8 Byte payload, 11 bytes total

11 request
11 echo
11 receive

X2 for all locations or 66 bytes. Gives us 85mS. Have a 5mS check for break. Figured I was in the ballpark and left it at that...


Today I started looking at making my own programming cable. When I saw the loopback from the TX to the RX lines, it hit me like a ton of bricks. There's no penalty for the echo other than the flush and my logger should be running much faster that it is.   Should be 44 bytes (22 request, 22 receive) or 56 mS. Stuck the scope on the data line and realized I had screwed up. Now running at 63mS or just under 16 samples a second.   Yea, it's still slow but at least now it's because of the slow baud rate and not my software.   

Now where to find a 4 pole double throw switch.....



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Not sure where C&K is made anymore or what the quality of their parts are.    Thinking to use this part from NKK Japan.  Epoxy sealed and with a lock.   I plan to use the same switch when I make my changes to the shift harness.   I want the lock and also I want that one switch to control multiple functions, not just the shift. 

 

M2042LL1W01.jpg



__________________

You can lead a horse to water but you can't make it drink.  



Guru

Status: Offline
Posts: 963
Date:

If it is going to be on the bike year round and you're switching under 10mA you probably want to make sure the contacts are gold plated. Eventually non gold contacts build up an insulating oxide layer. The low current of logic signals don't generate enough contact arching to burn through the oxide layer.

You might also want consider putting a boot on it. http://www.mouser.com/ProductDetail/NKK-Switches/AT428H/?qs=%2fha2pyFadugJMZjqzZ4v%252b%252bOCW0vAwp1CaAAwMspHHJw%3d

Finding switches for bike apps can be a pain. There are the small panel switches or the 10-15 amp automotive. The market really seems to lack a  good medium range switch.



-- Edited by RidgeRacer on Tuesday 25th of February 2014 03:28:41 PM

__________________


Senior Member

Status: Offline
Posts: 161
Date:

You bring up a valid point. This switch is epoxy sealed and uses a silver alloy for the contacts. They do not specify a wetting current but I would think 10mA is a good swag.

The programming signals I would expect are well under that. I only plan to use it when I have the tablet on the bike and doubt the tablet will out live the switch.

The second switch will remain on the bike. The shift solenoid is no problem. The other two circuits I suspect will be alright but I have not measured them. If they are under my comfort zone, I may add some resistance.


As long as I have your ear... When I went to fix the problem with the ignition kill, it would have been very helpful to have some sort of debugging tools. I understand you removed the potting on a few of these and there is a debug connector on the ECM's circuit board. I have seen posts talking about it being BDM. I have not dug into it that far. What tools are available for using this port?

__________________

You can lead a horse to water but you can't make it drink.  



Guru

Status: Offline
Posts: 963
Date:

Which ECU did you end up going with? The SH7052 in the 32bit has an Advanced User Debug (AUD) port. The older 16b uses the Motorola Background Debug Mode (BDM) port.

I jury rigged an AUD interface in pre Adrino days using a BASIC stamp 2 board. Search AUD on this forum for other examples.

__________________


Senior Member

Status: Offline
Posts: 161
Date:

I plan to use the 32-bit Gen 1.

I had seen a thread that talked about using different boards to talk with this port. I'll look back over it.

I was looking to just purchase a tool but when I looked at what Renesas offered I was not able to find anything for the SH7052.

__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

ecuhacking.activeboard.com/t14206571/using-aud-interface-to-read-the-memory-contents/

Read that thread again. Some good info, but not was I was hoping for.


On the plus side I found a very good forum, 62 pages of people talking about charging while using the USB port. Mostly talked about the Dell V and this Lenovo. 62 pages of in a nut shell, at a 1.5K resistor across the data lines, turn the table on without any peripherals. Start the charging, then add your peripherals. What I see with the Lenovo is without any resistor, the unit will charge with that home made adapter I show and remain charging with other peripherals plugged in as long as I start the charging first. Seems like a huge miss.


__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

This is the link I mentioned in last post about the OTG charging.  

http://forum.tabletpcreview.com/dell/59328-venue-8-usb-power-same-time-61.html

 

Attached picture shows the new cables.   On the left replaces the Boost by Smith programming cable.     On the right shows the modified Boost by Smith shifter harness.   Yea, it's a mess...

I was asked about the mods for the 2-step and air shift and thought it may be helpful to explain what was going on.   Without getting into a lot of details, the basic problem with the original harness is that it sets up a voltage divider that is dependent on the gear position.    You can see the effects from the video I posted.  What these mods do is cause a fixed voltage that is referenced to the GPS's ground (black) to appear on the GPS's sense (red) wire when the horn button is pressed.  

On the original harness, I did not like that there was no recirculation diode across the air solenoid  (I don't need the field to decay fast).  They instead use a pretty high voltage diode to attempt to block the BEMF. 

There are many ways you could produce the fixed voltage if you needed this feature.   It would be nice if you could just buy these cables from Boost by Smith or someone else.  If you have a need, you may want to ask them to see if they could make some sort of fix for the problem. 



-- Edited by bigtoe on Sunday 9th of March 2014 07:27:35 PM

Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

With the Lenovo Miix 2, this is the only way I have found to charge it so far.  I had tried connecting the power supply without having anything connected to the data lines and it appears to go into a very slow charge mode.   I can add devices once it is in this mode, but the tablet can slowly discharge depending what software I am running on it, display brightness, etc.   

I looked at the charger that was supplied with the tablet.  They short the two data pins.   So I added this DPDT switch in-line with the data pins.   The tablet's data pins go to the commons.  One side is a short between the data, the other goes to the second connector.  

I have all the serial ports connected along with the mouse, apply the short, then turn on the tablet.  It goes into the normal charge mode.  I then flip the switch and it seems to stay in the normal charge mode and the hub/peripheral get detected. 

For the bike, I plan to just let it run off it's internal battery and make a supply for the hub. It's still not what I want but so far the best thing I came up with. 

 



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

I spent some time adding the ability to view the data that is recorded with the logger.   Attached shows the main screen.  Allows multiple files to be viewed at the same time.  The slider on the right selects the data that is shown.     This data was a sweep collected from the simulator.  You can see how the throttle is being log swept over and over.     



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

There are two cursors that setup a trigger and allow the program to split the data into subsets.   This mode is enabled by selecting the Stack.   Attached you can see all of the TPS sweeps overlaid.  



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Single plot mode allows more than one signal to be displayed on a single graph.   You can see how the RPM is being ramped from 0 to 10500 as the TPS and coolant are swept.     



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

The last post processing menu runs an FFT on the selected data set.    Currently my logger software can collect data from the ECM every 0.064 seconds, or 15.625Hz.   The FFT will be half of this, or 7.8Hz.   Real slow so not sure how useful it is but here's a simple example.

If you watched my video, you saw I model the torsional noise of the crankshaft.   In the attached, you can see how at 0 cam degrees this cylinder is dead and making no power.     

 

 

 



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

If we turn the motor at 400 RPM, we will normally see 400 +/- 60 PRM as the crank runs through the combustion and compression strokes. At 400 RPM the main frequency we will have is at 400/60 or 6.67Hz. In this example we have a dead cylinder. So one out of every 4 power strokes over the 360 cam degrees is dead.

So the cam spins at half the rate of the crank or 400/2 or 200 RPM. And there is one dead cycle, so every 3.33 Hz.   

The attached plot shows the result of running the FFT on the crank speed.  

http://en.wikipedia.org/wiki/Fast_Fourier_transform

 

 



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

The previous graph was about 13 seconds of recorded data.  Running for longer periods will show more details.  



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Guru

Status: Offline
Posts: 1247
Date:

I'm not sure you will be able to sample crank speed at a high enough rate to do an FFT at any realistic engine speed without the use of external logging hardware.

Many oem, and some aftermarket ECU's measure teh instantaneous crank speed at a certain point relative to the programmed ignition event timing. These numbers can then be compared to each other to determine misfires or other issues. This is how some OEM's can determine a "cylinder 3 misfire" and set a fault code. The ecu is not typically measuring anything to do with the actual firing or engine performance other than the crank speed, and picking up the weak cylinder.

__________________


Senior Member

Status: Offline
Posts: 161
Date:

This was just an example of how an FFT can be used.  You do bring up a real good point about how slow it is. 

I had mentioned several posts back that I planned to use an OEM device to do some higher speed logging.   This was the unit I was planning to use.  It has a small Xilinx device that is loaded on the fly.  I think it would have worked well but the product was sold to NI and I was unable to get them to release the source for it.

http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,1040,1043&Prod=ANALOG-DISCOVERY

I am now looking at another similar product to use with my software to keep the costs down. 



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Looks like the new hardware can run in the KHz (1000 samples / second range) with out too much problem.

Now that I have the monitor working, I have started to look at table editor. I would like to have a combination of ROMRAIDER and ECUEDITOR in one program. My plan is to continue to code it in Labview to save time but this has proven to be not as simple as I had thought.

I want the table editor to work like other Windows programs using the standard keystrokes and mouse movements. As it turns out, Labview does not appear to have a way to do this and I have had to code these features.



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Not a whole lot has happened since my last post.     I ran into a few snags.  The Lenovo was having problems with the AC2 pumping data out on power up.   I ended up cutting off the serial connector from the AC2 and adding the FTDI USB/RS232 adapter.   The FTDI driver has a feature to disable enumeration.    Sad Windows 8.1 still has this same problem.    

Windows 8.1 with it's stupid screen lock was also causing problems.  I found where you could change the registry to turn this unwanted feature off.  

http://news.softpedia.com/news/How-to-Disable-the-Lock-Screen-in-Windows-8-1-426958.shtml

If you follow the instructions on adding "NoLockScreen", it does work.  

The table would also power up sometimes in portrait mode and would not flip back to landscape.   I turned off the feature that allows Windows to auto select the mode and forced it to landscape.    Other then these couple of changes, the tablet has been working fine.



-- Edited by bigtoe on Sunday 27th of April 2014 01:14:28 AM

Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

I am currently working on calibrating the Innovate analog gauge. My plan is to test both the LM2 and AC2's serial data as well.  

To determine the absolute accuracy, I plan to use a calibration gas.     I attached a couple of pictures of my setup.   You can see the nitrogen and calibration gas tanks.  The small compressor on the right is used to flood the chamber with air.  

 

Ran the test today.  The analog gauge turned out to be not as bad as I thought.  It appears to be a gain error more than anything.    First I ran the free air calibration on both sensors.    Next I tested them in nitrogen and then with the test gas.  Last I flushed the system with air to see if they would return to the correct values.

 

Free air calibration

AC-2, serial data read 20.9

AC-2, analog gauge read 22.4

LM-2, LCD readout read 20.9

 

Nitrogen

AC-2, serial data read 14.8

AC-2, analog gauge read 14.9

LM-2, LCD readout read 14.7

 

Test gas

AC-2, serial data read 12.8

AC-2, analog gauge read 12.7

LM-2, LCD readout read 12.5

 

Flush with air

AC-2, serial data read 20.9

AC-2, analog gauge read 22.4

LM-2, LCD readout read 20.9

 

Good enough to use.  



-- Edited by bigtoe on Sunday 27th of April 2014 01:13:56 AM

Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Labview turned out to be VERY weak when it comes to table editing, which is pretty much the whole editor. I have not spent a lot of time working on my editor because of this. Rather than supporting the standard Windows methods of editing, everything has to be coded.

Comparing ROMRaider with ECUEditor, not much appears to be the same. Not even the RPM headers are the same between the two programs. ROMRaider has everything documented in an XML file and it seems fairly straight forward. I put together a simple program to load the binary image and point to the addresses listed in the XML file and I get the same data shown in ROMRaider.  Looking at the fuel tables for ECUEditor, I am not sure what they are doing.

This video clip shows my editor. There's not much to look at yet.  

 

 



-- Edited by bigtoe on Monday 28th of April 2014 03:25:00 AM

__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Google had attached a G+ account to my youtube and when I attempted to decouple the two and wipe the G+, no more youtube account. 

I have been putting my bike together and am now trying to figure out how to mount the tablet.   Looks like there is room off to the side.  May be able to Velcro it there.  Handle bar area seems a little tight.  Was thinking to magnetic mount it to the tank but with the curves, it just doesn't seem like a good location. 

 

Update

Three strips of Velcro on the side to hold the tablet and no problems with it  moving.  The cheap OTG hub died however.   Cracked it open and several of the wires had broke.  Most had only a couple of strands holding them on.    Resoldered it then filled the case with hot glue.  Then shrink tubed the case.     Recording worked flawless except for the hub.   Was able to use the tablet with my gloves on without problems. 

 

Been putting a few miles on the bike and testing the changes to the shifter harness and the software.   Everything appears to work correctly.   Tablet has been on there for a few rides now and continues to survive as well.  

 

 

-- Edited by bigtoe on Tuesday 3rd of June 2014 01:48:02 AM



-- Edited by bigtoe on Wednesday 18th of June 2014 01:37:10 AM

Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Next step is to add auto shift. I would like to use the ECM to do this rather than adding an external box. I am thinking to use the vacuum solenoid output for this as I am not using it anyway.

It looks like you can program the RPM that it turns on and off at. It needs to have at least a shift counter added to the software.



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Appears they added the no kill on 6th so no need for a counter with the stock transmission. Looks like it would almost work as is except for how the IAC works. Seems like you want the output to come on at your shift point then turn off at some lower RPM to give you some hysteresis. If I set the off lower than the on, the output will never turn on. I looked at just moving the off to the max RPM then using the on to set the shift point, but doing a search, seems others have tried this and the pulse is too short to actually get the bike to shift reliably.

One easy way to fix it, without changing the software would be to add an external one-shot that would pulse the solenoid for a fixed time. Ametek makes a programmable one-shot:

www.carltonbates.com/c/AMETEK-NCC/Timing-Relay-Single-Shot-1-NO-1A-12V-DC/Q2F-00005-326/p/40309693673-1

PN# Q2F-00001-326

Pulling pin 6 to ground causes pin 1 to ground for a fixed amount of time. IAC and horn are both grounding. Looks like it could just be added in series with the IAC and the white wire from the shifter harness. Cost is pretty high so may be worth changing the code.



__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Tried it by connecting the IAC direct to the white and sure enough, my bike would not shift. I added the relay and set the pulse to about a half second and tried it out.   It's crude but it does seem to work.   Changing the software to add shift by time or shift by RPM, pulse time, etc would be better.     



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

ROMRaider allows the hysteresis to be set! So maybe just adding a single wire is all that's needed.

 

Update

I ended up putting a small 4 pin automotive relay in it until I am sure the output can drive that shifter solenoid. Looking at the logged data, took a stab at the numbers to use.   It works great!  The tablet stayed on too....   This bike just keeps getting more fun to play with.  

 

Update

Well, not quite so great.  If I just ease on the throttle it works great but if I pin the throttle  it will not shift in the higher gears.     I can add enough kill time and hysteresis to get it to shift very reliably with the throttle open, but it's real slow and not very smooth (and pops in the pipe).   The fixed pulse time with the hysteresis is the way to go.     



-- Edited by bigtoe on Monday 30th of June 2014 04:27:50 AM

__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Made up a couple of one-shots that run from the vacuum solenoid.   Maybe $10 in parts.   Went all out with the heat shrink case.   This will replace the orange relay.  



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Now that I have tested the changes I made to G1BusaShifter2, I would like to make it available. Changes will correct the problem where the ignition does not turn off for the entire kill duration and also corrects the 6th gear ADC trip value. With no support for ECUEditor, not sure of the best way to handle it.




__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Machined up an aluminum case for the second one-shot and used some Devcon waterproof epoxy to seal it.   



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

Plots showing manual shifting using the button versus auto shift.     



Attachments
__________________

You can lead a horse to water but you can't make it drink.  



Senior Member

Status: Offline
Posts: 161
Date:

I'm too lazy to setup bitbucket and add a fork so per the GPL here is the source with a few very minor changes. I did not roll the version number so this will work with the last release of ECUEditor.



/*
G1busashifter2.c

This file is part of ecueditor.com

ecueditor.com is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ecueditor.com is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Hayabusa ECUeditor. If not, see <www.gnu.org/licenses/>.

Notice: Please note that under GPL if you use this program or parts of it
you are obliged to distribute your software including source code
under this same license for free. For more information see paragraph 5
of the GNU licence.

v1.01 added igncut and fuelcut const flags that can be set
and pair output code

History:
11.8.2009 JaSa shifter low treshold added
-const_killtime_2000
-else if (ECU_RPM > 0x1E00) {duration_kill = const_killtime_3000;}
-else {duration_kill = const_killtime_2000;}
-if ((nt_6th_gear == 0) && (ECU_RPM > 0x1400)) old value 1E00

01.20.2014
Fix problem where the ignition was not being killed for entire duration (double pulse)
Adjust 6th gear ADC value to match ECM reporting value
Adjust default kill time to max (120mS)
Removed nt_6th_gear
Removed redundant killcount = 0
*/


#define ECU_AD_GPS *(volatile unsigned char *) 0xFFFF838F //GPS voltage as byte
#define ECU_RPM *(volatile unsigned short *) 0xFFFF8398
#define ECU_FuelKillFlag *(volatile unsigned char *) 0xFFFF8556

#define ECU_IgnKillFlag *(volatile unsigned char *) 0xFFFF8452 // Was 0xFFFF8453, Changed to correct ign kill
#define ECU_PAIR *(volatile unsigned short *) 0xFFFFF754
#define ECU_PAIRDISABLED *(volatile unsigned char *) 0x0000665F

#define ECU_CLT *(volatile unsigned char *) 0xFFFF8228
#define ECU_CCKSUM *(volatile unsigned char *) 0xFFFF85D9
#define ECU_FAULTCODE1 *(volatile unsigned char *) 0xFFFF822A
#define ECU_F1CKSUM *(volatile unsigned char *) 0xFFFF85DB
#define ECU_FAULTCODE2 *(volatile unsigned char *) 0xFFFF822B
#define ECU_F2CKSUM *(volatile unsigned char *) 0xFFFF85DC

#define killcount *(volatile unsigned short *) 0xFFFF8600
#define killswitch *(volatile unsigned char *) 0xFFFF8604
#define killcountactive *(volatile unsigned char *) 0xFFFF8606
#define initialized *(volatile unsigned char *) 0xFFFF8608
#define killflag *(volatile unsigned char *) 0xFFFF860A
#define nt_6th_gearcount *(volatile unsigned short *) 0xFFFF860C
#define duration_kill *(volatile unsigned short *) 0xFFFF8610


#pragma section ADJ //CADJ 15700
const unsigned short const_killtime_12000 = 0x232; //ADJ + 00 = 15700 Tms * RPM K / 2.56 => (120 * 12 )/2.56 = 562.5
const unsigned short const_killtime_11000 = 0x204; //ADJ + 02 = 15702
const unsigned short const_killtime_10000 = 0x1d5; //ADJ + 04 = 15704
const unsigned short const_killtime_9000 = 0x1a6; //ADJ + 06 = 15706
const unsigned short const_killtime_8000 = 0x177; //ADJ + 08 = 15708
const unsigned short const_killtime_7000 = 0x148; //ADJ + 10 = 1570A
const unsigned short const_killtime_6000 = 0x119; //ADJ + 12 = 1570C
const unsigned short const_killtime_5000 = 0xea; //ADJ + 14 = 1570E
const unsigned short const_killtime_4000 = 0xbc; //ADJ + 16 = 15710
const unsigned short const_killtime_3000 = 0x8d; //ADJ + 18 = 15712
const unsigned short const_killtime_2000 = 0x5e; //ADJ + 20 = 15714 added 11.8.2009 JaSa
const unsigned short minkillactive = 5; //ADJ + 22 = 15715
const unsigned short killcountdelay = 400; //ADJ + 24 = 15716 *** Was 800
const unsigned short solenoidrpm = 0x6400; //ADJ + 26 = 15718
const unsigned short s_GEAR12 = 0x5000; //ADJ + 28 = 1571A
const unsigned short s_GEAR3456 = 0x6400; //ADJ + 30 = 1571C
const unsigned short s_6th_shift_active = 0; //ADJ + 32 = 1571E Not used at this time

#define ACTIVE 1
#define DEACTIVE 0 // Selecting ignition only, works same.
#define FUELCUTACTIVE 3
#define IGNITIONCUTACTIVE 3 // should this be 2?? NO, 2 will not drop ignition, 0xff & 0x01 work the same
#define SHIFTERACTIVE 0x40

#pragma section IDTAG //0x15740
const unsigned short const_pgmid = 200; //15740 // Changed 11.8.2009 JaSa - orig value 101
const char igncut = ACTIVE; //15742
const char fuelcut = ACTIVE; //15743

// The 0x00011E90 is the address of the subroutine to which we should generate a jsr.
// we can add NOPs to make start address divisible by four.
#pragma section ASSY //PASSY 15750
#pragma inline_asm(sub_0x00011E90) //; CODE XREF: Set_Limiters_and_Maps_sub_E24C+40p
void sub_0x00011E90(void)
{
MOV.L #H'00011E90, R3
JSR @R3
NOP
}

#pragma inline_asm(jump_back_fuel_loop)
void jump_back_fuel_loop(void)
{
MOV.L #H'0000E290, R3
JMP @R3
NOP
}

#pragma inline_asm(jump_back_ign_loop) // ; CODE XREF: Main_Loop_uncertain_sub_636+12960p
void jump_back_ign_loop(void)
{
MOV.L #H'0000B078, R3
JSR @R3
NOP
MOV.L #H'00012F9A, R3
JMP @R3
NOP
}

// Only 1 pulse in 4 will drop!
#pragma section IGNCODE //0x157B0
void ignmain(void)
{
if ( killflag == ACTIVE) // calling b078 first will not allow kill.
if (igncut == ACTIVE)
{
ECU_IgnKillFlag = ECU_IgnKillFlag | IGNITIONCUTACTIVE;
}
jump_back_ign_loop();
}

#pragma section FUELCODE //0x15800
void fuelmain(void)
{
sub_0x00011E90();

/*
First time only initialization of internal variables.
*/
if (initialized != 1)
{
killflag = DEACTIVE;
killswitch = DEACTIVE;
killcountactive= DEACTIVE;
initialized= 1;
nt_6th_gearcount = 0;
killcount = killcountdelay;
}

/*
Set internal variable killswitch status based on GPS sensor status.
You may want to add conditions when kill is not needed here including:
- Clutch is depressed, no kill
- Gear 6, no kill

The GPS goes down and does not stabilise fast enough, some delay must be built
for detecting the last gear.

Also the actual kill time is calculated here as the each cycle this program
is run is twice on every revolution we need to adjust the kill time
to be independent of rpm.
*/
if ( ECU_AD_GPS <= SHIFTERACTIVE )
{
if ((nt_6th_gearcount == 0) && (ECU_RPM > 0x1400)) //changed 11.8.2009 JaSa - old value 1E00 0x1400 = 2000 RPM min to activate kill
{
killswitch = ACTIVE;
if (ECU_RPM > 0x7800) {duration_kill = const_killtime_12000;}
else if (ECU_RPM > 0x6E00) {duration_kill = const_killtime_11000;}
else if (ECU_RPM > 0x6400) {duration_kill = const_killtime_10000;}
else if (ECU_RPM > 0x5A00) {duration_kill = const_killtime_9000;}
else if (ECU_RPM > 0x5000) {duration_kill = const_killtime_8000;}
else if (ECU_RPM > 0x4600) {duration_kill = const_killtime_7000;}
else if (ECU_RPM > 0x3C00) {duration_kill = const_killtime_6000;}
else if (ECU_RPM > 0x3200) {duration_kill = const_killtime_5000;}
else if (ECU_RPM > 0x2800) {duration_kill = const_killtime_4000;}
else if (ECU_RPM > 0x1E00) {duration_kill = const_killtime_3000;}
else {duration_kill = const_killtime_2000;}
}
}
else // GPS not in kill position
{
// 0xE7 - 6th value tested against GPS feedback threshold No kill on 6th
// 0xcf - 5th " " " " " " No kill on 5th
killswitch = DEACTIVE;
if (ECU_AD_GPS >= 0xe7) // Was 0xF0, changed to 0xE7 to match what ECM reports for 6th gear threshold
{
nt_6th_gearcount = killcountdelay; // Reset the 6th gear filter
}
else if (nt_6th_gearcount != 0)
{
nt_6th_gearcount -= 1;
}
}

/*
Main logic for processing fuel/ignitionkill function.
*/
if( killflag == ACTIVE )
{
/*
Hold the killflag active until minimum duration of kill time is reached.
When reaching the duration of kill time set kill deactive and set killcount
to delay calculation mode that must be reached before next kill initialization.
*/
killcount += 1;
if( killcount >= duration_kill)
{
killflag = DEACTIVE;
killcount = killcountdelay; // Reset the shift cycle filter
}
}
else // killflag = deactive
{
if( killcount > 0 ) // Test if shift cycle filter is active
{
/*
Killswitch delay calculation mode, count from killcountdelay backwards
waiting for the next killswitch cycle. The delay is calculated only
when killswitch is not depressed.
*/
if( killswitch != ACTIVE )
{
killcount -= 1 ;
}
}
else
{
/*
Killcount is zero, a new kill cycle can be initialized.
*/
if( killswitch == ACTIVE )
{
killcountactive += 1;
if( killcountactive >= minkillactive )
/*
If minimum killflag active time reached then activate kill
and reset the killswitch counter back to zero.
*/
{
killflag = ACTIVE;
}
}
else
{
killcountactive = DEACTIVE; // pitäisikö tässä olla joku muukin muuttuja ?
} // Translation: should this be someone else in a variable?
}
}

/*
Set the fuel and ignition CUT(s) on if KillFlag indicates that kill is active,
remember that ECU parameters may contain some values that must be retained.
You dont need to set variables inactive as ECU sets those already internally,
while performing e.g. rev limiter etc checks.
*/
if ( killflag == ACTIVE)
if (fuelcut == ACTIVE)
{
ECU_FuelKillFlag = ECU_FuelKillFlag | FUELCUTACTIVE; // Will kill fuel 100% if always called.
}

/*
The pair valve solenoid output is reprogrammed as a rpm dependent output.
First its tested that the normal PAIR control is disabled using ecu editor and
if that is ok then the pair output is adjusted according to the RPM.

Please note that there is something in the ECU code setting the pair output
active before this program making an intermittent signal to pair output.
*/
if (ECU_PAIRDISABLED == 0x00)
{
if ((ECU_AD_GPS < 0xAA) && (s_GEAR12 < ECU_RPM))
{ECU_PAIR = (ECU_PAIR & 0xFFEF);}
else
if ((ECU_AD_GPS < 0xF8) && (s_GEAR3456 < ECU_RPM))
{ECU_PAIR = (ECU_PAIR & 0xFFEF);}
else
{ECU_PAIR = (ECU_PAIR | 0x10);}
}
jump_back_fuel_loop();
}









__________________

You can lead a horse to water but you can't make it drink.  



Member

Status: Offline
Posts: 23
Date:

Excuse me, please. I don't really want to hijack this, but I think the folks that can answer my question is paying attention to this thread.

Among others things, I am trying to data log rear wheel speed via the speed sensor. I am using the data log modules from Innovate (SSI-4) which on one of the channels supposedly log frequency and converts it to speed, but I can't get it to work. I don't know if it is how I am trying to sample or if it is the Innovate or I am just sampling the wrong signal. There are 3 wires attached to the speed sensor: b/w trace which is ground. Pink which returns 5v, but according to my cheap volt meter modulates. b/r trace that supplies 12v. I'm sampling the Pink with the b/w as ground reference and I get nothing.

Suggestions?

__________________


Senior Member

Status: Offline
Posts: 161
Date:

What sensor are you trying to use? Mfg and PN#?
How many magnets?
How are magnets mounted relative to sensor? (picture would help)

IMO, I would just tap into the front sprocket sensor and be done with it.




__________________

You can lead a horse to water but you can't make it drink.  



Member

Status: Offline
Posts: 23
Date:

That s the one I am using,front sprocket sensor.



__________________
«First  <  1 2 3 4 5  >  Last»  | Page of 5  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard