News:

📋 Model Histories / Paint Codes etc:
https://pure2strokespirit.net/
📒 All Manual and Resource Downloads:
Google Drive

💡 Paypal to admin[at]pure2strokespirit.net for donations that go toward the hosting costs :) Add your forum username in the message to get a forum supporter tag (-P)

Main Menu
avatar_Louis

The IC inside the CDI

Started by Louis, October 21, 2013, 12:16:13 PM

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

tzr-v4

Quote from: Louis on November 16, 2013, 01:43:44 PM
Did manage to capture the in-coming and out-coming signal
In-coming

Is the signal taken on the IC pin ?
It looks like a normal 5V signal with falling to 0V when the pickup signal is detected.

Can you check with several RPM position 2000 / 3000 / 6000 if low period is
- constant (not affected by RPM changes)
- variable (getting smaller with the increase of RPM)

Will not be surprised if the signal is affected by RPM variations

So the new IC will have to be configured to detect falling edge.

Quote from: Louis on November 16, 2013, 01:43:44 PM
Out-coming

Is the signal taken on the IC pin ?
It looks like a normal 5V signal with falling to 0V when the IC wants to drive the spark.

Can you check with several RPM position 2000 / 3000 / 6000 if low period is
- constant (not affected by RPM changes)
- variable (getting smaller with the increase of RPM)

So the new IC should set this pin to 5V and drop to 0V for a while to drive the spark.

Will not be surprised if the signal is not affected by RPM variations

Can your oscilloscope show the both signal on the same display (twin trace)?
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

tzr-v4

Little computation before going to bed...

On your first graphic
Tpickup = 24 ms
Fpickup = 41.66 Hz

Fengine = Fpickup / 2 = 20.83 Hz

RPMengine = Fengine * 60 = 1250 rpm

Your bike is at idle  ;D
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

Louis

Hello Olivier,

Specially for you ;D

IC (pin 13) in coming signal
http://youtu.be/Skp20UTi59Q


IC (pin 22) out going signal
http://youtu.be/0WZeJgiqrXc


RPM signal (measured at the orange wire)
http://youtu.be/D0Pe_Xm5Pew

QuoteCan your oscilloscope show the both signal on the same display (twin trace)?
No, sadly its a one channel oscilloscope :-[

But, think I can get one from work if its needed.

King off all twostrokes ''TZR250 3MA''

tzr-v4

#123
Quote from: Louis on November 17, 2013, 12:50:15 PM
IC (pin 13) in coming signal
http://youtu.be/Skp20UTi59Q
OK on pin 13 signal is 5v and detection have to be done on falling edge

Quote from: Louis on November 17, 2013, 12:50:15 PM
IC (pin 22) out going signal
http://youtu.be/0WZeJgiqrXc
OK on pin 22 signal is 5v and ignition firing have to be done on falling edge

Quote from: Louis on November 17, 2013, 12:50:15 PM
RPM signal (measured at the orange wire)
http://youtu.be/D0Pe_Xm5Pew
Orange wire is normally on 2MA-1KT-3MA a signal with negative pulses (-200v).
These pulses are due to the capacitor discharge.

I'll update my pin diagram and past it here.

We need to be sure which pin 13 or 22 is the input.

Louis you can test on your bench your CDI without the IC so you 'll only have the input signal.
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

Louis

QuoteWe need to be sure which pin 13 or 22 is the input.

Louis you can test on your bench your CDI without the IC so you 'll only have the input signal.

I just did, and have to say. Had it wrong :-[

Pin 13 is OUT going signal

Pin 22 is IN going signal.

Measured it on the CDI where the IC is removed, Could only measure a signal on pin 22 :)
King off all twostrokes ''TZR250 3MA''

tzr-v4

#125
So my schematic is OK ?



Planning to use the 18F2550 for the new IC

NAME -> PIC Pin <=> OEM IC
// Power
VDD (5V) -> Pin 20 <=> Pin 42
VSS  (0V) -> PIN 19 <=> Pin 21
// Analogic To Digital
ADC_YPVS     ->   AN0      <=> Pin 36
ADC_TPS       ->   AN1      <=> Pin 35
ADC_SPEED   -> AN2        <=> Pin 33
// Logical Outputs
BLINK_LED     -> RA5    (blinking led to see that PIC is running)
YPVS_OPEN    -> RA3      <=> Pin 5 or 6
YPVS_CLOSE  -> RA4      <=> Pin 5 or 6
AIR_JET1        -> RB4      <=> Pin 27 or 26
AIR_JET2        -> RB5      <=> Pin 27 or 26
IGNITION        -> RC0     <=> Pin 22
// Interrupt
PICKUP           -> RB0     <=> Pin 13
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

Louis

#126
Hi Olivier,

Looks good to me :)
Think leaf pin 23 24 25 loose
Use pin 18 signal fore setting the PIC program back to his starting point if engine has stopped??

How can I visualize it for my self?

Will solder a socked on the original location off the IC.

The 18F2550 Ic will be placed on a small circuit board, that circuitboard has the outside pin's location the same as original IC

On that small circuitboard signal's will be routed to the pin numbers for the 18F2550
Perhaps a communication line is build on the small circuit board to??
like this?(example)


Do I see it all right like that
King off all twostrokes ''TZR250 3MA''

tzr-v4

Louis,

See the picture below.

In red what is needed to send the program to the PIC (upload the firmware).
In green what is needed to run the new CDI IC.

The new IC board only need the wires soldered around the IC to provide the power and the signals from the Yamaha CDI.

We could setup some little free space to be able to add some resistor / capacitor in case of noise on the input signals... or to protect the PIC from over loads.

Communication with PC for configuration will be done using other boards and using a 4 wires loom from the PIC (5V, 0V, Receive, Transmit)
- Serial DB9 http://www.ebay.co.uk/itm/New-MAX3232-RS232-Serial-Port-To-TTL-Converter-Module-DB9-Connector-With-Cables-/251299087033?pt=UK_Computing_CablesConnectors_RL&hash=item3a8297c2b9

- Serial USB http://www.ebay.co.uk/itm/Red-L2303HX-USB-to-TTL-Auto-Converter-Module-PL2303-Adapter-For-Arduino-4p-Cable-/390612486394?_trksid=p2047675.l4066

- Serial Bluetooth http://www.ebay.co.uk/itm/3-3-6V-Wireless-serial-port-bluetooth-module-transceiver-RF-RS232-TTL-Backplane-/251094371828?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item3a76640df4

I'll check again what is the most convenient to build the board yourself.
We can find little PIC18F2550 board in kit form.
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

tzr-v4

At the end, the board below seems very good but you need to buy a 18F2550 and a 20MHz clock to get all the hardware needed.

HARDWARE :

Board at 10US$ including a PIC16F886 to start with
http://www.ebay.co.uk/itm/iCP23-iBoard-Tiny-x28-Microchip-28pin-PIC16F886-IO-Board-Size-7cm-X-2-3cm-/281073235339?pt=LH_DefaultDomain_0&hash=item417145358b

Better PIC 18F2550 at 6.5US$ (or 18F2553)
http://www.piccircuit.com/shop/pic-microcontroller/79-pic18f2550.html

Cristal 20Mhz at 1.5US$ (to get maximum speed and later maybe USB connection)
http://www.rkonlinestore.co.uk/20mhz-3-pin-ceramic-resonator-pack-of-4-526-p.asp
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

tzr-v4

To build 4 PIC board from scratch...

Shipped to Netherlands  ::)
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

Louis

#130
Ah, Think I understand you now.

QuoteThe new IC board only need the wires soldered around the IC to provide the power and the signals from the Yamaha CDI
This IC/board we making our self, Its routes the in coming and out coming signals to our new PIC.
(It will be placed permanently on the 3MA-CDI)

If we want to program our PIC we take it out his socket and place it in a external board where we can program it.


Thought the replacement IC/board had it all
The new Programmable IC on it, and the programming connector on it


Good that i understand you now :)





King off all twostrokes ''TZR250 3MA''

Louis

#131
Still a bid confused.

You want to use the the 18F2550 for the new IC  ???

The 18F2550 IC is used on this complete board, including the programming connection.


http://www.piccircuit.com/shop/pic-dev-board/119-icp12-usbstick-pic18f2550-io-board.html

Can we not place this whole board on the CDI and connect the signals we need??
King off all twostrokes ''TZR250 3MA''

tzr-v4

Yes Louis,

This board look nice and seems to have all we need.

I've to check the diagram to see if all the input/output pins we are looking for are available on the connector.

We could have
- the serial link for PC communication (RC6 and RC7 pins)  and later the USB communication.
- the ICSP connector for onboard programming
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...

Louis

#133
Quotethe serial link for PC communication (RC6 and RC7 pins)  and later the USB communication.

Why use the USB connection later? (When its already there)
Will it be difficult to program the IC, with the use off the USB connector?

Is it easier to use the serial link for PC communication (pin RC6 and RC7) to program it?

I thought, if this Board is usable.
Connect with small wires the signals to the right location on the PIC board (directly from the pats, or from the socket)
Use a USB extension cable, plug it in the laptop, and start programming (tell it what it needs to do)
Ones it is working correct, glue it on place :) (example on the original IC location)

(This thought off me will probably be a bid to easy, keep in mind I'm not a electronica specialist) ::)

Cheers
King off all twostrokes ''TZR250 3MA''

tzr-v4

When you think about any micro-controller (not only PIC) there is 2 things about programming.

Programing the PIC:

This is downloading the firmware of the task the micro-controller will do when he boots.

There is 2 ways to download the program into the PIC :
- use an external programmer using the ICSP connector with the right software
- use a bootloader (small firmware in the PIC) which will collect the program

The use of a bootloader could make difficult the use of interrupt functions.

Programming the CDI:

This is downloading into the ROM of the PIC, the new data for the CDI firmware:
- YPVS operating RPM min and max
- the CDI curve data
- the RPM for air jet 1 and 2
- ...

This could be done through:
- the serial port communication (RC6-RC7 pins) and using an adapter (DB9 / USB / Bluetooth...)
- the USB interface of the PIC (RC5-RC6 pins) and the HID standard.

I've done many testing using serial port so I'm confident that first version will work that way.

I could also develop the Windows based software to send new parameters to the CDI program.
Olivier.
TZR250 2MA & 2XT, RD500s et TZR-V4 building...