EmbeddedRelated.com
Forums

A few questions for a project, thanks!

Started by Vuln...@gmail.com April 29, 2008
Hi all, I have a project I am working on for my senior design and I am hoping to get some advice on a few things, thanks for your time!

For my embedded systems class we made a project based around a door security system. One HCS12 had an IR sensor and a wireless transmitter connected, and use PB's to set/enter a password. It then transmitted status bits to a second HCS12 connected to a computer over serial where it would output what happened and the time.

I had a lot of fun doing this so I decided to expand it into my senior design project. So now after talking to my advisor I believe I am going to do this:

One HCS12 with a Keypad, IR sensor, and stepper motor connection. The passwords for multiple users are set in the code, a user walks up to the IR sensor, which activates the board/LCD/etc. The user enters their password, and if confirmed, the users information, time of arrival, etc will be sent over serial to a Windows based PC (Probably my Dell laptop with a USB to Serial connection). If the password is correct, the HCS12 is going to drive the stepper motor to unlock then relock the door.

Here are my main questions:

1.Does anyone know of a good source for 4 pin stepper motors? Is a stepper motor my best choice for what I want to do? (Can it rotate one way to unlock the door, and easily rotate in the opposite direction to lock it). A friend of mine recommended a servo, but I don't know much about using them.

2. We tried pretty hard to get our HCS12 to program over the serial connection using CodeWarrior, but always had to program over USB using the Project Board (All Freescale parts, HCS12C32, and PBMCUSLK.) Is there a trick to getting the Serial port to respond to commands written to it? It reads out just fine to terminal programs.

3. I used realterm throughout our Embedded Systems project to get the data outputs from the second HCS12 and just put them on a screen. For this project I have much bigger ideas. I would like to have my own software that:
Reads from the serial port the current status of the user (Arrived, Left, Password Correct, Password Incorrect, etc).
Attaches the current system time to each event
Would like to attach a webcam and have it output video stream into my app
The big thing! I really want to learn how to post the current status of the user and the webcam stream on a "security website". Does anyone have any experience writing your own serial interface program? What is the recommended method to put this kind of thing online? (Like PERL/Python/Good ol' HTML). I know realterm can generate log files, but I am not sure if this is the ideal way to have the status update on a webserver. I need it to update in near-real time. I hope this is even possible.

Sorry for all the questions, but I have been hunting around online and have found some good sources, but want to make sure I am doing this the best way.

Thank you all in advance.
--- In 6..., VulnoX@... wrote:
>
> Hi all, I have a project I am working on for my senior design and
I am hoping to get some advice on a few things, thanks for your time!
>
> For my embedded systems class we made a project based around a door
security system. One HCS12 had an IR sensor and a wireless
transmitter connected, and use PB's to set/enter a password. It then
transmitted status bits to a second HCS12 connected to a computer
over serial where it would output what happened and the time.
>
> I had a lot of fun doing this so I decided to expand it into my
senior design project. So now after talking to my advisor I believe
I am going to do this:
>
> One HCS12 with a Keypad, IR sensor, and stepper motor connection.
The passwords for multiple users are set in the code, a user walks up
to the IR sensor, which activates the board/LCD/etc. The user enters
their password, and if confirmed, the users information, time of
arrival, etc will be sent over serial to a Windows based PC (Probably
my Dell laptop with a USB to Serial connection). If the password is
correct, the HCS12 is going to drive the stepper motor to unlock then
relock the door.
>
> Here are my main questions:
>
> 1.Does anyone know of a good source for 4 pin stepper motors? Is a
stepper motor my best choice for what I want to do? (Can it rotate
one way to unlock the door, and easily rotate in the opposite
direction to lock it). A friend of mine recommended a servo, but I
don't know much about using them.
>
> 2. We tried pretty hard to get our HCS12 to program over the serial
connection using CodeWarrior, but always had to program over USB
using the Project Board (All Freescale parts, HCS12C32, and
PBMCUSLK.) Is there a trick to getting the Serial port to respond to
commands written to it? It reads out just fine to terminal programs.
>
> 3. I used realterm throughout our Embedded Systems project to get
the data outputs from the second HCS12 and just put them on a
screen. For this project I have much bigger ideas. I would like to
have my own software that:
> Reads from the serial port the current status of the user (Arrived,
Left, Password Correct, Password Incorrect, etc).
> Attaches the current system time to each event
> Would like to attach a webcam and have it output video stream into
my app
> The big thing! I really want to learn how to post the current
status of the user and the webcam stream on a "security website".
Does anyone have any experience writing your own serial interface
program? What is the recommended method to put this kind of thing
online? (Like PERL/Python/Good ol' HTML). I know realterm can
generate log files, but I am not sure if this is the ideal way to
have the status update on a webserver. I need it to update in near-
real time. I hope this is even possible.
>
> Sorry for all the questions, but I have been hunting around online
and have found some good sources, but want to make sure I am doing
this the best way.
>
> Thank you all in advance.
>

Just a suggestion for the locks. You can use a solenoid latch with a
bidirectional motor driver (H-bridge) for controlling the latch. You
only need one port output for the latch to control whether you want
to latch or unlatch the solenoid. Minimal current draw (the ones I
used draw 500mA for a 5ms pulse). I just finished using 4 magnetic
latching solenoids for my senior project and they work great. I
obtained mine from LEDEX, and they are a push type latch. They have
a bunch that would be great for that application.
--- In 6..., "sburgin13" wrote:
>
> --- In 6..., VulnoX@ wrote:
> >
> > Hi all, I have a project I am working on for my senior design and
> I am hoping to get some advice on a few things, thanks for your time!
> >
> > For my embedded systems class we made a project based around a door
> security system. One HCS12 had an IR sensor and a wireless
> transmitter connected, and use PB's to set/enter a password. It then
> transmitted status bits to a second HCS12 connected to a computer
> over serial where it would output what happened and the time.
> >
> > I had a lot of fun doing this so I decided to expand it into my
> senior design project. So now after talking to my advisor I believe
> I am going to do this:
> >
> > One HCS12 with a Keypad, IR sensor, and stepper motor connection.
> The passwords for multiple users are set in the code, a user walks up
> to the IR sensor, which activates the board/LCD/etc. The user enters
> their password, and if confirmed, the users information, time of
> arrival, etc will be sent over serial to a Windows based PC (Probably
> my Dell laptop with a USB to Serial connection). If the password is
> correct, the HCS12 is going to drive the stepper motor to unlock then
> relock the door.
> >
> > Here are my main questions:
> >
> > 1.Does anyone know of a good source for 4 pin stepper motors? Is a
> stepper motor my best choice for what I want to do? (Can it rotate
> one way to unlock the door, and easily rotate in the opposite
> direction to lock it). A friend of mine recommended a servo, but I
> don't know much about using them.
> >
> > 2. We tried pretty hard to get our HCS12 to program over the serial
> connection using CodeWarrior, but always had to program over USB
> using the Project Board (All Freescale parts, HCS12C32, and
> PBMCUSLK.) Is there a trick to getting the Serial port to respond to
> commands written to it? It reads out just fine to terminal programs.
> >
> > 3. I used realterm throughout our Embedded Systems project to get
> the data outputs from the second HCS12 and just put them on a
> screen. For this project I have much bigger ideas. I would like to
> have my own software that:
> > Reads from the serial port the current status of the user (Arrived,
> Left, Password Correct, Password Incorrect, etc).
> > Attaches the current system time to each event
> > Would like to attach a webcam and have it output video stream into
> my app
> > The big thing! I really want to learn how to post the current
> status of the user and the webcam stream on a "security website".
> Does anyone have any experience writing your own serial interface
> program? What is the recommended method to put this kind of thing
> online? (Like PERL/Python/Good ol' HTML). I know realterm can
> generate log files, but I am not sure if this is the ideal way to
> have the status update on a webserver. I need it to update in near-
> real time. I hope this is even possible.
> >
> > Sorry for all the questions, but I have been hunting around online
> and have found some good sources, but want to make sure I am doing
> this the best way.
> >
> > Thank you all in advance.
> > Just a suggestion for the locks. You can use a solenoid latch with a
> bidirectional motor driver (H-bridge) for controlling the latch. You
> only need one port output for the latch to control whether you want
> to latch or unlatch the solenoid. Minimal current draw (the ones I
> used draw 500mA for a 5ms pulse). I just finished using 4 magnetic
> latching solenoids for my senior project and they work great. I
> obtained mine from LEDEX, and they are a push type latch. They have
> a bunch that would be great for that application.
>
Those sound awesome, and only needing one pin will be very helpful
since im already pushing the ports to the limit as it is.

Thanks a lot, I am going to have to research the parts at their site
to find a good one for this.
It just takes one output to actuate the 'buzzer' on the apartment door when the renter wants to 'buzz someone in' the front door. Like on Seinfeld.
-----Original Message-----
From: vulnox2
To: 6...
Sent: Tue, 29 Apr 2008 1:24 pm
Subject: [68HC12] Re: A few questions for a project, thanks!

--- In 6..., "sburgin13" wrote:
>
> --- In 6..., VulnoX@ wrote:
> >
> > Hi all, I have a project I am working on for my senior design and
> I am hoping to get some advice on a few things, thanks for your time!
> >
> > For my embedded systems class we made a project based around a door
> security system. One HCS12 had an IR sensor and a wireless
> transmitter connected, and use PB's to set/enter a password. It then
> transmitted status bits to a second HCS12 connected to a computer
> over serial where it would output what happened and the time.
> >
> > I had a lot of fun doing this so I decided to expand it into my
> senior design project. So now after talking to my advisor I believe
> I am going to do this:
> >
> > One HCS12 with a Keypad, IR sensor, and stepper motor connection.
> The passwords for multiple users are set in the code, a user walks up
> to the IR sensor, which activates the board/LCD/etc. The user enters
> their password, and if confirmed, the users information, time of
> arrival, etc will be sent over serial to a Windows based PC (Probably
> my Dell laptop with a USB to Serial connection). If the password is
> correct, the HCS12 is going to drive the stepper motor to unlock then
> relock the door.
> >
> > Here are my main questions:
> >
> > 1.Does anyone know of a good source for 4 pin stepper motors? Is a
> stepper motor my best choice for what I want to do? (Can it rotate
> one way to unlock the door, and easily rotate in the opposite
> direction to lock it). A friend of mine recommended a servo, but I
> don't know much about using them.
> >
> > 2. We tried pretty hard to get our HCS12 to program over the serial
> connection using CodeWarrior, but always had to program over USB
> using the Project Board (All Freescale parts, HCS12C32, and
> PBMCUSLK.) Is there a trick to getting the Serial port to respond to
> commands written to it? It reads out just fine to terminal programs.
> >
> > 3. I used realterm throughout our Embedded Systems project to get
> the data outputs from the second HCS12 and just put them on a
> screen. For this project I have much bigger ideas. I would like to
> have my own software that:
> > Reads from the serial port the current status of the user (Arrived,
> Left, Password Correct, Password Incorrect, etc).
> > Attaches the current system time to each event
> > Would like to attach a webcam and have it output video stream into
> my app
> > The big thing! I really want to learn how to post the current
> status of the user and the webcam stream on a "security website".
> Does anyone have any experience writing your own serial interface
> program? What is the recommended method to put this kind of thing
> online? (Like PERL/Python/Good ol' HTML). I know realterm can
> generate log files, but I am not sure if this is the ideal way to
> have the status update on a webserver. I need it to update in near-
> real time. I hope this is even possible.
> >
> > Sorry for all the questions, but I have been hunting around online
> and have found some good sources, but want to make sure I am doing
> this the best way.
> >
> > Thank you all in advance.
> > Just a suggestion for the locks. You can use a solenoid latch with a
> bidirectional motor driver (H-bridge) for controlling the latch. You
> only need one port output for the latch to control whether you want
> to latch or unlatch the solenoid. Minimal current draw (the ones I
> used draw 500mA for a 5ms pulse). I just finished using 4 magnetic
> latching solenoids for my senior project and they work great. I
> obtained mine from LEDEX, and they are a push type latch. They have
> a bunch that would be great for that application.
>
Those sound awesome, and only needing one pin will be very helpful
since im already pushing the ports to the limit as it is.

Thanks a lot, I am going to have to research the parts at their site
to find a good one for this.
The dragon12 already has a motor driver on it than can drive a stepper.
It also already has a relay on it as well than could drive a solenoid.
If you need a stepper and sample code for the Dragon12 I have that
too, that will run it forward or reverse. evb plus has low cost
stepper that will work with dragon12

You should have a schematic that shows this.
Which rev. of the Dragon12 board do you have? If it is an older one,
the relay parts may not be on there, but I can get you all the parts
if you need them, and I can tell how to driver the relay.
"2. We tried pretty hard to get our HCS12 to program over the serial
connection using CodeWarrior, but always had to program over USB using
the Project Board (All Freescale parts, HCS12C32, and PBMCUSLK.) Is
there a trick to getting the Serial port to respond to commands
written to it? It reads out just fine to terminal programs."

Do you have SerMon loaded on the board? If not you can get this from
evbplus.com. Once you have sermon, you can not use the first port for
you application, you will have to use the second port.
Please explain further on this problem.

Hello VulnoX, I am not an expert in HC12, but I had great time dealing with my senior project. I will answer your 1st and 3rd question, as I have never dealt with codewarrior before, so I have no clue on current status situation as of why other programs wont corresponds to serial com.
1. I always prefer servo in respect to stepper, as it is more precised. Stepper motors sometimes do jump a step or so, but then again its your choice as of what to apprehend. Servo also require you to understand PWM sequence, and also some of them only rotate 180 degrees, depending upon which ones you buy. If you have less time, I recommend you to stick with stepper, as those are easy to code and no need to touch PWM section. But I recommend each learners to atleast once touch the subject and understand it very well, since its more fun. I ended up making my own analog PWM controller via Timer chip 555 after doing so much research of this topic, so I had both HC12 PWM working at the same time controlling one server via analog controller.
2. I dont get the idea why can't you correspond to serial comm sync. condition, unless you haven't activated it at the first place. But then, I have never played with USB type HC12's so I cant tell for sure. I had used ICC based compiler, which is commercial, but neways it did worked smoothly, never had given me any problems. You can download the trial version of its copy for 30 days, and see if that does the trick.
3. I can recommend you using XML format towards the HTML. There should be a consistant way of converting your log files into XML format, and then be displayed towards the site via that routine. I haven't done that sort of coding yet, but since you have mentioned it, I will give a shot tonite, and see if it can really be done, accordingly.

More idea's from different users are welcome.
Sincerely,
Karim

V...@gmail.com wrote:
Hi all, I have a project I am working on for my senior design and I am hoping to get some advice on a few things, thanks for your time!

For my embedded systems class we made a project based around a door security system. One HCS12 had an IR sensor and a wireless transmitter connected, and use PB's to set/enter a password. It then transmitted status bits to a second HCS12 connected to a computer over serial where it would output what happened and the time.

I had a lot of fun doing this so I decided to expand it into my senior design project. So now after talking to my advisor I believe I am going to do this:

One HCS12 with a Keypad, IR sensor, and stepper motor connection. The passwords for multiple users are set in the code, a user walks up to the IR sensor, which activates the board/LCD/etc. The user enters their password, and if confirmed, the users information, time of arrival, etc will be sent over serial to a Windows based PC (Probably my Dell laptop with a USB to Serial connection). If the password is correct, the HCS12 is going to drive the stepper motor to unlock then relock the door.

Here are my main questions:

1.Does anyone know of a good source for 4 pin stepper motors? Is a stepper motor my best choice for what I want to do? (Can it rotate one way to unlock the door, and easily rotate in the opposite direction to lock it). A friend of mine recommended a servo, but I don't know much about using them.

2. We tried pretty hard to get our HCS12 to program over the serial connection using CodeWarrior, but always had to program over USB using the Project Board (All Freescale parts, HCS12C32, and PBMCUSLK.) Is there a trick to getting the Serial port to respond to commands written to it? It reads out just fine to terminal programs.

3. I used realterm throughout our Embedded Systems project to get the data outputs from the second HCS12 and just put them on a screen. For this project I have much bigger ideas. I would like to have my own software that:
Reads from the serial port the current status of the user (Arrived, Left, Password Correct, Password Incorrect, etc).
Attaches the current system time to each event
Would like to attach a webcam and have it output video stream into my app
The big thing! I really want to learn how to post the current status of the user and the webcam stream on a "security website". Does anyone have any experience writing your own serial interface program? What is the recommended method to put this kind of thing online? (Like PERL/Python/Good ol' HTML). I know realterm can generate log files, but I am not sure if this is the ideal way to have the status update on a webserver. I need it to update in near-real time. I hope this is even possible.

Sorry for all the questions, but I have been hunting around online and have found some good sources, but want to make sure I am doing this the best way.

Thank you all in advance.

---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.