Pages: [1]   Go Down
Author Topic: Arduino C-code implementation of velocity detection???  (Read 1313 times)
0 Members and 1 Guest are viewing this topic.
North Central Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 33
STEM for middle schools. "How things work."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone have a successful Arduino C-code implementation of velocity detection using a CON RSM3650?  If so, will you share it?

I have built an Arduino Nano controlled robot from a radio control model level car.  My initial design uses two sonar proximity detectors to guide the car around the room counter clockwise looking down.  I want the car to go faster.  I need to calculate 'closing speed'.  It appears that the RSM3650 has the capability and is not too expensive.  What do you all say?  How tough a job am I setting for myself?
Logged

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

Quote
What do you all say?
Pretty much the same thing we always say when someone asks a question about a device other than an Arduino. You need to post a link to the device.

Quote
How tough a job am I setting for myself?
That all depends on what a CON whatever is, how you access its data, how accurate that data is, and what you want to do with that data.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


There was a post several weeks ago, this is a doppler radar sensor. It outputs a voltage or frequency depending on the speed?

Voltage can be measured with ADC ==> analogRead()
Frequency can be measured with PulseIn(), or an IRQ based counter...

Have you searched this forum for the sensor number?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

North Central Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 33
STEM for middle schools. "How things work."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a link to the CON RSM3650 technical page.

http://shop.hygrosens.com/out/media/502374_rsm3650_dbe.pdf

I had just hoped that someone in Arduino land had used it.
Logged

North Central Massachusetts
Offline Offline
Newbie
*
Karma: 0
Posts: 33
STEM for middle schools. "How things work."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No good!!!  Sensitivity is spec'd at 4 to 16 meters.  Any suggestions for velecity detection by measuring closing speed?
Logged

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

Have you managed to amplify the 300 micovolt output to use able levels?
Quote
s. Any suggestions for velecity detection by measuring closing speed?
It's a Doppler unit; it only measures velocity.
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.

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

Hi Ken,

By "closing speed" I assume you mean that you want to measure how quickly the car is approaching the wall and adjust its velocity proportionally, (no wall = full speed, approaching wall = slower and slower speed), correct? 

You could estimate the car's velocity by calculating the difference between subsequent sensor readings (or an average of multiple subsequent readings b/c of sensor noise) and dividing it by the time between readings.  Essentially, you are finding the numerical derivative of your position indicated by the sonar sensor readings.  Then, you could increase or decrease the current to the car's motors based on how close you are to the wall. 

To get the time between readings, try using the Time library, or more directly the now() function.  Not sure what the resolution of the time is -- might only give you integer seconds as opposed to fractions of a second via a double or float, but it's worth a shot! smiley

arduinoRobo
Logged

Pages: [1]   Go Up
Jump to: