Line Tracking Robot [closed] - arduino

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
Improve this question
Me and my friends are building a line tracking robot based on my previous question about how to track white line on a black surface. We settled on using photo resistors and a arduino board. Now all the reflectance sensors I've found are should be placed very close to the line 1 - 2 cm above the line. Now one of my team mates had a heated argument with the professor that there are reflectance sensors that can track 10cm or more but we could not find any.
Are there any type of sensor that would allow us to track the line farther away?

Using an arduino, you are most likely going to use the pololu library for reflectance sensors. Even using an array of sensors of this type, you are looking at a maximum sensing distance of just UNDER a cm (9.5 mm.) I think your teammate was out by a factor of ten, you can score this one to the professor!
The lego light sensor is a good example of this type of sensor. If you can get your hands on an NXT kit, it is an alternative to the arduino. And who doesn't enjoy playing with lego!!
Kindness,
Dan

You need a laser sensor if you want a range more than a few centimeters and don't want to bother with doing it yourself. Google for "laser contrast sensor" if you really need it.
One way to increase sensitivity is, lighting the white band with an array of LEDs perpendicular to it and sequentially turning one on and off, tracking the reading of the photoresistor in software. Of course you probably want to optically focus the LEDs some and use modulation to minimize interference if you use simple photoelements. It will be interesting to see the actual distribution of resistance values along the LED array on the white line.

Related

How would I find out what day it is on an arduino without any external stuff? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Trying to find out what day it is on an Arduino without an external clock or internet.
I'm at boarding school and I'm making a program that tells me how many sleeps/days are left until Saturday (when I go home). I've understood how an LCD works but I'm struggling with finding out what day it is. I'm quite new to Arduino so go easy on the terminology :)
You can count days from arduino start using millis() but if you need to countdown to specific day you have to synchronize correct date using RTC.
Code for count days from arduino start:
float days = millis()/1000/60/60/24;
I'm afraid an Arduino, on its own, will lose track of time every time it loses power. And even when it stays powered on, the internal clock is not too accurate.
The usual fix for this is to use an attached RTC (Real Time Clock) circuit powered by a button cell, such as the Adafruit DS3231 Precision RTC Breakout
RTCs usually have accuracy similar to typical clocks or watches.
A key part of this is the battery to keep time even when the device has power interruptions. (Also, Adafruit includes links to code for connecting to an Arduino.)
If you are willing to set the time on the Arduino pretty often (maybe off by a minute every day?), you can use a solution like this:
https://create.arduino.cc/projecthub/plouc68000/simplest-uno-digital-clock-ever-4613aa
millis() and delay() will not be very accurate on most Arduinos and will be off by a few percent. Even worse, that accuracy will change depending on local conditions, such as temperature. (You could always luck out and get a great combination of board and environmental conditions for yours to be more accurate, but don't count on it.)

Obtaining encoder data [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Hello and in advance thank you for reading my post,
I am working on a project which is controlled by a stepper motor which also includes an encoder. I have made the motor running and now I want to proceed to the next step and include the functions of the encoder. I know that the encoder tells me the actual position travelled by the motor, however, as I am still quite a newbie, I have unfortunately no idea how to include the information of my encoder into my code (which library? which variables). Both motor and encoder are connected to my Arduino Uno and I have also attached a photo with the corresponding pins for the encoder.
Thank you for any much required help
Here's a huge list of resources and libraries, that should get you started: http://playground.arduino.cc/Main/RotaryEncoders
I'd recommend using this library as it automatically takes advantage of the interrupt capabilities, if you connect the encoder to the correct pins (2 & 3 on the Uno). You might need this in order to still get precise measurements even at high rpm.

Is one Arduino Uno enough for building a rover with heat sensor and proximity sensor? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is one Arduino Uno enough for building a rover with heat sensor and proximity sensor? Is it able to perform all 3 tasks?
a "heat sensor" like a contact chip/termocouple/infrared contactless thermometer, and a sonar as "proxymity sensor" are very esay to implement with arduino.
with infrared thermometer i've seen project of thermal imaging.
Arduino DOES NOT have enought ram/cpu to do real image processing, but if you are fine with very low resolution (like 30x30 pixel, please note exponential grow) or you use arduino as "bridge" for a more performing elaboration (like send pixel over some bus to a PC) is is possible.
i've seen 600*400 photo taken by a serial camera and sent direclty back to pc in like 60 seconds, but i've also seen movement followinf done real time using the mouse's optical cmos sensor (they are like 36*36 pixel)

Measuring current from a digital pin with analogRead [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to be able to check if some pieces of a puzzle is placed or not. To do this as easy as possible, I've set up 5 digital pins to output HIGH with digitalWrite(). The wires from the digital pins is connected to one analog pin each. Instead of a closed circuit, I have a gap for each piece of puzzle which is covered in aluminium foil.
The logic is that when the puzzle piece is placed, the circuit will be complete - and the Arduino will give some sort of output. Since I have a lot of pieces, I need some logic to test if each specific piece is placed or not.
I've tried to read the output from the digitalWrite() with analogRead() and map the values of 0-1023 on a 0-100 scale. This gives me a high variation in readings, and sometimes a reading of 100 (1023) even though the circuit is not closed by the puzzle piece.
Is it possible to get a more precise reading that doesn't vary so much? So far I haven't used any resistance between the different pins.
Why are you connecting to an analog pin?
Go digital all the way. Connect the digital pin to another digital pin, enable the pull-up resistors and then do a digitalRead on that pin.
You should get 1 if it's on and 0 if it's off.
Pretty simple, no?
I hope I helped.

How to write a program that controls a motor [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Connecting a motor to move a laser pointer up/down left/right to draw patterns.
Has anyone seen any examples to help the project? What programming language would be used for this? What computer ports would this use? Does a custom circuit have to be made or does a store exist for this?
There is a lot of different approaches you could go to this. Here is a few off the top of my head.
1. You could use a micro controller like an Arduino.
2. You could use a serial port and a socket. Here would be a good resource if you want to pursue this route. http://www.easysw.com/~mike/serial/serial.html
3. If you only need to control two motors you could use the headphone jack on your computer. You could hook a simple amplifier circuit up to each of the left and right speaker line. Then hook each of the amplifiers up to a separate motor. Then you could write a program that generates a separate sound for each channel, thus modifying the voltage given to each motor.
P.S if you use a servo, you can control the exact angle of the laser.

Resources