Limpkin's blog - Tag - doppler - Comments<div>An electronics geek blog, dedicated to sharing and open source. Check out my stores: <a href="https://lectronz.com/stores/stephanelec" hreflang="en" title="Lectronz store">EU</a> / <a href="https://www.tindie.com/stores/stephanelec" hreflang="en" title="tindie store">EU & US</a>.</div>2024-03-29T00:41:47+00:00Mathieuurn:md5:51de6a3d917257edeff5a252fe925b02DotclearCDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:371db19713c249792bd54f801ea1e6bc2024-03-27T19:19:33+00:002024-03-27T19:19:33+00:00limpkin<p>@Mike:</p>
<p>If you're using the expansion board you may need to add the following lines, as the RTS/CTS line control the reset/boot0 lines:<br>
ser.set_buffer_size(rx_size = 1000000, tx_size = 1000000)</p>
<ol>
<li>Disable RTS to release RESET</li>
</ol>
<p>ser.serial.rts = False</p>CDM324 Doppler Speed Sensor, with FFTs! - Mikeurn:md5:ac51baf89b0fee4c822b980c0c3f97372024-03-27T15:20:57+00:002024-03-27T15:20:57+00:00Mike<p>Changed the approach.</p>
<p>Just trying to grab the details trough a RASPBERRY</p>
<pre> GNU nano 5.4 script.py</pre>
<ol>
<li>!/usr/bin/env python3</li>
</ol>
<p>import serial<br>
import time</p>
<ol>
<li>Open serial port</li>
</ol>
<p>ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1) # Open serial port at 9600 baud</p>
<p>try:</p>
<pre> while True:
line = ser.readline().decode('utf-8').rstrip() # Read a line and decode it to a string
if line: # If the line is not empty
print("Received:", line)
time.sleep(0.1) # Wait a bit before reading again</pre>
<p>except KeyboardInterrupt:</p>
<pre> print("Program terminated by user")</pre>
<p>finally:</p>
<pre> ser.close() # Close the serial port when done</pre>
<p>Nevertheless when running the code the display on the device freezes until you stop the script</p>
<p>I have now tried 3 separate instances to use this device<br>
Win10 (Gui Code unstable)<br>
Win11 (Even more unstable)<br>
Raspbery pi (freezes the device)</p>
<p>Even bought a new 1 nevertheless if remains extreemly unstable and has no working configs. using the device might be ok nevertheless not if you like to integrate it to something.</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:acae18afb83752f369a19708f82409e82024-03-25T17:51:50+00:002024-03-25T17:51:50+00:00limpkin<p>@Mike: what error do you get when using the GUI? I never had issues on my side...<br>
You shouldn't have 2 devices connected at the same time to the CDM324, as it will create short circuits!<br>
What board are you using? what's your wiring configuration?<br>
Your code seems good, but I don't know how the esp board handles concurrency...</p>CDM324 Doppler Speed Sensor, with FFTs! - Mikeurn:md5:0acc4352f23b09ddffe11581e838a0ca2024-03-25T12:25:44+00:002024-03-25T12:25:44+00:00Mike<p>Was anybody successfull to be able to read the KMH value from the device ?</p>
<p>In the meantime i have order another unit which seemed atleast able to start and show on the gui nevertheless after a while it again stopped functioning.</p>
<p>I need to be able to grab the value to display it on other devices. but the Python stuff is so terrible instable that you can even normally update the CDM with a lower baudrate.</p>
<p>Is there anybody willing to share a bit of code / picture how they started using this device as i am currently lost.</p>
<p>BTW I am under the impression you have to remove the expander board to direct read the values ?</p>
<p>example code used.</p>
<ol>
<li>include <ESP8266WiFi.h></li>
<li>include <ESP8266WebServer.h></li>
<li>include <SoftwareSerial.h></li>
</ol>
<p>// WiFi credentials<br>
const char* ssid = "xxxx";<br>
const char* password = "cxxxxx";</p>
<p>ESP8266WebServer server(80);</p>
<ol>
<li>define RESET_PIN D4 // Use D4 on ESP8266 for reset, adjust as needed</li>
</ol>
<p>SoftwareSerial cdm324Serial(D2, D3); // RX, TX for software serial. Adjust pins as needed</p>
<p>unsigned long previousMillis = 0; // Stores the last time the "k" command was sent<br>
const long interval = 5000; // Interval at which to send the command (milliseconds)</p>
<p>void issueCDM324Reset() {</p>
<pre> pinMode(RESET_PIN, OUTPUT);
digitalWrite(RESET_PIN, LOW);
delay(20);
digitalWrite(RESET_PIN, HIGH);
pinMode(RESET_PIN, INPUT);</pre>
<pre> while(cdm324Serial.available() > 0) {
cdm324Serial.read(); // Flush any existing data
}</pre>
<p>}</p>
<p>String getSpeed() {</p>
<pre> while (cdm324Serial.available() == 0); // Wait for data
String speedStr = cdm324Serial.readStringUntil('\n');
float speed = speedStr.toFloat();
return String(speed / 10); // Assuming the speed is sent in decimeters per second</pre>
<p>}</p>
<p>void setup() {</p>
<pre> Serial.begin(115200);
cdm324Serial.begin(1000000); // Set to your desired baud rate</pre>
<pre> issueCDM324Reset();</pre>
<pre> WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}</pre>
<pre> Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());</pre>
<pre> server.on("/", HTTP_GET, []() {
String speed = getSpeed();
String html = "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>Speed Sensor Data</title></head><body><h1>Speed Value: " + speed + " km/h</h1></body></html>";
server.send(200, "text/html", html);
});</pre>
<pre> server.begin();</pre>
<p>}</p>
<p>void loop() {</p>
<pre> server.handleClient();</pre>
<pre> unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
previousMillis = currentMillis; // Save the last time the "k" command was sent
cdm324Serial.print('k'); // Send the "k" command to the sensor
}</pre>
<p>}</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:70d654e67194f8ad0b9ef5e13462b5e42024-03-19T19:13:42+00:002024-03-19T19:13:42+00:00limpkin<p>hi Valentin!<br>
Yes of course :)</p>CDM324 Doppler Speed Sensor, with FFTs! - Valentinurn:md5:55c4c6a93f88f3c05ae5116fc82cef082024-03-19T09:35:26+00:002024-03-19T09:35:26+00:00Valentin<p>Very nice projet, can we mesure the speed of a ball ( like football ) thanks to your project ?</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:11d535959a94520dcf89c0fab20d1f3a2024-03-14T17:24:32+00:002024-03-14T17:24:32+00:00limpkin<p>Hi Dave!<br>
1) FAT, 512 bytes<br>
2) just to make it clear, at the moment the logging functionality is not implemented so you'll need to compile the firmware yourself. you'll need to use either my tool or the others i mentioned to flash the new firmware. no worries about bricking, you'll always be able to reflash the board<br>
3) they drive the MCU BOOT0 and RST pins :)</p>CDM324 Doppler Speed Sensor, with FFTs! - Daveurn:md5:f5a8c76d9754fdab71abb7d5cc9051d12024-03-13T10:45:24+00:002024-03-13T10:45:24+00:00Dave<p>Hi, you have done some great work here and it’s much appreciated!<br>
I am trying to use the backpack board to record to the SD. You mentioned some additional software above, and to format the card with a 512 block size.<br>
My questions are:<br>
1) Should I format the card as NTFS, FAT, or ExFat file system, and do you mean 512bytes or kilobytes?<br>
2) Do I need to use your reflashing PC software to install onto the board the SDcard software you linked in the comment above? I’m nervous about overwriting the software already on the board so any specific instructions would be welcome .<br>
3) What do the two buttons on the board do?<br>
Thank you!</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:d5786cbb95a01829565b539ee4a34ffd2024-03-05T20:07:40+00:002024-03-05T20:07:40+00:00limpkin<p>@SeanG: I don't think integrating the speed would provide reliable distance measurement for long distances...</p>CDM324 Doppler Speed Sensor, with FFTs! - SeanGurn:md5:68adcf08cc918afebef5f31b1ef2ac3b2024-03-05T04:27:30+00:002024-03-05T04:27:30+00:00SeanG<p>Would it be possible to modify the output to give distance travelled, assuming the sensor is pointed towards the ground at 45 degrees?</p>
<p>In the application I have in mind, some output filtering would be needed to take into account an uneven surface (ploughed field).</p>
<p>Speeds travelled will be between 1 - 6 kph.</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:a3db8a880b2320537a3976e1b48e60292024-02-29T18:40:32+00:002024-02-29T18:40:32+00:00limpkin<p>@Homer: I honestly don't see why not :)</p>CDM324 Doppler Speed Sensor, with FFTs! - Homerurn:md5:08dbcddff7a66f5e027878d03240c5b12024-02-28T22:06:36+00:002024-02-28T22:06:36+00:00Homer<p>Hi, the new version looks very nice!</p>
<p>I am interested in measuring the speed of water flowing inside an irrigation canal.</p>
<p>The sensor will be positioned a little bit above the surface, at an angle.</p>
<p>Is it possible to measure speeds as low as 2.5km/h?</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:d109238ae896602d110c98290f998ea32024-02-21T18:12:28+00:002024-02-21T18:12:28+00:00limpkin<p>@mike: could you let me know the errors? 3.12 and 3.11 should work<br />
your project should work indeed, simply grab the speed through uart :)</p>CDM324 Doppler Speed Sensor, with FFTs! - mikeurn:md5:28a0e1a7d39b40bd8221671f190e20612024-02-21T16:06:02+00:002024-02-21T16:06:02+00:00mike<p>Trying to load the Gui nevertheless recieve all kinds of errors can you let me know to what Python version it works ?</p>
<p>Python 3.12 and 3.11 gives errors on treats and the 2.7 does not allow pip install</p>
<p>Reffering to my other Question,<br />
The intention would be to add a esp32 to grab the speed which i hope is visable in the serial</p>
<p>Which i would like to display the speed on a 7 segment ledstrip display<br />
<a href="https://youtu.be/r_yobwaBWr0?t=766" title="https://youtu.be/r_yobwaBWr0?t=766" rel="ugc nofollow">https://youtu.be/r_yobwaBWr0?t=766</a></p>
<p>Bassically building my own maximum speed display</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:c6268732ef951fe5aca445b31bb6516a2024-02-21T15:33:18+00:002024-02-21T15:33:18+00:00limpkin<p>@Craig: yes of course :)<br />
@mike: definitely possible as you'd just need the UART connection. I'm not sure what you mean by your second question?</p>CDM324 Doppler Speed Sensor, with FFTs! - mikeurn:md5:2378fdc13f10db3f5e10856ffe2ec1672024-02-20T19:19:12+00:002024-02-20T19:19:12+00:00mike<p>Is it possible to just steer the device without the extender board true a ESP32 ? which gives a solid 3.3v from the board.<br />
And it would be possible then to steer a 7 segment led strip board?</p>
<p>Gruss aus Zuri</p>CDM324 Doppler Speed Sensor, with FFTs! - Craigurn:md5:a4080f27d4fc7f0c7da35bdbc45d0ec22024-02-20T17:19:40+00:002024-02-20T17:19:40+00:00Craig<p>Could this device be used with a Raspberry Pi, instead of an Arduino?</p>Making the Electronics for a 24GHz Doppler Sensor - limpkinurn:md5:929e74a147be42147532801dd0f38c842024-01-28T22:52:02+00:002024-01-28T22:52:02+00:00limpkin<p>@Greg: that's correct yes :)</p>Making the Electronics for a 24GHz Doppler Sensor - Gregurn:md5:9e6c86b0ef003c9e7fa004a8de5ad61e2024-01-27T00:43:17+00:002024-01-27T00:43:17+00:00Greg<p>Hi @limpkin, thank you for the great project. Before you rolled out the new version that takes advantage of FFT, I started looking for a way to adapt this circuit to get an analog signal out of it and perform FFT on a MC. To achieve that, I just removed the comparator branch, and it worked with a 5V MC (Arduino Uno). Now I'm trying to feed the signal to a ESP07 which operates at 3.3V and takes no more than 1V on its ADC. Am I getting it right that only R2 and R3 values need to be modified, so that the analog signal on VOUTB of the amplifier is centered around 0.5V?</p>CDM324 Doppler Speed Sensor, with FFTs! - limpkinurn:md5:997f8642215e875a814f36e2c6f6c5602023-12-10T08:40:58+00:002023-12-10T08:40:58+00:00limpkin<p>@Johan: it'll work well inside a box :)</p>