Pages: [1]   Go Down
Author Topic: 1st engineering student in need of help?!  (Read 1449 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I have been working in a project to create and drive a small vehicle to start from a point drive to a wall touch it and return to the same point.
My group and i planned on doing this by driving the vehicle from a 3v geared motor. also to measure the distance we used a slotted disk attached to the shaft which ran through an optical sensor. the plan was once the vehicle had travelled to the wall a micro switch on the end would reverse the polarity of the motor and send it back in reverse and match the distance recorded from the optical sensor.

At first we tried to achieve this by using and circuit of 3 up/down counters but encountered several problems. we have now been advised to use and program an arduino board and use a h-bridge to reverse the motors polarity. However we are all new to arduino boards and are quite rushed for time to get it done?

If anyone can give any help or give suggestions on how to achieve this it would be really appreciated!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I have been working in a project to create and drive a small vehicle to start from a point drive to a wall touch it and return to the same point.
My group and i planned on doing this by driving the vehicle from a 3v geared motor. also to measure the distance we used a slotted disk attached to the shaft which ran through an optical sensor. the plan was once the vehicle had travelled to the wall a micro switch on the end would reverse the polarity of the motor and send it back in reverse and match the distance recorded from the optical sensor.

At first we tried to achieve this by using and circuit of 3 up/down counters but encountered several problems. we have now been advised to use and program an arduino board and use a h-bridge to reverse the motors polarity. However we are all new to arduino boards and are quite rushed for time to get it done?

If anyone can give any help or give suggestions on how to achieve this it would be really appreciated!
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You should have a look at the 'playground' wiki. It can be found on the main arduino site. Especially the section 'interfacing with hardware' should answer a great deal of your questions: H-bridge / rotary encoder / counting pulses ...
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

London
Offline Offline
Full Member
***
Karma: 0
Posts: 146
Ugi was not declared in this scope
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An Arduino seems like a good choice for this - you can interface the optical counter, the motors, the switch and even a distance sensor to give you a warning of when to expect to reach the wall.

You will probably want an Arduino Uno, a motor controll shield (which will have the two h-bridge circuits for controlling the motors) plus the vehicle you have now.  Connection should be fairly easy - you'll need something like 2 PWM and 1 control pin for each motor, plus one for the counter, one for the limit switch and perhaps a couple more for an ultrasonic ping sensor.  That's 4 PWM plus 4 general I/O pins out of 6 + 8 digital pins and 6 analogue.  That gives you plenty of pins.

I don't know how much coding you have done but if you work through a few of the examples in the learning section of arduino.cc you should get it quickly enough.
« Last Edit: March 13, 2012, 11:13:38 am by Dr_Ugi » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46204
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to keep things straight, you are not the 1st engineering student in need of help. Nor are you the first that doesn't really know if he/she needs help.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@madworm cheers mate  smiley-grin

@Pauls cheers.... for being a ****! yeah i did clearly need help hence the reason why i posted in this forum. not sure why you even bothered to comment? are you that much of a loser you go on electrical forums to unhelpfully reply to posts?

Moderator edit: personal insult diluted. Keep it civil.
« Last Edit: March 16, 2012, 11:24:17 am by AWOL » Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad I didn't post my comment. Try to retain a sense of humour. It helps. Paul was just making a light joke about your subject. Perhaps you meant "1st year engineering student in need of help!" The question mark led to the second part of the comment.  I was going to say that I hoped it didn't mean there was a queue behind you. Not particularly funny, I know.
Logged

Canada
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Sometimes teaching, always learning,
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

PaulS is one of the best and most informative and helpful participants on this forum. You just have to post a compilable code, a clear circuit diagram, and a description of why your code doesn't do what you think it does if you want him to help.  smiley
Logged


Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First. I agree with John_S responce. Need schematics, code, possible block diagram and a step-by-step of what you want the robot to do.

Let see if I understand correctly...

Input :  A bumber switch
          Opto coupler sensor of a encode disk

Output : 2 motor

Process : Arduino

So far... Correct ?

And you want us to code for you ?  Hmm... Good luck on that one.  If I have a robot being build, I will share my code, but the hardware maybe differents.

Let see for a pseudo-code...

Move motors
Check Switch
  - hit -->  Back up
Read opto
Store opto data
repeat...

That it. Unless you forgot to mention others things like com link and others stuffs.




Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24424
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've merged the two near identical posts.
Do NOT cross post, it simply wastes time.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: