MSP430F2013

View: New views
10 Messages — Rating Filter:   Alert me  

MSP430F2013

by inta_l_batrak_ya_aoun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

this is my first post to this group. I am facing a dilema working on a
project. I have designing a braking system for wheelchairs that uses
the following:
hall effect sensor
distance sensor
stepper motor

what i want to do is to program an MSP40f2013 in c to do the following:
get measurments from the sensors every 0.25 s
if one of the values read from the sensors exced some threashold turn
the stepper motor x degrees clockwise.

Can anyone help me out here?


Parent Message unknown RE: MSP430F2013

by Dan Muzzey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Once again, this sounds like a homework question.  Its best to come
clean about stuff like that.  Your application doesn't look to
difficult.  In fact, it looks extremely easy.
 
So, for starters, get a C compiler.  Put a block diagram together.
Include the power supply, sensors, and how your gonna get data from here
to there.  Otherwise, design the homework assignment.  If you have a
specific question such as "what am I doing wrong here?  Port XYZ doesn't
seem to be giving me the results I expected" then we can help.  We
cannot design the system.
 
Dan
 
________________________________

From: msp430@... [mailto:msp430@...] On Behalf
Of inta_l_batrak_ya_aoun
Sent: Thursday, September 11, 2008 8:35 PM
To: msp430@...
Subject: [msp430] MSP430F2013
 
Hi,

this is my first post to this group. I am facing a dilema working on a
project. I have designing a braking system for wheelchairs that uses
the following:
hall effect sensor
distance sensor
stepper motor

what i want to do is to program an MSP40f2013 in c to do the following:
get measurments from the sensors every 0.25 s
if one of the values read from the sensors exced some threashold turn
the stepper motor x degrees clockwise.

Can anyone help me out here?
 


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


Re: MSP430F2013

by inta_l_batrak_ya_aoun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is a project for uni. This is the first time i work with
microcontroller. I have purshased the eZ430-F2013 programming tool.
After going through the user guide of the msp430f2013 i undestand that
i need to use the pins as the following:

pin 1.0 LED
pin 1.1 Distance sensor
pin 1.2 hall effect sensor
pin 1.3 Stepper motor 1
pin 1.4 Stepper motor 2
pin 1.6 Switch 1
pin 1.7 Switch 2
pin 2.7 Buzzer

Also the structure of the program should be:

//initialize the pins
//set which pin is analog and which one is digital
//check that all the sensors are working
//If sensors are not working sound the buzzer
//set the speed threashold
//set the distance threashold
//get reading from the distance sensor every 0.25s
//algorithm to get the speed from the hall effect sensor using interupts
//if one threashold is exedded
//turn the stepper motor x degrees anti clockwise
//until speed is under 3 km/h
//if switch 1 is on release brakes
//if switch 2 is on diable the braking system

My problem is that i havent worked with microcontrollers before. So i
am strating from scratch in this. I have been looking over some sample
codes but i cant quite figure out how to write my program.
So if there is any tips or help that u can give me i will be much
appreciated.


--- In msp430@..., "Dan Muzzey" <dan.muzzey@...> wrote:

>
> Once again, this sounds like a homework question.  Its best to come
> clean about stuff like that.  Your application doesn't look to
> difficult.  In fact, it looks extremely easy.
>  
> So, for starters, get a C compiler.  Put a block diagram together.
> Include the power supply, sensors, and how your gonna get data from here
> to there.  Otherwise, design the homework assignment.  If you have a
> specific question such as "what am I doing wrong here?  Port XYZ doesn't
> seem to be giving me the results I expected" then we can help.  We
> cannot design the system.
>  
> Dan
>  
> ________________________________
>
> From: msp430@... [mailto:msp430@...] On Behalf
> Of inta_l_batrak_ya_aoun
> Sent: Thursday, September 11, 2008 8:35 PM
> To: msp430@...
> Subject: [msp430] MSP430F2013
>  
> Hi,
>
> this is my first post to this group. I am facing a dilema working on a
> project. I have designing a braking system for wheelchairs that uses
> the following:
> hall effect sensor
> distance sensor
> stepper motor
>
> what i want to do is to program an MSP40f2013 in c to do the following:
> get measurments from the sensors every 0.25 s
> if one of the values read from the sensors exced some threashold turn
> the stepper motor x degrees clockwise.
>
> Can anyone help me out here?
>  
>
>
> [Non-text portions of this message have been removed]
>



Re: Re: MSP430F2013

by Onestone-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This may be a bit old fashioned, but I still find that one of the very
best learning tools is the flow chart. If done correctly tis will
actually show you what you need to learn next, and often how it needs to
be, or can be achieved.

One thing I would question is the disabling of the braking system.
having worked with disabled people and aids since 1985, and having
recently had cause to use a wheelchair myself, i wouldn't like to be
riding aong in any wheelchair that had its braking sstem disabled.
release yes, disable no.

First things first, Since the 2013 only has 2 timer channels, you are
going to have to multi-task those timers. You would have had an easier
job selecting a part with a B timer or at least 5 channels., which could
then be allocated as follows:-

AD sample timing
Hall sensor timing, capture
Stepper motor pulse timing
swich debounce timer
buzzer timing
etc

Now you will have to break down your system design andfigure out what
the basic timing resolution is, and finding a way of maing that all work
with just 2 actual timers.

My suggestion would be to allocate one timer for low resolution stuff,
such as switch debounce, timing the buzzer, and A/D sampling

You will probably need to dedicate a timer to the stepper motor pulse
time, which means that you canot use pulse tming very easily to estimate
speed from the hall sensor, or you can also tie the stepper motor to the
low res timer, then dedicate the second channel to the speed input.

To do this you will need to sit and work out all of the timing
parameters of the system, ie maximum speed,, and what that represents as
a time factor for your sensor input. For example many electric
wheelchairs can get up a reasonable speed, and have tiny wheels. Most  
of these go 20kph or even faster. That is over 5mtr/sec. for a 20cm
diameter wheel that is about 9Hz. this will tell you tha you don't need
a really high resolutioon counter, in fact it would complicate your
life, so using a watch crystal as the time base for the TIMERA2 module
will work for speed. 20kph is approximately 3700 ticks of the watch
crystal for example.

now you need to check other timing issues.

Does the watch crystal timebase suit your AD sample rate? This is
250msec (I'd do it quicker than that, and then require two or three
sequential reducing values to indicate approaching object, but that's
just me). 250msecs is 8192 ticks of the crystal, but you can't afford to
dedicate this, so perhaps dedciate the second timer as a timebase. if
you choose 10msecs, for example you would need to trigger a sample every
25 'beats' of this signal (such tmebases are often referred to as  
heartbeat). The closest tick count to 10msecs is 328, giving a heartbeat
interval of 10.0098msecs. close enough for this application.

How about other timing issues?

Switch debounce? well typically switches can be debounced in around
50msecs, i typically allow 70-100, so that works well with our heartbeat.

Tinming the buzzer? If this is a piezo buzzer we will probably have a
few strategies for timing it, but typically buzz it for half a second or
so. easily in range of our heartbeat, but if it is a sounder that needs
to be driven at the desired frequency, then at 10msecs we are limited to
100hz, and this isn't a frequency the ear picks up easily. 1-2khz works
better heasr, so down to hardware. i would choose the buzzer, rather
than the sounder. If you've already committed to a sounder, the rn it in
a software loop at around 2khz, the odd changes in toine due to
interrupts being serviced will actually make the sound discordant, and
therefore slightly more noticable to the ear.

 Stepper pulse timing? well you can either pulse this in a software
loop, but that might be a bit uneven if there are other timers and
interrupt events going on. Whether this is noticable or not will
probably be a function of your gearbox. Also it depends a lot on how
many pulses you need to use to activate or release the brake. How many
steps for 360 degree rotation? You need to define your stopping time and
distance here. whcih should vary depending upon circumstances. You can
shorten the heartbeat to 5 msecs for example, or perhaps even shorter,
but theer are limitations.

I think you should also consider other situations, for example you have
described a pretty generic proximity braking solution here, that uses a
stepper motor to apply a brake. You sample distance only 4 times  
second. in fat collisions can occur MUCH faster than this. Were I
designing this I would allow for two braking actions. Conventional
proximity and emergency. In the latter I would probably choose a
solenoid caliper type brake.

Anyway. breka down the syste into a flow chart. Highlight what each I/O
does in that chart.

Then do a chart for that pin, how it is set up, and actied upon

Before anything though work out the parameters of your design.
mechancial, timing etc.

Cheers

Al



inta_l_batrak_ya_aoun wrote:

>This is a project for uni. This is the first time i work with
>microcontroller. I have purshased the eZ430-F2013 programming tool.
>After going through the user guide of the msp430f2013 i undestand that
>i need to use the pins as the following:
>
>pin 1.0 LED
>pin 1.1 Distance sensor
>pin 1.2 hall effect sensor
>pin 1.3 Stepper motor 1
>pin 1.4 Stepper motor 2
>pin 1.6 Switch 1
>pin 1.7 Switch 2
>pin 2.7 Buzzer
>
>Also the structure of the program should be:
>
>//initialize the pins
>//set which pin is analog and which one is digital
>//check that all the sensors are working
>//If sensors are not working sound the buzzer
>//set the speed threashold
>//set the distance threashold
>//get reading from the distance sensor every 0.25s
>//algorithm to get the speed from the hall effect sensor using interupts
>//if one threashold is exedded
>//turn the stepper motor x degrees anti clockwise
>//until speed is under 3 km/h
>//if switch 1 is on release brakes
>//if switch 2 is on diable the braking system
>
>My problem is that i havent worked with microcontrollers before. So i
>am strating from scratch in this. I have been looking over some sample
>codes but i cant quite figure out how to write my program.
>So if there is any tips or help that u can give me i will be much
>appreciated.
>
>
>--- In msp430@..., "Dan Muzzey" <dan.muzzey@...> wrote:
>  
>
>>Once again, this sounds like a homework question.  Its best to come
>>clean about stuff like that.  Your application doesn't look to
>>difficult.  In fact, it looks extremely easy.
>>
>>So, for starters, get a C compiler.  Put a block diagram together.
>>Include the power supply, sensors, and how your gonna get data from here
>>to there.  Otherwise, design the homework assignment.  If you have a
>>specific question such as "what am I doing wrong here?  Port XYZ doesn't
>>seem to be giving me the results I expected" then we can help.  We
>>cannot design the system.
>>
>>Dan
>>
>>________________________________
>>
>>From: msp430@... [mailto:msp430@...] On Behalf
>>Of inta_l_batrak_ya_aoun
>>Sent: Thursday, September 11, 2008 8:35 PM
>>To: msp430@...
>>Subject: [msp430] MSP430F2013
>>
>>Hi,
>>
>>this is my first post to this group. I am facing a dilema working on a
>>project. I have designing a braking system for wheelchairs that uses
>>the following:
>>hall effect sensor
>>distance sensor
>>stepper motor
>>
>>what i want to do is to program an MSP40f2013 in c to do the following:
>>get measurments from the sensors every 0.25 s
>>if one of the values read from the sensors exced some threashold turn
>>the stepper motor x degrees clockwise.
>>
>>Can anyone help me out here?
>>
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>    
>>
>
>
>
>------------------------------------
>
>To unsubscribe from the msp430 group, send an email to:
>msp430-unsubscribe@...
>
>Yahoo! Groups Links
>
>
>
>
>
>  
>


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


Re: MSP430F2013

by inta_l_batrak_ya_aoun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Onestone,
With all due respect i am not quiet sure how and where to start. I
dont have a good understanding of clocks and timers. Will you be able
to show me any sample code?


--- In msp430@..., Onestone <onestone@...> wrote:
>
> This may be a bit old fashioned, but I still find that one of the very
> best learning tools is the flow chart. If done correctly tis will
> actually show you what you need to learn next, and often how it
needs to

> be, or can be achieved.
>
> One thing I would question is the disabling of the braking system.
> having worked with disabled people and aids since 1985, and having
> recently had cause to use a wheelchair myself, i wouldn't like to be
> riding aong in any wheelchair that had its braking sstem disabled.
> release yes, disable no.
>
> First things first, Since the 2013 only has 2 timer channels, you are
> going to have to multi-task those timers. You would have had an easier
> job selecting a part with a B timer or at least 5 channels., which
could

> then be allocated as follows:-
>
> AD sample timing
> Hall sensor timing, capture
> Stepper motor pulse timing
> swich debounce timer
> buzzer timing
> etc
>
> Now you will have to break down your system design andfigure out what
> the basic timing resolution is, and finding a way of maing that all
work
> with just 2 actual timers.
>
> My suggestion would be to allocate one timer for low resolution stuff,
> such as switch debounce, timing the buzzer, and A/D sampling
>
> You will probably need to dedicate a timer to the stepper motor pulse
> time, which means that you canot use pulse tming very easily to
estimate
> speed from the hall sensor, or you can also tie the stepper motor to
the
> low res timer, then dedicate the second channel to the speed input.
>
> To do this you will need to sit and work out all of the timing
> parameters of the system, ie maximum speed,, and what that
represents as

> a time factor for your sensor input. For example many electric
> wheelchairs can get up a reasonable speed, and have tiny wheels. Most  
> of these go 20kph or even faster. That is over 5mtr/sec. for a 20cm
> diameter wheel that is about 9Hz. this will tell you tha you don't need
> a really high resolutioon counter, in fact it would complicate your
> life, so using a watch crystal as the time base for the TIMERA2 module
> will work for speed. 20kph is approximately 3700 ticks of the watch
> crystal for example.
>
> now you need to check other timing issues.
>
> Does the watch crystal timebase suit your AD sample rate? This is
> 250msec (I'd do it quicker than that, and then require two or three
> sequential reducing values to indicate approaching object, but that's
> just me). 250msecs is 8192 ticks of the crystal, but you can't
afford to
> dedicate this, so perhaps dedciate the second timer as a timebase. if
> you choose 10msecs, for example you would need to trigger a sample
every
> 25 'beats' of this signal (such tmebases are often referred to as  
> heartbeat). The closest tick count to 10msecs is 328, giving a
heartbeat
> interval of 10.0098msecs. close enough for this application.
>
> How about other timing issues?
>
> Switch debounce? well typically switches can be debounced in around
> 50msecs, i typically allow 70-100, so that works well with our
heartbeat.
>
> Tinming the buzzer? If this is a piezo buzzer we will probably have a
> few strategies for timing it, but typically buzz it for half a
second or
> so. easily in range of our heartbeat, but if it is a sounder that needs
> to be driven at the desired frequency, then at 10msecs we are
limited to
> 100hz, and this isn't a frequency the ear picks up easily. 1-2khz works
> better heasr, so down to hardware. i would choose the buzzer, rather
> than the sounder. If you've already committed to a sounder, the rn
it in

> a software loop at around 2khz, the odd changes in toine due to
> interrupts being serviced will actually make the sound discordant, and
> therefore slightly more noticable to the ear.
>
>  Stepper pulse timing? well you can either pulse this in a software
> loop, but that might be a bit uneven if there are other timers and
> interrupt events going on. Whether this is noticable or not will
> probably be a function of your gearbox. Also it depends a lot on how
> many pulses you need to use to activate or release the brake. How many
> steps for 360 degree rotation? You need to define your stopping time
and

> distance here. whcih should vary depending upon circumstances. You can
> shorten the heartbeat to 5 msecs for example, or perhaps even shorter,
> but theer are limitations.
>
> I think you should also consider other situations, for example you have
> described a pretty generic proximity braking solution here, that uses a
> stepper motor to apply a brake. You sample distance only 4 times  
> second. in fat collisions can occur MUCH faster than this. Were I
> designing this I would allow for two braking actions. Conventional
> proximity and emergency. In the latter I would probably choose a
> solenoid caliper type brake.
>
> Anyway. breka down the syste into a flow chart. Highlight what each I/O
> does in that chart.
>
> Then do a chart for that pin, how it is set up, and actied upon
>
> Before anything though work out the parameters of your design.
> mechancial, timing etc.
>
> Cheers
>
> Al
>
>
>
> inta_l_batrak_ya_aoun wrote:
>
> >This is a project for uni. This is the first time i work with
> >microcontroller. I have purshased the eZ430-F2013 programming tool.
> >After going through the user guide of the msp430f2013 i undestand that
> >i need to use the pins as the following:
> >
> >pin 1.0 LED
> >pin 1.1 Distance sensor
> >pin 1.2 hall effect sensor
> >pin 1.3 Stepper motor 1
> >pin 1.4 Stepper motor 2
> >pin 1.6 Switch 1
> >pin 1.7 Switch 2
> >pin 2.7 Buzzer
> >
> >Also the structure of the program should be:
> >
> >//initialize the pins
> >//set which pin is analog and which one is digital
> >//check that all the sensors are working
> >//If sensors are not working sound the buzzer
> >//set the speed threashold
> >//set the distance threashold
> >//get reading from the distance sensor every 0.25s
> >//algorithm to get the speed from the hall effect sensor using
interupts

> >//if one threashold is exedded
> >//turn the stepper motor x degrees anti clockwise
> >//until speed is under 3 km/h
> >//if switch 1 is on release brakes
> >//if switch 2 is on diable the braking system
> >
> >My problem is that i havent worked with microcontrollers before. So i
> >am strating from scratch in this. I have been looking over some sample
> >codes but i cant quite figure out how to write my program.
> >So if there is any tips or help that u can give me i will be much
> >appreciated.
> >
> >
> >--- In msp430@..., "Dan Muzzey" <dan.muzzey@> wrote:
> >  
> >
> >>Once again, this sounds like a homework question.  Its best to come
> >>clean about stuff like that.  Your application doesn't look to
> >>difficult.  In fact, it looks extremely easy.
> >>
> >>So, for starters, get a C compiler.  Put a block diagram together.
> >>Include the power supply, sensors, and how your gonna get data
from here
> >>to there.  Otherwise, design the homework assignment.  If you have a
> >>specific question such as "what am I doing wrong here?  Port XYZ
doesn't

> >>seem to be giving me the results I expected" then we can help.  We
> >>cannot design the system.
> >>
> >>Dan
> >>
> >>________________________________
> >>
> >>From: msp430@... [mailto:msp430@...] On Behalf
> >>Of inta_l_batrak_ya_aoun
> >>Sent: Thursday, September 11, 2008 8:35 PM
> >>To: msp430@...
> >>Subject: [msp430] MSP430F2013
> >>
> >>Hi,
> >>
> >>this is my first post to this group. I am facing a dilema working on a
> >>project. I have designing a braking system for wheelchairs that uses
> >>the following:
> >>hall effect sensor
> >>distance sensor
> >>stepper motor
> >>
> >>what i want to do is to program an MSP40f2013 in c to do the
following:

> >>get measurments from the sensors every 0.25 s
> >>if one of the values read from the sensors exced some threashold turn
> >>the stepper motor x degrees clockwise.
> >>
> >>Can anyone help me out here?
> >>
> >>
> >>
> >>[Non-text portions of this message have been removed]
> >>
> >>    
> >>
> >
> >
> >
> >------------------------------------
> >
> >To unsubscribe from the msp430 group, send an email to:
> >msp430-unsubscribe@...
> >
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >  
> >
>
>
> [Non-text portions of this message have been removed]
>



Re: Re: MSP430F2013

by Onestone-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

THAT IS THE PURPOSE OF ALL THE EXAMPLES THAT tI PROVIDE FOR FREE. i HAVE
GIVEN YOU PLENTY OF POINTERS FOR WHAT YOU SHOULD BE LOOKING FOR . I have
posted plenty of ode in the group before, that ois easily discovered by
a search, but the best source of this information by far is Ti, look for
exaples on the A/D, triggering from timers, etc. they are all otu there.

Al

inta_l_batrak_ya_aoun wrote:

>Hi Onestone,
>With all due respect i am not quiet sure how and where to start. I
>dont have a good understanding of clocks and timers. Will you be able
>to show me any sample code?
>
>
>--- In msp430@..., Onestone <onestone@...> wrote:
>  
>
>>This may be a bit old fashioned, but I still find that one of the very
>>best learning tools is the flow chart. If done correctly tis will
>>actually show you what you need to learn next, and often how it
>>    
>>
>needs to
>  
>
>>be, or can be achieved.
>>
>>One thing I would question is the disabling of the braking system.
>>having worked with disabled people and aids since 1985, and having
>>recently had cause to use a wheelchair myself, i wouldn't like to be
>>riding aong in any wheelchair that had its braking sstem disabled.
>>release yes, disable no.
>>
>>First things first, Since the 2013 only has 2 timer channels, you are
>>going to have to multi-task those timers. You would have had an easier
>>job selecting a part with a B timer or at least 5 channels., which
>>    
>>
>could
>  
>
>>then be allocated as follows:-
>>
>>AD sample timing
>>Hall sensor timing, capture
>>Stepper motor pulse timing
>>swich debounce timer
>>buzzer timing
>>etc
>>
>>Now you will have to break down your system design andfigure out what
>>the basic timing resolution is, and finding a way of maing that all
>>    
>>
>work
>  
>
>>with just 2 actual timers.
>>
>>My suggestion would be to allocate one timer for low resolution stuff,
>>such as switch debounce, timing the buzzer, and A/D sampling
>>
>>You will probably need to dedicate a timer to the stepper motor pulse
>>time, which means that you canot use pulse tming very easily to
>>    
>>
>estimate
>  
>
>>speed from the hall sensor, or you can also tie the stepper motor to
>>    
>>
>the
>  
>
>>low res timer, then dedicate the second channel to the speed input.
>>
>>To do this you will need to sit and work out all of the timing
>>parameters of the system, ie maximum speed,, and what that
>>    
>>
>represents as
>  
>
>>a time factor for your sensor input. For example many electric
>>wheelchairs can get up a reasonable speed, and have tiny wheels. Most  
>>of these go 20kph or even faster. That is over 5mtr/sec. for a 20cm
>>diameter wheel that is about 9Hz. this will tell you tha you don't need
>>a really high resolutioon counter, in fact it would complicate your
>>life, so using a watch crystal as the time base for the TIMERA2 module
>>will work for speed. 20kph is approximately 3700 ticks of the watch
>>crystal for example.
>>
>>now you need to check other timing issues.
>>
>>Does the watch crystal timebase suit your AD sample rate? This is
>>250msec (I'd do it quicker than that, and then require two or three
>>sequential reducing values to indicate approaching object, but that's
>>just me). 250msecs is 8192 ticks of the crystal, but you can't
>>    
>>
>afford to
>  
>
>>dedicate this, so perhaps dedciate the second timer as a timebase. if
>>you choose 10msecs, for example you would need to trigger a sample
>>    
>>
>every
>  
>
>>25 'beats' of this signal (such tmebases are often referred to as  
>>heartbeat). The closest tick count to 10msecs is 328, giving a
>>    
>>
>heartbeat
>  
>
>>interval of 10.0098msecs. close enough for this application.
>>
>>How about other timing issues?
>>
>>Switch debounce? well typically switches can be debounced in around
>>50msecs, i typically allow 70-100, so that works well with our
>>    
>>
>heartbeat.
>  
>
>>Tinming the buzzer? If this is a piezo buzzer we will probably have a
>>few strategies for timing it, but typically buzz it for half a
>>    
>>
>second or
>  
>
>>so. easily in range of our heartbeat, but if it is a sounder that needs
>>to be driven at the desired frequency, then at 10msecs we are
>>    
>>
>limited to
>  
>
>>100hz, and this isn't a frequency the ear picks up easily. 1-2khz works
>>better heasr, so down to hardware. i would choose the buzzer, rather
>>than the sounder. If you've already committed to a sounder, the rn
>>    
>>
>it in
>  
>
>>a software loop at around 2khz, the odd changes in toine due to
>>interrupts being serviced will actually make the sound discordant, and
>>therefore slightly more noticable to the ear.
>>
>> Stepper pulse timing? well you can either pulse this in a software
>>loop, but that might be a bit uneven if there are other timers and
>>interrupt events going on. Whether this is noticable or not will
>>probably be a function of your gearbox. Also it depends a lot on how
>>many pulses you need to use to activate or release the brake. How many
>>steps for 360 degree rotation? You need to define your stopping time
>>    
>>
>and
>  
>
>>distance here. whcih should vary depending upon circumstances. You can
>>shorten the heartbeat to 5 msecs for example, or perhaps even shorter,
>>but theer are limitations.
>>
>>I think you should also consider other situations, for example you have
>>described a pretty generic proximity braking solution here, that uses a
>>stepper motor to apply a brake. You sample distance only 4 times  
>>second. in fat collisions can occur MUCH faster than this. Were I
>>designing this I would allow for two braking actions. Conventional
>>proximity and emergency. In the latter I would probably choose a
>>solenoid caliper type brake.
>>
>>Anyway. breka down the syste into a flow chart. Highlight what each I/O
>>does in that chart.
>>
>>Then do a chart for that pin, how it is set up, and actied upon
>>
>>Before anything though work out the parameters of your design.
>>mechancial, timing etc.
>>
>>Cheers
>>
>>Al
>>
>>
>>
>>inta_l_batrak_ya_aoun wrote:
>>
>>    
>>
>>>This is a project for uni. This is the first time i work with
>>>microcontroller. I have purshased the eZ430-F2013 programming tool.
>>>After going through the user guide of the msp430f2013 i undestand that
>>>i need to use the pins as the following:
>>>
>>>pin 1.0 LED
>>>pin 1.1 Distance sensor
>>>pin 1.2 hall effect sensor
>>>pin 1.3 Stepper motor 1
>>>pin 1.4 Stepper motor 2
>>>pin 1.6 Switch 1
>>>pin 1.7 Switch 2
>>>pin 2.7 Buzzer
>>>
>>>Also the structure of the program should be:
>>>
>>>//initialize the pins
>>>//set which pin is analog and which one is digital
>>>//check that all the sensors are working
>>>//If sensors are not working sound the buzzer
>>>//set the speed threashold
>>>//set the distance threashold
>>>//get reading from the distance sensor every 0.25s
>>>//algorithm to get the speed from the hall effect sensor using
>>>      
>>>
>interupts
>  
>
>>>//if one threashold is exedded
>>>//turn the stepper motor x degrees anti clockwise
>>>//until speed is under 3 km/h
>>>//if switch 1 is on release brakes
>>>//if switch 2 is on diable the braking system
>>>
>>>My problem is that i havent worked with microcontrollers before. So i
>>>am strating from scratch in this. I have been looking over some sample
>>>codes but i cant quite figure out how to write my program.
>>>So if there is any tips or help that u can give me i will be much
>>>appreciated.
>>>
>>>
>>>--- In msp430@..., "Dan Muzzey" <dan.muzzey@> wrote:
>>>
>>>
>>>      
>>>
>>>>Once again, this sounds like a homework question.  Its best to come
>>>>clean about stuff like that.  Your application doesn't look to
>>>>difficult.  In fact, it looks extremely easy.
>>>>
>>>>So, for starters, get a C compiler.  Put a block diagram together.
>>>>Include the power supply, sensors, and how your gonna get data
>>>>        
>>>>
>from here
>  
>
>>>>to there.  Otherwise, design the homework assignment.  If you have a
>>>>specific question such as "what am I doing wrong here?  Port XYZ
>>>>        
>>>>
>doesn't
>  
>
>>>>seem to be giving me the results I expected" then we can help.  We
>>>>cannot design the system.
>>>>
>>>>Dan
>>>>
>>>>________________________________
>>>>
>>>>From: msp430@... [mailto:msp430@...] On Behalf
>>>>Of inta_l_batrak_ya_aoun
>>>>Sent: Thursday, September 11, 2008 8:35 PM
>>>>To: msp430@...
>>>>Subject: [msp430] MSP430F2013
>>>>
>>>>Hi,
>>>>
>>>>this is my first post to this group. I am facing a dilema working on a
>>>>project. I have designing a braking system for wheelchairs that uses
>>>>the following:
>>>>hall effect sensor
>>>>distance sensor
>>>>stepper motor
>>>>
>>>>what i want to do is to program an MSP40f2013 in c to do the
>>>>        
>>>>
>following:
>  
>
>>>>get measurments from the sensors every 0.25 s
>>>>if one of the values read from the sensors exced some threashold turn
>>>>the stepper motor x degrees clockwise.
>>>>
>>>>Can anyone help me out here?
>>>>
>>>>
>>>>
>>>>[Non-text portions of this message have been removed]
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>>
>>>------------------------------------
>>>
>>>To unsubscribe from the msp430 group, send an email to:
>>>msp430-unsubscribe@...
>>>
>>>Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>>[Non-text portions of this message have been removed]
>>
>>    
>>
>
>
>
>------------------------------------
>
>To unsubscribe from the msp430 group, send an email to:
>msp430-unsubscribe@...
>
>Yahoo! Groups Links
>
>
>
>
>
>  
>


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


Re: Re: MSP430F2013

by edson burgo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1 idea about the time of 0.25s.
To do measurments every 0.25s you can use watchdog. Configure watchdog to
interrupts each 0.25s and make the meaures what you need.


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


Parent Message unknown RE: Re: MSP430F2013

by Dan Muzzey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have never worked with a micro before then the first step is to
back up and get the chip to do something.  Don't start by designing a
wheel chair control system.  Start by turning an LED on and off.  Then
tie one of those switches in.  Make the LED come on when the switch is
pushed.  Make it go off when the switch is released.  This is very basic
stuff.  But you gotta eat the baby food before you can eat the steak.
Once you start seeing how things work then it is much easier to ask
specific question.  So, here are a couple building block steps.  My
opinion is classes should be structured more in this way.  Students gain
confidence and understanding.  Then again, maybe you just skipped a
couple classes.
 
Lesson 1a.  Turn the LED on.
Lesson 1b.  Turn on the LED when Switch 1 is closed.  Turn off the LED
when Switch 1 is open
 
Lesson 2a  Set up one of the timers to give you a heartbeat.  10mSeconds
works fine.  Just fire the interrupt every 10mSeconds
Lesson 2b  Use the previous timer to set up a 1 second clock.  Turn the
LED on and off based on this clock.  KEEP INTERUPTS SHORT!!!
 
Once you start here, things should start making a little more sense.
 
Dan
 
________________________________

From: msp430@... [mailto:msp430@...] On Behalf
Of inta_l_batrak_ya_aoun
Sent: Friday, September 12, 2008 7:45 PM
To: msp430@...
Subject: [msp430] Re: MSP430F2013
 
This is a project for uni. This is the first time i work with
microcontroller. I have purshased the eZ430-F2013 programming tool.
After going through the user guide of the msp430f2013 i undestand that
i need to use the pins as the following:

pin 1.0 LED
pin 1.1 Distance sensor
pin 1.2 hall effect sensor
pin 1.3 Stepper motor 1
pin 1.4 Stepper motor 2
pin 1.6 Switch 1
pin 1.7 Switch 2
pin 2.7 Buzzer

Also the structure of the program should be:

//initialize the pins
//set which pin is analog and which one is digital
//check that all the sensors are working
//If sensors are not working sound the buzzer
//set the speed threashold
//set the distance threashold
//get reading from the distance sensor every 0.25s
//algorithm to get the speed from the hall effect sensor using interupts
//if one threashold is exedded
//turn the stepper motor x degrees anti clockwise
//until speed is under 3 km/h
//if switch 1 is on release brakes
//if switch 2 is on diable the braking system

My problem is that i havent worked with microcontrollers before. So i
am strating from scratch in this. I have been looking over some sample
codes but i cant quite figure out how to write my program.
So if there is any tips or help that u can give me i will be much
appreciated.

--- In msp430@... <mailto:msp430%40yahoogroups.com> , "Dan
Muzzey" <dan.muzzey@...> wrote:
>
> Once again, this sounds like a homework question. Its best to come
> clean about stuff like that. Your application doesn't look to
> difficult. In fact, it looks extremely easy.
>
> So, for starters, get a C compiler. Put a block diagram together.
> Include the power supply, sensors, and how your gonna get data from
here
> to there. Otherwise, design the homework assignment. If you have a
> specific question such as "what am I doing wrong here? Port XYZ
doesn't
> seem to be giving me the results I expected" then we can help. We
> cannot design the system.
>
> Dan
>
> ________________________________
>
> From: msp430@... <mailto:msp430%40yahoogroups.com>
[mailto:msp430@... <mailto:msp430%40yahoogroups.com> ] On
Behalf

> Of inta_l_batrak_ya_aoun
> Sent: Thursday, September 11, 2008 8:35 PM
> To: msp430@... <mailto:msp430%40yahoogroups.com>
> Subject: [msp430] MSP430F2013
>
> Hi,
>
> this is my first post to this group. I am facing a dilema working on a
> project. I have designing a braking system for wheelchairs that uses
> the following:
> hall effect sensor
> distance sensor
> stepper motor
>
> what i want to do is to program an MSP40f2013 in c to do the
following:

> get measurments from the sensors every 0.25 s
> if one of the values read from the sensors exced some threashold turn
> the stepper motor x degrees clockwise.
>
> Can anyone help me out here?
>
>
>
> [Non-text portions of this message have been removed]
>
 


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


Parent Message unknown RE: Re: MSP430F2013

by Dan Muzzey-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just a hint here.
 
10 msecond heart beat.
10 mseconds X 25 = .250 seconds
10 mseconds X 100 = 1 second
 
Plenty of time to do other stuff.  KEEP INTERUPTS SHORT!!!
 
________________________________

From: msp430@... [mailto:msp430@...] On Behalf
Of edson burgo
Sent: Sunday, September 14, 2008 1:16 PM
To: msp430@...
Subject: Re: [msp430] Re: MSP430F2013
 
1 idea about the time of 0.25s.
To do measurments every 0.25s you can use watchdog. Configure watchdog
to
interrupts each 0.25s and make the meaures what you need.

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


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


Re: Re: MSP430F2013

by Nav-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Everyone

Am using eZ430 for my application, I have to log data to the external memory.
Plz tell me which is the best thing,,, a data flash or a SD card.

Plz suggest me some latest and easy to program data storage products(external memory), which I can configure to eZ430.

Regardsssssss !
Navvvvv !
 
         
       
       








       


       
       


     

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

LightInTheBox - Buy quality products at wholesale price!