Page 4 of 7

Re: HB100 radar!

Posted: Fri Sep 24, 2021 7:50 pm
by medelec35
jgu1 wrote:
Fri Sep 24, 2021 7:45 pm
ou know, two of those jumperwire (chinese) we use in breadboard when we connect devices, there was somtime bad connection in these
I don't doubt that at all, as I have a fully open circuit one in the past.
Nothing to be ashamed of.

Re: HB100 radar!

Posted: Sun Sep 26, 2021 8:04 pm
by jgu1
Hi Martin!

I have now perform some more test. I can tell you your program work. :D I have still a small issue with the amplifier, the signal is not 100% smoth so sometime I see a very high speed, but in between the correct speed. I have to let signal to pass a gate or similar connection.

I continue, you hear thank´s.

Jorgen

Re: HB100 radar!

Posted: Sun Oct 10, 2021 3:55 pm
by jgu1
Hi Martin!

Finally I got some more time to test. I have made the amplifier and have a nice clean sinal out to the input to the Pic.
I know your program work, anyway when I connect my generator to the input, I have same result in the display as you. But when I test with the radar connected, I see the speed in the display, but it is not stable and fluacting up and down if I walk speed between km/h 2 - 16, sometimes I feel I see the correct speed.
Honest, I don´t understand your program 100% (me the dummy :D ) But the signal which come in are not stable, should it the not be caltulate the average frequense in someway or?

I have Google the HB100 and found on youtube this https://www.youtube.com/watch?app=desktop&v=uSma0zQSnsU
I try to att. his project here but to big. It can downloaded here: https://www.dropbox.com/s/7d1fdzr8d243n ... 2.zip?dl=0 May be you can see if it is some similar to your program.
Of course I could use his program/project, but I will prefeer Flowcode.

If you not have time to look at it I understand, but dare to ask ayway ;)

Thank´s in advance.

Re: HB100 radar!

Posted: Sun Oct 10, 2021 6:43 pm
by medelec35
When the speed is wrong. can you note the speed ranges that are wrong?
The simple way around would be to set a minimum frequency rejection value.
The results could then be averaged out as you stated.
Thinking about it, if you can state a max speed range you want to detect, anything say 10MPH greater can be automatically rejected.

Re: HB100 radar!

Posted: Sun Oct 10, 2021 9:19 pm
by medelec35
Hi Jorgen,
See if the attached flowchart works any better?
It is untested.
I have limited the maximum frequency to 5000HZ which is approx. 159 mph.
That should stop a lot of the randomness.
I'm looking into improving ever further, by using a different method.

Re: HB100 radar!

Posted: Mon Oct 11, 2021 7:21 pm
by jgu1
Hi Martin!

Unfortunately it doesn´t help. I see the value in the display from 2 - 18 km/h sometimes I sense I see the correct speed. But it is difficult to see.

I have just orderd the PCB from Seedstudio, and then I will test this amplifier from the examble I send you.

The way I test, I take my testboard and walk direktion up against a wall. I am glad for your care and help, but again if you are busy then wait :D

Jorgen

Re: HB100 radar!

Posted: Mon Oct 11, 2021 7:59 pm
by medelec35
It might be worth comparing with the Arduino version as a temp thing.
Then you will know if the amp or the code?

Re: HB100 radar!

Posted: Mon Oct 11, 2021 11:13 pm
by medelec35
I have thought of an improvement.
It should work much better.
I will create the new version tomorrow.
If works, I will explain the difference.

Re: HB100 radar!

Posted: Tue Oct 12, 2021 5:42 am
by jgu1
Wow Martin, Thank you. :D

Jorgen

Re: HB100 radar!

Posted: Wed Oct 13, 2021 8:55 pm
by medelec35
Hi, Jorgen.
It was not that easy to reject random frequencies.
Hopefully this one does.
This Flowchart measures two pulse widths 50ms between them and converts the results to a frequency.
If both are within 20Hz of each other a counter is incremented.
If both have a difference of more than 20Hz then a counter is decremented.
When the counter reaches 21 then the frequency is displayed.
This should be better than the bubble sort or averaging.
The issue with averaging is one rogue frequency will cause the total to still be out by a fair bit.
Hopefully my method won't.
The only thing is you will need to change from T1CKI (C0)pin to B0 pin.