Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Controll the speed of stepper motor.

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

*****NEVYZIADANA POSTA***** Re: Off Topic -- Energy Content of a battery. - Vernon - Nov 19 23:59:00 2003

Spam detection software, running on the system "fw2.vse.sk", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
Mail server administrator for details.

Content preview: A fully charged battery is capable of 800mah while
discharging from a full charge voltage to an end of discharge voltage.
The power supply must be designed to work over this voltage range in
order to use all the rated energy in the battery. If that is the case
and the power supply loss is 10% one will indeed have 3110 joules
available for use by the load. The capacity of the battery may vary
with the rate of discharge and the 800 mah might be specified for a
capacity test of a given time .. possibly 8 hours. The 10% power supply
loss might well be greater if the discharge cycle is extended and
leakage becomes a significant part of the energy. As others have
mentioned the anticipated temperature range might require derating the
battery. Certainly in the case of battery power it is better to have
more than you need. I might count on 2500 joules from a four hour load
test of that power supply and battery. ----- Original Message -----
From: Gary Olmstead To: Sent: Friday, November
19, 2004 8:25 PM Subject: Re: [68HC12] Off Topic -- Energy Content of a
battery. [...]

Content analysis details: (5.0 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
0.9 FROM_ENDS_IN_NUMS From: ends in numbers
1.2 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date
0.1 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS
[4.246.144.216 listed in dnsbl.sorbs.net]
2.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is a abuseable web server
[4.246.144.216 listed in dnsbl.sorbs.net]

Tato posta je pravdepodobne nevyziadana. Povodna sprava bola umiestnena
do prilohy, aby ste mohli podobnu postu v buducnosti bezpecne rozpoznat.
Ak chcete, aby tato posta bola automaticky mazana, nastavte si pravidla
na postovom servri (navod najdete na
http://vsedw.inet.vse.sk/dokumenty/rozne/help/antispam/antispam.htm )
UPOZORNENIE: nezverejnujte svoju e-mail adresu na internete

Nahlad obsahu: A fully charged battery is capable of 800mah while
discharging from a full charge voltage to an end of discharge voltage.
The power supply must be designed to work over this voltage range in
order to use all the rated energy in the battery. If that is the case
and the power supply loss is 10% one will indeed have 3110 joules
available for use by the load. The capacity of the battery may vary
with the rate of discharge and the 800 mah might be specified for a
capacity test of a given time .. possibly 8 hours. The 10% power supply
loss might well be greater if the discharge cycle is extended and
leakage becomes a significant part of the energy. As others have
mentioned the anticipated temperature range might require derating the
battery. Certainly in the case of battery power it is better to have
more than you need. I might count on 2500 joules from a four hour load
test of that power supply and battery. ----- Original Message -----
From: Gary Olmstead To: Sent: Friday, November
19, 2004 8:25 PM Subject: Re: [68HC12] Off Topic -- Energy Content of a
battery. [...]

Detaily vysledkov analyzy: (5.0 points, 5.0 required)
0.9 FROM_ENDS_IN_NUMS From: ends in numbers
1.2 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date
0.1 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS
[4.246.144.216 listed in dnsbl.sorbs.net]
2.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is a abuseable web server
[4.246.144.216 listed in dnsbl.sorbs.net]

[Non-text portions of this message have been removed]





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


RE: Off Topic -- Energy Content of a battery. - John Dammeyer - Nov 20 0:39:00 2004

Vernon..

Yes. Batteries are not totally linear especially when
temperature is part of the equation. However, I chose an
800mAH Nicad because I had one lying on my lab bench from a
defunct piece of equipment. So I used the 1.2V 800mAH value
printed on the cover. I had a Alkaline C cell too but that
would have meant doing some sort of web search to find out the
capacity of the cell. > A fully charged battery is capable of 800mah while
> discharging from a full charge voltage to an end of discharge
> voltage.

Gary.. > Well, one of us is confused. If you mean that the LOAD is
> using 0.96W etc,
> then the regulator ADDS 10%, since the losses end up as
> heat. So the total
> from the battery is 3840J.

Nope. I was trying to (perhaps wrongly) determine how many
Joules of energy was stored in the battery since it's rated to
discharge over time. I won't even begin to cover how low slow
discharge is better than high fast discharge.

The energy value in Joules as marked on the battery as being
able to supply 1.2V * 800mA = 0.92W. But it can only do that
for an hour or 3600 seconds and therefore since a Joule is a
Watt*Second I came up with 3456J. I know that the printing
isn't totally true and that a NiCad won't maintain that 800mA at
1.2V although the knee on them is pretty sharp compared to other
technologies. > If this is just a thought experiment, you're probably done,
> but in real
> life of course you have to think about the idle current of
> the power
> supply, voltage depression in the battery (commonly known
> as memory effect)
> which is especially noticeable in NiCads, low temperature
> capacity losses,
> etc. etc. etc.

Quite agree. It was more a thought experiment than a real one.
I had read a paper

"System Architecture for Wireless Sensor Networks"
by
Jason Lester Hill

In it he goes to great pains to discuss how many nanoJoules or
even PicoJoules are used by the micro-processor to execute
certain algorithms while trying stretch out battery life. I
just got confused... That's all so it was a thought experiment.
The battery products I have built have all run without
regulators but learning never stops...Running a 3V processor off
a 1.2V cell has some interesting possibilities.

Cheeers,

John > Gary Olmstead
> Toucan Technology
> Ventura CA
> www.toucantechnology.com >
> Yahoo! Groups Sponsor
> ADVERTISEMENT > --------------------------------------------------------------
> ----------------
> Yahoo! Groups Links
>
> a.. To >
> [Non-text portions of this message have been removed] >
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dN_tlB/TM
> --------------------------------------------------------------
> ------~- > Yahoo! Groups Links





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: Off Topic -- Energy Content of a battery. - Gary Olmstead - Nov 20 11:55:00 2004

At 09:39 PM 11/19/04, you wrote:
> I had a Alkaline C cell too but that
>would have meant doing some sort of web search to find out the
>capacity of the cell.

It's a good thing you don't work for
me....http://www.duracell.com/oem/primary/Alkaline/default.asp

There is also www.energizer.com which is a lot more entertaining for kids
but less interesting than the first site for engineers.

Gary Olmstead
Toucan Technology
Ventura CA
www.toucantechnology.com





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Controll the speed of stepper motor. - mahesh suddhala - Nov 20 23:26:00 2004

I would like to increase the speed of a 90 step
stepper motor. I would like to do this through the
software code.I did mess with the delay on the HC-12
but it only helped to an extent. __________________________________________________
">http://mail.yahoo.com






(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Controll the speed of stepper motor. - Author Unknown - Nov 21 13:13:00 2004

In a message dated 11/20/04 11:27:12 P.M. Eastern Standard Time,
writes:

I would like to increase the speed of a 90 step
stepper motor. I would like to do this through the
software code.I did mess with the delay on the HC-12
but it only helped to an extent.
===================================
What is the speed now? What do you want it to be? What is the speed of the
cpu? example: motor is currently stepping 200 steps/sec (5ms per step) and this
takes most of the cpu, say 80%.... you want to speed up to 300 steps/sec
(3ms/step).... is there enough cpu left? Will the motor step that fast with the
load it has without missing a step? How do you measure the speed now? Have a
scope? [Non-text portions of this message have been removed]





(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

RE: Off Topic -- Energy Content of a battery. - John Dammeyer - Nov 22 0:13:00 2004

Hi Gary,

Probably a good thing I don't work for you. I'd hate to be
yelled at for not using the information right in front of my
nose written on the battery sitting on my desk rather than
searching the web for information that I didn't need.

John >
> At 09:39 PM 11/19/04, you wrote:
> > I had a Alkaline C cell too but that
> >would have meant doing some sort of web search to find out
the
> >capacity of the cell.
>
> It's a good thing you don't work for
> me....http://www.duracell.com/oem/primary/Alkaline/default.asp
>
> There is also www.energizer.com which is a lot more
> entertaining for kids
> but less interesting than the first site for engineers.
>
> Gary Olmstead
> Toucan Technology
> Ventura CA
> www.toucantechnology.com >
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dN_tlB/TM
> --------------------------------------------------------------
> ------~- > Yahoo! Groups Links




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Controll the speed of stepper motor. - mahesh suddhala - Nov 22 20:14:00 2004

I appreciate your help. The information that you
provided me did help me to increase the speed of my
motor.

Ok know I am using this motor in order to push the
cash out of a money dispenser. I am posting a copy of
my code. In this code I am using a condition, only if
this condition is satisfied then only my stepper motor
is going to work, well the hardware for this condition
is designed with the help of frequency emitters and
receivers. But my problem is that the motor should be
able to stop after the required number of bills are
dispensed. In other words, HC-12 should be able to
keep a track of number of bills that are being
dispensed and the motor should stop after required
number of bills are dispensed. I will be having a
infrared emitter and receiver set at the end of the
money dispenser and as soon as the bill comes out the
dispenser will get a low and high, when ever certain
pin on the dispenser goes low, the count variable
should increase and if the count is equal to the
number of bills the program has to look for another
entry.

#include "hc12.h"
#include <stdio.h>
#include "motor.h"
#define DELAY1MS 73

#define con 0x700;
void delay1ms(int); float input, output, output1;
void main(void)

{int k, j;
int i ;
int bills = 10;
int count = 0;
// int DDRT, PORTT, DDRS, PORTS;
DDRT = 0x0f;
DDRS = 0x00;
//DDRP = 0x00;
//if ((PORTS & 0x01) == 0x01)
//{ for (;;)
{

for ( i = 0;i < 1000 ;i++ )
{ if ((PORTS & 0x10) == 0x00)
{
PORTT = 0x00;
PORTT = full[i];
delay1ms (1);
//delay1ms (1000);
//delay1ms (1000);
//delay1ms (1000);
//delay1ms (1000);
}
else ((PORTS & 0x10) == 0x10);

delay1ms (1);
//delay1ms (1000);
//delay1ms (1000);
//delay1ms (1000); }
if ( (PORTS & 0x01) == 0x01)
{

if (count < bills)
{
count++;
}
else(count = bills)
asm("swi");
}
}

}

void delay1ms(tm)
{

int i;
for (i = 0; i < tm*200; i++)
{
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("nop");
asm("nop");
}
}
--- mahesh suddhala <> wrote:

> I would like to increase the speed of a 90 step
> stepper motor. I would like to do this through the
> software code.I did mess with the delay on the HC-12
> but it only helped to an extent. > __________________________________________________
> ">http://mail.yahoo.com __________________________________




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Controll the speed of stepper motor. - mahesh suddhala - Nov 22 20:20:00 2004

I appreciate your help. The information that you
provided me did help me to increase the speed of my
motor.

Ok know I am using this motor in order to push the
cash out of a money dispenser. I am posting a copy of
my code. In this code I am using a condition, only if
this condition is satisfied then only my stepper motor
is going to work, well the hardware for this condition
is designed with the help of frequency emitters and
receivers. But my problem is that the motor should be
able to stop after the required number of bills are
dispensed. In other words, HC-12 should be able to
keep a track of number of bills that are being
dispensed and the motor should stop after required
number of bills are dispensed. I will be having a
infrared emitter and receiver set at the end of the
money dispenser and as soon as the bill comes out the
dispenser will get a low and high, when ever certain
pin on the dispenser goes low, the count variable
should increase and if the count is equal to the
number of bills the program has to look for another
entry.

#include "hc12.h"
#include <stdio.h>
#include "motor.h"
#define DELAY1MS 73

#define con 0x700;
void delay1ms(int); float input, output, output1;
void main(void)

{int k, j;
int i ;
int bills = 10;
int count = 0;
// int DDRT, PORTT, DDRS, PORTS;
DDRT = 0x0f;
DDRS = 0x00;
//DDRP = 0x00;
//if ((PORTS & 0x01) == 0x01)
//{ for (;;)
{

for ( i = 0;i < 1000 ;i++ )
{ if ((PORTS & 0x10) == 0x00)
{
PORTT = 0x00;
PORTT = full[i];
delay1ms (1);
//delay1ms (1000);
//delay1ms (1000);
//delay1ms (1000);
//delay1ms (1000);
}
else ((PORTS & 0x10) == 0x10);

delay1ms (1);
//delay1ms (1000);
//delay1ms (1000);
//delay1ms (1000); }
if ( (PORTS & 0x01) == 0x01)
{

if (count < bills)
{
count++;
}
else(count = bills)
asm("swi");
}
}

}

void delay1ms(tm)
{

int i;
for (i = 0; i < tm*200; i++)
{
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("psha");
asm("pula");
asm("nop");
asm("nop");
}
}
--- mahesh suddhala <> wrote:

> I would like to increase the speed of a 90 step
> stepper motor. I would like to do this through the
> software code.I did mess with the delay on the HC-12
> but it only helped to an extent. > __________________________________________________
> ">http://mail.yahoo.com __________________________________




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Controll the speed of stepper motor. - Gary Olmstead - Nov 26 23:17:00 2004

At 10:13 AM 11/21/04, you wrote: >example: motor is currently stepping 200 steps/sec (5ms per step) and this
>takes most of the cpu, say 80%....

80%? For a stepper motor? Why would it be taking even 1%?

Maybe for S curve acceleration (and then only if you aren't using table
look up), but for straight running?

Gary Olmstead
Toucan Technology
Ventura CA
www.toucantechnology.com




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Controll the speed of stepper motor. - Author Unknown - Nov 27 10:05:00 2004


In a message dated 11/26/04 11:35:39 P.M. Eastern Standard Time,
writes:

80%? For a stepper motor? Why would it be taking even 1%?
=============================
I was recalling some 9.8mhz hc11 stepper apps that used programmed io and a
delay loop to tune the step speed, as opposed to interrupts, and the prog
looped about about the same speed as the step rate [Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )