The Energy Experimenting People.
The Energy Experimenting People.
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?





 All Forums
 Forums
 Pulse type motors.
 Microcontroler pulse motor controll system V2
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

comwarrior
Moderator


United Kingdom
477 Posts

Posted - 13/10/2009 :  2:25:07 PM  Show Profile  Click to see comwarrior's MSN Messenger address  Reply with Quote
As some of you will be aware i'm using a PIC microcontroler to controll the timings for my pulse motor...
I've been expanding it and expanding it to do various tasks and display lots of information...

Here is a pix of what it looked like last night complete with notes...



So, lets explain it...
LCD display - should be odvious, it's a 2 line, 16 charecters per line, displays any info that i want it to such as RPM and voltages etc...
BEMF output - No explaination required
Primary coil drive circuit - this is the trigger input and drive output circuit
Microcontroler - this is the chip with everything on it...
Voltage devider 1:4 ratio - this is a voltage devider using 4 100K resisters so that the PIC can measure the voltage i'm using to drive the system

Now the board that sticks up thats labeled 5ohm resistance and 2 voltage deviders this is the fun one to explain...
I've been writing a program to automaticaly monitor and re-tune the timings... However, to begin with the only 'feedback' into the program was RPM, so i added the first Voltage devider and had an voltage input...

And then i was thinking about how a multimeter measures resistance and realised if i measured the voltage ether side of a resister inline with the load i can then deduct one from the other to get a voltage diference and then use the formula V=IR...
The question was, what high wattage resisters do i have and what do i need?
Well, I used V=IR and assumed certain values, current (I) = 200mA & Voltage = 1 volt the resistance would therefor need to be 5 ohms and luckerly i had a load of higher wattage resisters that i could put in parallel and make 5 ohms....
It means that if i pull 200mA i get a voltage drop of 1 volt, however, i can compensate for that...
so, with voltage deviders ther side of the 5 ohm resistande i can therefor measure the diferences and calculate the current consumption...
Therefor, the auto tune have RPM, Voltage and Current inputs that it can use to calculate the efficiency of it's settings and use that to find which ones are best...
A change in input voltage and/or RPM for any reason would spark and automatic retune...

However, i discoverd a problem... as my code started seriously growing and the PIC started doing more and more work per cycle, the number of cycles persecond started plumeting and as such my pulse motor scanning started suffering and occationally it started missing pulses...

So, to fix this problem i purchased another PIC, a serious PIC... and i decided to split the code...
I'm using my 16F877A running at 20MHz to scan and controll TWO bililer coils. once per second RPM info is sent via High Speed serial to a second PIC and Any change in a timing value is recieved via HS serial from the second PIC...
The second pic is an 18F4550 running at 48MHz with more advanced maths processing... It runs through a loop constantly scanning the voltages and curent draw and recieves the RPM info every second...
So, the PIC18 does all the maths and the PIC16 does the controll...

So whats the cost... well, I'm going to power the PIC's from a 5volt power pack and i'm not going to measure what their consuming at this stage, it's not what i'm looking at...
As for monetry cost, well the PIC16 costs about £3 each and the PIC18 was £5, 2 crystals costing £0.50 each, LCD display costing £10 and strip board £1 per board... and thats about it... Everything else was salvaged...
Software, well, MicroCode studio lite is a free download... Pic Basic PRO compiler unfortunatly is expensive at £170 but i allready had it for another project... Pic Basic Lite is £60 but only has beginner level capabilities and when you start doing some of the more advanced stuff you need the PRO version...

The controll system is one of 3 areas i'm looking at... I'm on them all at the same time...
1) Generator side
2) Controll side
3) Power Recovery/re-use

I hope people found this informative...


----------------------------------------------------------------------------------------------------------

Generator Systems Moderator

"Energy can not be created nor distroyed, it can only be changed into other forms" - so lets do some changing!
"Every Action has an equal and opposite re-action" - Why not use the re-action to create an additional action?

95% efficiency, I dare you to do better!

http://www.youtube.com/user/comwarrior69

BiDaDiKuNuKu
Advanced Member



Netherlands
333 Posts

Posted - 16/10/2009 :  08:59:48 AM  Show Profile  Reply with Quote
hi m8,

your PIC microcontroler looks awesome...nice job there...:))

Peace!
V2DAY

http://www.youtube.com/user/BiDaDiKuNuKu

"1 often meets his destiny on tha road he takes 2 avoid it"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Energy Experimenting People. © 2000-05 ForumCo.com Go To Top Of Page
Snitz Forums 2000
RSS Feed 1 RSS Feed 2
Powered by ForumCo 2000-2008
TOS - AUP - URA
ForumCo Free Blogs and Galleries
Signup for a free forum or Go Banner Free