go_away

Author Topic: Design Plausibility  (Read 1634 times)

0 Members and 1 Guest are viewing this topic.

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Design Plausibility
« on: March 22, 2010, 07:08:38 PM »
I'm building a little project for my high school English class, and I was wondering if it is feasible for someone at my level of experience: none. It would consist of a cylinder (probably cardboard)with a servo (unmodified HS-311) under it. The cylinder would have 3 (or more, if needed) basic photo-resistors evenly spaced around the outside. The lights in the room would be turned off, and a flashlight would be aimed at said cylinder, which contains a point which must constantly face the light. The whole cylinder would freely rotate until the point aims at the light source. I don't care that it would only rotate 180 degrees.

I'm thinking that the code would be something like this:
if "LightOnA" > "LightOnB" then "RotateCounterClockwise"
if "LightOnA" < "LightOnB" then "RotateClockwise"
If "LightOnA" = "LightOnB" then "Stop"
...of course this is very watered-down, but you can see what I'm getting at. I'm not sure why I have resistor "C" on there, but it may be useful, or i can just remove it.

My goal is to eventually have something like this http://marco.guardigli.it/2010/01/arduinopc-two-axis-controlled-laser-gun.html but it tracks a flashlight being aimed at it. I see that I would also need to make a y-axis sensor, but first thing's first. I don't have any experience with arduino. In fact, I don't even have one yet. I ordered it, along with the servos, a day or two ago and am patiently waiting for the packages. Any input would be appreciated.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,928
  • Helpful? 98
Re: Design Plausibility
« Reply #1 on: March 22, 2010, 07:36:26 PM »
This is a very feasible first microcontroller project. Due to only one servo to control is would be even easier than a light seeking robot of which would be good to read about as the wiring, coding and concepts are the same.

Good luck, have fun and keep us posted with progress and questions.

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #2 on: March 22, 2010, 08:04:54 PM »
actually, its two servos: one per axis. the second would be mounted under a dome and above the cylinder. any help with the light sensing code or arrangement of the sensors? As of now I want to try one at east, another at west but both facing north, with possible shielding (1/2 inch segment of drinking straws) on each to block stray light.
« Last Edit: March 22, 2010, 10:23:59 PM by wootwootman »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #3 on: March 22, 2010, 11:26:53 PM »
Hi,

[...] The whole cylinder would freely rotate until the point aims at the light source. I don't care that it would only rotate 180 degrees.
If there's something I admire in a teacher, it's consistency ;)


[...] I don't have any experience with arduino. In fact, I don't even have one yet. I ordered it, along with the servos, a day or two ago and am patiently waiting for the packages. Any input would be appreciated.
Arduino? Servos?
If all you want to make is a light tracker and you don't do this for getting into µcontroller programming, then you have sure taken the toughest and most cumbersome approach.

For each axis, one op-amp, two LDRs, a transistor, a little "glue" (resistors and capacitors) and a DC motor is the way to do it - it has been done ad nauseam for sun trackers (for solar panels and solar heaters) and is easy to get to work, even for a complete noob.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #4 on: March 23, 2010, 08:21:07 AM »
Well, I don't want to modify the servos just yet, so they'll only have 180 degrees of movement. Here's something like it http://stigern.net/blog/?p=116

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #5 on: May 02, 2010, 06:04:02 PM »
im also not sure if i'll have enough power. i have a dueminalove hooked up via usb to a usb wall wart. the only things drawing power are a NES controller, two Hitec 311 servos, and a cheap red laser. if necessary, i can hook up some AA batteries directly to the servos, though i'm not sure if i should use 3 or 4 (4.5V or 6V) and i have no voltage regulators.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #6 on: May 03, 2010, 12:45:00 PM »
Hi,

im also not sure if i'll have enough power. i have a dueminalove hooked up via usb to a usb wall wart. the only things drawing power are a NES controller, two Hitec 311 servos, and a cheap red laser. if necessary, i can hook up some AA batteries directly to the servos, though i'm not sure if i should use 3 or 4 (4.5V or 6V) and i have no voltage regulators.
Use either 4.5V or 6V which suits you the best (6V will make the servos faster).
Only use the batteries for power to the servos.
Connect the negative pole of the battery to the servos Gnd line and to ground/Vss of the controller board.
Connect the positive pole of the battery to the servos V+ line (through a switch if you want to be able to turn it off).
Connect the servos signal line to the correct I/O lines of the controller.
You can then keep the USB supply for the rest.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #7 on: May 03, 2010, 05:40:44 PM »
thanks for the help.

oh, and do you think there will be enough power for the laser? its a cheap red one.  i also have a green "<5mW" but i wouldnt feel very comfortable using that one (it was $60!)

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #8 on: May 03, 2010, 07:00:30 PM »
Hi,

oh, and do you think there will be enough power for the laser? its a cheap red one.  i also have a green "<5mW" but i wouldnt feel very comfortable using that one (it was $60!)
LASER ratings are optical output power and a "<5mW" will use a substantially larger amount of electric power, like eg. 4.5 V x 40 mA = 180 mW electric power to put out less than 5 mW of optical power. This is for a red LASER, I have no metrics on the green ones.

A LASER pointer is not extremely hungry - somewhat below 50 mA, but you need to keep the voltage less than or equal to the max. battery voltage it used originally and hope for the best - keep it somewhat lower just in case, as some pointers rely on the internal resistance of the battery cells used.
Internal resistance is fairly high in AG13/LR44 button cells, which most cheap pointers use and your 5V supply will have a much lower impedance (the 6V battery will likely kill it off in a single short flash). If the LASER pointer runs on eg. 3 button cells (4.5V down to 3.6V when flat), a silicium diode (1N4148,  1N914 or similar) will drop around 0.7V, leaving 4.3V to the pointer.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #9 on: May 03, 2010, 08:56:39 PM »
can i use a pwm analog output pin on an arduino duemilanove and use analogwrite(pin,200) ? or any other pwm value

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #10 on: May 04, 2010, 06:32:55 PM »
Hi,

can i use a pwm analog output pin on an arduino duemilanove and use analogwrite(pin,200) ? or any other pwm value
I have no personal experience with the "2k", so I cannot tell you whether it has this function - if that was the question (you really need to read your posts before clicking "Post", if you don't get it, nobody else will).

If, on the other hand, the question was whether you could use PWM for the LASER, you have to be more specific as to how that should be, but I'll try to address what I see as possible meanings.

If you want to use PWM to reduce the voltage to a safe level for a LASER pointer, the answer is NO, as just a few µs of too much is too much.

If you want to modulate the pointer after you have ascertained that the full power won't exceed what the LASER can safely handle, the answer is a cautious yes, as you should never let the LASER extinguish fully, as this will slow it down extremely much.
To keep the switching speed up to useable levels, you switch between 2 levels, which are both within the "lasing" range, i.e. enough current to start the LASER action, less than this and it's just like a red LED of very little power. Too much current, even just a little bit too much, for a few µs, and the LASER is permanently turned into a weak LED that will never regain it's proud beam of times past.
In between those two extremes, you can modulate the heck out of it.

IOW, however powerfull LASERs might seem, they're little wussies that really need to be handled with a mothers love and care, or they'll break down crying.


If you're using cheap $few LASER pointers and wants to disassemble them to make them smaller, be carefull, as they usually don't have the LASER unit in a transistor like housing, like in the better $too.much pointers.
The LASER diode is mounted on a piece of PCB material crimped into a white metal housing and it doesn't take much to kill it off mechanically (I have a couple of handfull of them on my conscience, some of them purposely, to know their limits, others were *oops*).

Consider getting wire ended LASER modules (which is usually focus-able as well), they can be found at $4 to $6 in some places and comes in a nice small brass "tube" with wires out opposite of the business end - they are much easier to use.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #11 on: May 04, 2010, 10:31:01 PM »
so.....I have only a very specific PWM range in which I can safely power the laser?
if so, how would I go about finding it? i assume it would be a value which yields 4.5V (3 button cells).  pwm values go up to 255 which corresponds to 5V. therefore 230 should put out 4.5V , right?

btw I apologize if some of my questions aren't very clear, I'm just a high school kid who recently took this up as a hobby. going to major in electrical engineering in college starting next year :)

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,928
  • Helpful? 98
Re: Design Plausibility
« Reply #12 on: May 05, 2010, 07:36:04 AM »
Start by learning how a plain old LED works. As both a LASER Diode and an LED are current devices with a voltage threshold they are similar is this regard. Burning out a few LEDs is much cheaper.

Then search and read about LASER diodes. There is a lot of information of the web about driving them and several manufactures have data sheets.

I have also played around with LASER diodes and can confirm everything Soeren says about them.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #13 on: May 05, 2010, 12:14:37 PM »
Hi,

so.....I have only a very specific PWM range in which I can safely power the laser?
That depends on how it's done. It can be made to use the entire 0..255 range to cover the useable range of the LASER.


if so, how would I go about finding it? i assume it would be a value which yields 4.5V (3 button cells).  pwm values go up to 255 which corresponds to 5V. therefore 230 should put out 4.5V , right?
As I stated in my last post, you cannot just use PWM to limit it, as PWM goes to the full voltage on every pulse. You need to first limit it, to make sure that 100% "PWM" won't hurt it.


btw I apologize if some of my questions aren't very clear, I'm just a high school kid who recently took this up as a hobby. going to major in electrical engineering in college starting next year :)
No problem, but you get better answers if people can fathom what you're asking - reading your own post like you didn't know what it said before sending it will catch most of the haze.

I could draw you a schematic on how it can be done and describe how you can go about finding the limits if you want, but why do you want to modulate the beam? Or do you just want to have the beam on?
Depending on what you want it for, the solution will differ quite a lot.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #14 on: May 05, 2010, 05:47:24 PM »
i just want the beam to light up.  i only wanted pwm because i dont want to send 5V through a 3 button-cell LASER (4.5V), as that may burn it out, but as you said, 5V would still be sent through it.

through your previous suggestion, a transistor would work, but i dont have any. All I have are five 100ohm resistors, five 1K resistors, five 10K resistors, a 1K potentiometer, and a 10K potentiometer. Unfortunately I don't have access to components, and anything ordered online would take forever to arrive.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,928
  • Helpful? 98
Re: Design Plausibility
« Reply #15 on: May 05, 2010, 06:15:35 PM »
Dig into discarded electronics. In your situation there are many parts available by scavenging.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #16 on: May 05, 2010, 07:14:41 PM »
Hi,


i just want the beam to light up.  i only wanted pwm because i dont want to send 5V through a 3 button-cell LASER (4.5V), as that may burn it out, but as you said, 5V would still be sent through it.
Ah OK, then it gets so much easier.

For a rough estimate:
Lets assume that the total internal resistance of 3 AG13 is around 15 Ohm and that the LASER will need 35 mA.
That would give a voltage drop of 525mV and subtracting that from the unloaded cell voltage of 4.5V gives 3.975V
Then with 5V, you need to drop 1.025V at the 35mA, so a resistor of 29.3 Ohm will be around the mark.
Start off a little higher, as this is based on some guesstimates on your LASER pointer.


through your previous suggestion, a transistor would work,
No, a diode would, as it drops 0.7V, so that would take using just the base-emitter stretch of a transistor, as the collector-emitter drop will be under like 0.1V when given base current, so that wouldn't quite cut it.


but i dont have any. All I have are five 100ohm resistors, five 1K resistors, five 10K resistors, a 1K potentiometer, and a 10K potentiometer. Unfortunately I don't have access to components, and anything ordered online would take forever to arrive.
Take 3 of the 100 Ohm resistors and put them in parallel and you have 33 Ohm. Put that combo in series with the LASER (no matter at what side and connect it to +5V and 0V - Observe polarity of the LASER!! or you will  kill it.
Now it should be somewhere in the range of "lasing".

If you want to turn it on/off by the controller, you need a transistor, but at least you are able to test it without one.
You could start out with just two parallel 100R resistors (to make it 50 Ohm), if you want to be on the completely safe side.

You won't be in doubt of whether it is under the lasing threshold, as there will just be a weak spot (only to be seen in shadows or darkness) until the threshold is reached, where the increase in optical power is huge, plus you will see the "flying dots" in the laser dot (which is a phenomenon caused by your own eyes) very  clearly, while they almost don't show when under the threshold.


Perhaps getting or making a resistor substitution box wouldn't be a bad idea, until the day that you have a complete collection of resistors.

Until then, follow the advice from waltr and rip open some old pieces of electronic junk/treasure - When I started out (at age 9), I ripped out anything that wasn't broken and quickly got a very mixed (though ugly) collection of resistors, capacitors, diodes, transistors and what not (and the time I spend sorting out the junk, kept me from hanging on street corners, boozing, fighting and boinking, at least for some years ;D)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline wootwootmanTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: Design Plausibility
« Reply #17 on: May 06, 2010, 06:07:30 PM »
thanks so much for the help!

cant i control the LASER by connecting it to a digital output pin on an arduino?
i can just code a button to turn the output of the pin (5V) on/off

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Design Plausibility
« Reply #18 on: May 07, 2010, 01:19:08 AM »
Hi,

cant i control the LASER by connecting it to a digital output pin on an arduino?
i can just code a button to turn the output of the pin (5V) on/off
It's a bit disappointing that you don't seem to care to read the answers you get.
Even if you think I write with only half my mind, you should be able to guess, that when I make a word boldface, I want to express something that I did give some thought, so what is hard understanding about the sentence:
  "If you want to turn it on/off by the controller, you need a transistor"?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


Get Your Ad Here

data_list