# Ideal Processor? $12.99 each.



## coulombKid (Jan 10, 2009)

I mentioned the advantages of using a Parrallax Propeller micro-processor as a development platform for an AC drive. Accept my apologies for starting a new thread on this but I'm trying to attract a wider knowledge base on this promising technology. I found the Propeller (uPx8) costs $12.99 on a single part buy from Digikey. (about 1/8 the cost of a competing uP) I've programed uPs before and designed all the I/O but will need the aid of anyone who has experience coordinating the actions of 8, count-em eight, micro-processors. If the timing using their Spin compiler gets too hairy I can start converting parts of the code to ASM. I've used Microsoft ASM but have never used Parrallax's version.


----------



## ga2500ev (Apr 20, 2008)

I think I posted a suggestion about Forth the Propeller after your last message. You can find it here:

http://www.cliff.biffle.org/software/propeller/forth/index.php

Advantages are that it's about 10x faster than SPIN and is self hosted. Drop it on the Propeller, hook up a serial interface and get to work.

The only disadvantage of the propeller is that individual processors do not have continual access to common memory and IO. It's serial access. So while you can compute more, sharing and controlling speeds are more limited.

ga2500ev


----------



## coulombKid (Jan 10, 2009)

ga2500ev said:


> I think I posted a suggestion about Forth the Propeller after your last message. You can find it here:
> 
> http://www.cliff.biffle.org/software/propeller/forth/index.php
> 
> ...


Thanks a bunch. Looks like the way to go.


----------



## samborambo (Aug 27, 2008)

Sensorless AC drive can be done with a cheap Microchip dsPIC. They also have example source code that runs AC induction, AC synchronous and BLDC - all sensored or sensorless with vector control. Why bother learning a totally new language and writing the code from scratch?

Sam.


----------



## coulombKid (Jan 10, 2009)

ga2500ev said:


> I think I posted a suggestion about Forth the Propeller after your last message. You can find it here:
> 
> http://www.cliff.biffle.org/software/propeller/forth/index.php
> 
> ...


The data sheets for my chip indicate the the processor nodes all do-in-fact have continuous access to the inputs and outputs. That is why they have built in logic gates to prohibit conflicting output commands from competing nodes. I don't really see a problem for each node to wait it's turn to read control variables and/or update them. At 20 MIPs per processor the data updated by node 0 would be available for all the nodes that follow around the hub.


----------



## coulombKid (Jan 10, 2009)

samborambo said:


> Sensorless AC drive can be done with a cheap Microchip dsPIC. They also have example source code that runs AC induction, AC synchronous and BLDC - all sensored or sensorless with vector control. Why bother learning a totally new language and writing the code from scratch?
> 
> Sam.


Here in the good old USofA my hours have been cut 10%, so have my wife's. We have the time to learn it. We've seen a lot of commercial development "foot-dragging" on EV products ever since Mobil/Exon bought up the rights to the Ovid battery that was essential for continued use of the EV1. We see similar foot-dragging/refusing to sell to small developers on wheel mounted traction motors and lithium batteries. Only when the know how is common place will the paper wad be broken. The wealthy US republican fat cat's lament here is that "We have the finest Congressmen that money can buy. The trouble is they don't stay bought."


----------



## ulnpiper (Sep 24, 2008)

Check your PMs, I'm interested in working on a Propeller AC controller design. -gary


----------



## samborambo (Aug 27, 2008)

coulombKid said:


> Here in the good old USofA my hours have been cut 10%, so have my wife's. We have the time to learn it. We've seen a lot of commercial development "foot-dragging" on EV products ever since Mobil/Exon bought up the rights to the Ovid battery that was essential for continued use of the EV1. We see similar foot-dragging/refusing to sell to small developers on wheel mounted traction motors and lithium batteries. Only when the know how is common place will the paper wad be broken. The wealthy US republican fat cat's lament here is that "We have the finest Congressmen that money can buy. The trouble is they don't stay bought."


I'm a little confused - you quote my post and then start on a political rant that's completely unrelated. Regardless of how bad the US economy is, there's no point in reinventing the wheel. There's dozens of microcontroller platforms out there with proven and free open source code already available. Then again if you want to waste time "pioneering" something that's already been done, by all means, fill your boots.

Sam.


----------



## judebert (Apr 16, 2008)

The examples you specified are copyrighted, and may not be used for any other processor. IMHO, that's a good reason to come up with your own implementation. 

And I am, in Java.


----------



## samborambo (Aug 27, 2008)

Copyright? Yeah, excellent excuse. CoulumbKid, I'm not trying to be obnoxious. I've been doing embedded programming for years and with undertaking such a complex project, the less you have to design scratch and learn new CPU architectures, the better. Starting with a working example and figuring out how it works so that you can adapt it to your own purposes is a lot more intuitive.

And JAVA? Are you serious? Why not try a less unintuitive language like:

