Community
Search
Notices
Engine Conversions Discuss all aspects of engine conversions in this forum

CDI gr8flyer55

Thread Tools
 
Search this Thread
 
Old 09-22-2012, 04:16 PM
  #376  
gr8flyer55
Senior Member
 
Join Date: Nov 2005
Location: Hamburg, PA
Posts: 805
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Charlie, sent you hotmail..

John
Old 09-22-2012, 05:02 PM
  #377  
gr8flyer55
Senior Member
 
Join Date: Nov 2005
Location: Hamburg, PA
Posts: 805
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Jake, made all the recommended edits, changed my curve slightly to reflect the redline limits per rpms, compiled (again), programmed 2 chips this time, put one aside marked test#8, installed the other one. Fired up the engine in the dark and success! Timing light LED works great too. It tracks tru to the curve, accelerating and decelerating. Easy to start, hot restarts are a breeze.
Now I have two test timers working with a total of 4 separate curves. Added a pin and alligator clip to one timer to ground connection. Works for changing the curve great. Also when used as a kill to pin #3 it stops the ignition.
A side note here from the last edits you mentioned before the final edits. When you first power up, it waits about 1 second, fires one spark, then is ready to accept sensor input. Working great Jake!! Give yourself a big pat on the back, job well done!

Very happy with all the work you did. Any tweaking you do from here on out is icing on the cake.

John
Old 09-23-2012, 12:12 AM
  #378  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Jake,
Just wondering with all this testing going on , how much would be entailed in writing a small program say for 12F683 that could take inputs from the hall effect and the existing micro output, take the time difference and with rpm as a reference, output degrees delay on an LCD display.

As John said earlier, playing in and around a spinning prop gets a bit iffy at times so just a thought to keep away from the prop with the timing light LED.

Old 09-23-2012, 02:18 AM
  #379  
BobbyMcGee
Senior Member
 
Join Date: Jan 2012
Location: South Florida
Posts: 375
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

This is way over my head. I don't even know what CDI stands for!

I looked at the video too. All I saw was a little green light. It didn't look like it was flashing to me. It looked like it was just on steadily. If it was flashing at 800 times a minute, I certainly didn't see that. I can't count to 800 in a minute, let alone see anything flashing that fast ... no one can.

I'm outta here. Talk like this never made anyone the hit of the party or got them a woman. I'm headed to a bar for a drink and to hit on women.


ORIGINAL: av8tor1977

This is why I never followed the "new" CDI threads. Way over the heads of most people in this forum. I can build small do it yourself electronics projects, and usually figure out schematics, but I've never seen anything that a layman could understand, follow, nor build in your posts. If it ever becomes a simple, easily understandable by a layman/beginning electronics experimenter project, then I would be interested, as I imagine many more here in the forum might. Meanwhile, you are just "talking far over the heads" of most people here I would venture to say...

AV8TOR
Old 09-23-2012, 02:36 AM
  #380  
COM
Senior Member
 
Join Date: Jun 2009
Location: Ga, GA
Posts: 396
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55


how much would be entailed in writing a small program say for 12F683 that could take inputs from the hall effect and the existing micro output, take the time difference and with rpm as a reference, output degrees delay on an LCD display



A 12F683 by itself won't work for writing to a lcd. you need a pic with more pins or use a serial lcd.

But that would be a neat little device.
Old 09-23-2012, 02:51 AM
  #381  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Hi Com,
I found this circuit here that uses a 75HC595 shift register that only require 3 lines from the micro.
Might end up not being quick enough though.

http://www.electronics-lab.com/proje...015/index.html
Old 09-23-2012, 03:42 AM
  #382  
COM
Senior Member
 
Join Date: Jun 2009
Location: Ga, GA
Posts: 396
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

HI BlueJets,

Yea I know about those,but why use a pic and a shift register when you can just one 18 pin pic?
Old 09-23-2012, 03:58 AM
  #383  
jpanhalt
 
Join Date: Oct 2005
Location: Parma Heights, OH
Posts: 168
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

ORIGINAL: COM

how much would be entailed in writing a small program say for 12F683 that could take inputs from the hall effect and the existing micro output, take the time difference and with rpm as a reference, output degrees delay on an LCD display
A 12F683 by itself won't work for writing to a lcd. you need a pic with more pins or use a serial lcd.

But that would be a neat little device.
I wrote a little program (Assembly) last Winter for a 12F683 to take the PWM from a Memsic accelerometer, convert it to angle inclination and transmit that angle to a 2X16 serial LCD. The input was just the PWM. Times for the start, stop, and total period of the PWM cycle were detected and measured at about 200 Hz. The inputs you are talking about would be very similar. Obviously, it is not a plug-in, ready to go program for this application, but it is quite similar. I won't have time to work on it until later this Winter and after I finish extension of the project to a GLCD. If someone wants the code to work on, I can send it to you, but it is quite rough. I am just a novice at programming.

It is a neat idea, and I mention the above only to illustrate that it is doable maybe as a future refinement.

John
Old 09-23-2012, 04:07 AM
  #384  
COM
Senior Member
 
Join Date: Jun 2009
Location: Ga, GA
Posts: 396
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

I am just a novice at programming
Hi jpanhalt,

That sounds interesting. If you are doing it in asm then you are more than a novice programmer.... at least in my opinion. I might take a stab at doing it. I will have to think on it a little more though.
Old 09-23-2012, 04:13 AM
  #385  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

John,
I've been trying to self-educate on assembly for the last 6 months or so. I can manage so far to dig my way through existing code and try to make sense of it all but it is a long hard haul.
Would appreciate a copy.

Old 09-23-2012, 04:24 AM
  #386  
COM
Senior Member
 
Join Date: Jun 2009
Location: Ga, GA
Posts: 396
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55


I'm headed to a bar for a drink and to hit on women
Bobby, 5:18am seems a little early or late for the bar
Old 09-23-2012, 04:52 AM
  #387  
Gompy
Senior Member
 
Gompy's Avatar
 
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

If the bar is open, it's never to early or to late [8D]
Old 09-23-2012, 04:55 AM
  #388  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

As they say, it's always 5 o'clock somewhere.
Old 09-23-2012, 12:07 PM
  #389  
jakestew
Senior Member
 
Join Date: Aug 2011
Location: Moscow, ID
Posts: 144
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55


ORIGINAL: BobbyMcGee
I'm outta here. Talk like this never made anyone the hit of the party or got them a woman. I'm headed to a bar for a drink and to hit on women.
LOL Some day you'll be looking for an excuse to get away from your woman so you can work on your CDI.


I don't see all that much more that can be done with the current processor. It doesn't have a UART for serial communications, and in any case we only have one spare pin left and it's currently tied to ground.

We're pretty limited by our low pin count at the moment. With the 12F1840 we can play around with things more by moving features to control via the serial port. Any device that can read serial output will be able to display different things.


-Jake
Old 09-23-2012, 02:36 PM
  #390  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55


ORIGINAL: jpanhalt

If someone wants the code to work on, I can send it to you, but it is quite rough. I am just a novice at programming.

It is a neat idea, and I mention the above only to illustrate that it is doable maybe as a future refinement.

John
Received code ok....thanks

Jake,
Idea was as a stand-alone device.
I'll see how far I can get, might take me a while though, fairly new at assy. and although there are many sources for information, it's difficult to narrow down particular enquiries. Thanks again....Jeff
Old 09-23-2012, 08:58 PM
  #391  
jakestew
Senior Member
 
Join Date: Aug 2011
Location: Moscow, ID
Posts: 144
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

I would probably not be too difficult to output a PWM signal in relation to the RPM. All the hardware is still unused, all I use in the program is Timer1 and the GP2 interrupt.

You could also use the voltage reference output to put out a voltage in reference to the RPM (on GP1/pin 6). That's a fairly common technique. You can then read it with just a volt meter, or interface it with some other sort of readout.

In any case you'll save yourself a world of pain by just learning C. Assembly is terribly unpopular and just not that well suited for programming anything complex. C is every serious programmer's first language and everything after that is relatively easy. Learning assembly is kind of like learning how to hand stitch when you want to be a clothing designer. Sure, you need to know the basics of sewing, but in the real world most clothing is made with sewing machines. It's interesting to know the mechanics of how each kind of stitch is done step-by-step, but you could also just flip a switch on the machine and start learning how garments are made.

I just kind of find that assembly is tedious and non-portable, and it distracts from the big picture of the whole program. With today's optimizing compilers you'll usually end up spending twice as much time writing something in assembly, but unless you're very, very good the C compiler will usually produce better code in the end.

Check out...
http://www.gooligum.com.au/tut_midrange.html

These guys have excellent tutorials on PIC programming. They teach everything in assembly first, then they have the same lessons in C. For every example they compare the lines of code, size, and speed for assembly vs. C. I referred to these tutorials quite a bit when writing the CDI program.


-Jake
Old 09-24-2012, 12:30 AM
  #392  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Thanks for the advice Jake, much appreciated.

The pic lessons you refer to are the ones I'm using at present.(Gooligums)

I asked many places and some advised that learning the assy would be an asset which-ever way you go so that's pretty much why I chose that route.

Always like to have a full understanding of what is happening and why.

Left over from the early days of learning electronics I guess.

I do have all the other lessons though.
Old 09-24-2012, 02:48 AM
  #393  
jpanhalt
 
Join Date: Oct 2005
Location: Parma Heights, OH
Posts: 168
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Assembly versus C discussions for newbies (I include myself as a newbie) are like discussing which is "better" Metric or Imperial measures. They never end. Each has its place. The arguments supporting C versus Assembly can be used to support using other HLL's instead of C. If you write relocatable Assembly and use assembler directives, it even starts to look like C, minus the formatting characters. Some serious programmers still use Assembly. Check out the Microchip forums and search on Olin Lathrop for examples. You will find others who also use Assembly.

Anyway, I am sorry to have unintentionally started that discussion. C is a great programming language to use for some microcontrollers. I use Assembly, because that is all I know even a little of, and its full featured compiler is included in MPLAB free. I also have not ventured beyond the mid-range PIC's (i.e., 10F, 12F and 16F series). Note, other compilers and simulators are available that have a more graphical feel to them.

Now for tutorials, I find Gooligum excellent, but like many tutorials, it will sometimes introduce something without fully explaining it at the newbie level first. Here is a list of some other tutorials and resources I have used:

http://www.amqrp.org/elmer160/lessons/
http://www.mstracey.btinternet.co.uk/index.htm
http://winpicprog.co.uk/pic_tutorial.htm
http://www.gooligum.com.au/tutorials.html
http://www.mikroe.com/en/books/picbook/0_Uvod.htm

For the Art of Assembly Language:

http://webster.cs.ucr.edu/AoA/Windows/HTML/AoATOC.html

For code examples, math routines, radix conversions, serial communication, etc:

http://www.piclist.com/techref/piclist/index.htm

When I first started Assembly, Gooligum was not around, and I had the first three options listed. I tried to use all three, but found that was confusing. I settled on Elmer160. Now that I have written a few programs, I rarely go back to those first three tutorials and either go to Gooligum, PicList, or the Art of Assembly. I usually hit PicList first if I am looking for code examples and Gooligum if I am missing a concept.

Edit: Winpicprog have also been converted to C language tutorials. See: http://www.electro-tech-online.com/

John
Old 09-24-2012, 02:56 AM
  #394  
Gompy
Senior Member
 
Gompy's Avatar
 
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

http://www.picbasic.nl/indexes_uk.htm
Old 09-24-2012, 06:42 AM
  #395  
bluejets
 
Join Date: Mar 2009
Location: xnot applicable, AUSTRALIA
Posts: 293
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Thanks so much to everyone for the programming links and advice.

Many approaches to consider.

John,
I have also found it difficult to understand some explanations in certain tutorials and tend to jump over to another like Mikro to get some grasp of what they mean.

Started to think it was just my brain getting older and unable to suck in the info like it used to do.

Gompy,
Had a quick look at the site in UK ...getting a bit late here so look more tomorrow..

Thanks again.......
Old 09-24-2012, 06:51 AM
  #396  
Gompy
Senior Member
 
Gompy's Avatar
 
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Nice / cheap program and hardware to learn programming.
http://www.hackinglab.org/pinguino/index_pinguino.html
Old 09-24-2012, 08:20 AM
  #397  
jakestew
Senior Member
 
Join Date: Aug 2011
Location: Moscow, ID
Posts: 144
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

It's way too easy to get sucked into debates! Before I started here I hadn't used PICs before or seen assembly in a very long time. PIC programmers seem to be one of the few assembly holdouts left.
I've always had a strange combination of respect, pity, and disdain for assembly programmers. On the one hand it's a tribute to their skills that they have the brains to think like a computer, on the other hand things are so much easier in C so they either spend a lot more time or are simply a lot better than me. By the same token, it often seems so arrogant for them to think that they can directly manipulate the hardware in a better way than the C compiler writers.

But there's really not much of a debate over the two. Assembly is not a real programming language, it's simply directly manipulating the hardware. I know that I don't want to have to learn each instruction of every processor, and that even if I did, 9 times out of 10 I'm not going to come up with a better way to make the hardware implement an "if" statment, "for" loop, or do basic math.
I commented every line of code in Nyemi's program, looking up lot's of the instructions, and I still don't think I really fully understood exactly what it was doing at all times.

My program seemed to work out great though. Nyemi and I both seem to have the same 51 uS algorithm correction value, so apparently our code is exactly equally efficient. I run at twice the speed (8 MHz), but I'm also loading 16-bit table values, using 16-bit timer values, and doing dividing and rounding on the revolution timer values.

In any case, the main reason for us to use C in an open source community project is because C is much more readable, portable, and it's 90% of programmers' first language. I'd love to have more devs onboard, and I'm willing to put this project on Github or Google Code so we could all work on it simultaneously. If anyone sees anything in the code they don't understand 100%, please ask me about it. Fresh eyes and beginners not understanding something and asking about it is the best way I know of to find better ways to do something. My math skills are pretty weak, as far as programmers go, so I'd love to have some math experts helping out.

I also haven't written much for Windows/GUI programs in the past. So it would be great if someone could help me write an interface program. I'm not looking forward to doing that all that much. If anyone knows a good way to easily turn a spreadsheet into a standalone program that the source code can still be worked on that would be pretty nice. Let me know!


In other news... I'm working on loading the user settings into the tables so they will also switch with the table switch. That should be handy for tweaking startup settings. I'm also working on having the spreadsheet directly generate the hex file so that people don't have to install and use the compiler for each change.


-Jake
Old 09-24-2012, 10:21 AM
  #398  
jakestew
Senior Member
 
Join Date: Aug 2011
Location: Moscow, ID
Posts: 144
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Thanks for the tutorial links jphanalt. I had a fairly hard time finding PIC tutorials and examples for C when I started.

I liked the Googlium tutorials so well I made an offline version and removed the PDF security so I could cut and paste from them. If anyone wants a copy of those, just email me.


-Jake
Old 09-25-2012, 04:36 AM
  #399  
Gompy
Senior Member
 
Gompy's Avatar
 
Join Date: Jul 2010
Location: Alkmaar, NETHERLANDS
Posts: 404
Likes: 0
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

@Nyemi, why don't you awnser mail or PB's ?

PS, hi iura
Old 09-27-2012, 04:40 PM
  #400  
COM
Senior Member
 
Join Date: Jun 2009
Location: Ga, GA
Posts: 396
Received 0 Likes on 0 Posts
Default RE: CDI gr8flyer55

Hi Rob,

Nyemi does answer my emails either. I guess he is busy.


Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.