http://cydathria.com/bf/brainfuck.html

Sam.


----------



## Qer (May 7, 2008)

judebert said:


> And I am, in Java.


Java and embedded software with moderate real time demands in a micro controller will work as smoothly as a drunk elephant dancing ballet in a glassware store.

Just don't.


----------



## ulnpiper (Sep 24, 2008)

Rather than go down a discussion of Java, lets get back on track regarding the Propeller chip.

The reason's I believe it has a lot of possibility as a controller chip are the following:
- built in A/D converter capability
- PWM mode on the counters
- built in sine look up table (only needed if your algorithm requires generating a sine wave...more on that later)
- built in ability to interface to VGA, mouse and keyboard
- no need for an EEPROM/chip programmer (Propeller connects directly to your USB out of the box and you download your code from your PC)
- free development environment for object oriented SPIN and assembler code
- 8 processors, so there's not really a concept of interrupts, you just dedicate a processor to a task.
- development boards with all this are only $32 USD + $15 for the VGA, mouse & keyboard interface

I'd originally planned to use a dsPIC, as was pointed out, there is a lot of code already developed for not only V/f algorithms (where you need the sine lookup table), but sensorless vector control, etc.

To run the PIC required not only getting a development board $100USD, but also a PIC programmer. The code mentioned previously is available for download, but its all in C. Unfortunately, I don't know C and don't have a C compiler, so I'd have to buy or find an open source C compiler, learn C, learn how to adapt their programs to what I want it to do...

Since I'm an old assembler programmer the propeller seems a better choice, even if it is somewhat 're-inventing the wheel'. It seems to have a lower entry point for the homebuilder as that is what it is designed for.

I don't see lots of AC controllers available, and none for a reasonable price. Therefore there's a need for experimentation in this area. For me this is a hobby, and hopefully I come out of it with something workable that can result in an EV and help save the planet at the same time. If not, then I'll buy a DC controller, motor and be done with it.

..so every one relax and lets all get along 

Peace,
Gary


----------



## coulombKid (Jan 10, 2009)

ulnpiper said:


> Rather than go down a discussion of Java, lets get back on track regarding the Propeller chip.
> 
> The reason's I believe it has a lot of possibility as a controller chip are the following:
> - built in A/D converter capability
> ...


My wife knows Java but I don't. Its fine for web pages but last time I looked at the Sun Microsystems disclaimer for usage, they didn't recommend it for control systems. I down loaded the Forth compiler recommended to me by another member. Haven't given that a go yet.


----------



## judebert (Apr 16, 2008)

To end any further discussion on Java here, allow me to affirm that I have no intention for Java to be used on an embedded processor.

Rather, a lot of the work we do in the programming world is prototyped first in Java and then translated to whatever language is required for the final product. This allows rapid prototyping, as well as testing algorithms separately from hardware implementations.

After I get the algorithms implemented in Java, I've offered to translate them to any language for any processor, for free in my spare time. Unfortunately, that spare time is severely limited lately, partly due to problems with my actual electric vehicle.

I'm sorry to have gotten you sidetracked on this issue. The main point of my post was: restrictive copyrights restrict product improvement, prevent adoption in real-world applications, and stifle innovation. Therefore, reimplementing this algorithm from scratch can be justified because the original code is copyrighted without a permissive license.


----------



## coulombKid (Jan 10, 2009)

samborambo said:


> I'm a little confused - you quote my post and then start on a political rant that's completely unrelated. Regardless of how bad the US economy is, there's no point in reinventing the wheel. There's dozens of microcontroller platforms out there with proven and free open source code already available. Then again if you want to waste time "pioneering" something that's already been done, by all means, fill your boots.
> 
> Sam.


The game is afoot. The deadline is December 1st, 2009. First prize is $2000, second place $1000, third place $700. Some of my chips have come in and LabView for the Propeller is on the way. I have the processor, A/D chip, hall effect current sensors, opto-isolated IGBT drive switches, IGBTs, DC-DC isolated power supplies..........offhand I'd say its GAME ON!
http://www.parallaxinc.com see propeller design competition. How much is Microchip paying these days.


----------



## coulombKid (Jan 10, 2009)

*Design competition update*



coulombKid said:


> The data sheets for my chip indicate the the processor nodes all do-in-fact have continuous access to the inputs and outputs. That is why they have built in logic gates to prohibit conflicting output commands from competing nodes. I don't really see a problem for each node to wait it's turn to read control variables and/or update them. At 20 MIPs per processor the data updated by node 0 would be available for all the nodes that follow around the hub.


 As soon as Parallax announced their design competition with $4000 total in prizes the US domestic supply of Propeller 40 pin dips disappeared. Thank goodness I ordered mine early. If you like surface mount chips they still have plenty of them. All but one of the support chips have come in. I purchased 1 watt DC-DC supplies to drive my IGBT gates from China. The DC power supply for bench testing is complete.


----------

