Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Site Notices
Posted: 7/14/2018 2:10:50 AM EDT
hello

another DIY thingie.
it is hard to determine distance in dark, hence subsonic shooting past 50 or so meters is not easy.

may be this contraption will relieve the problem.


an atmega328p MCU on arduino pro mini board gets distance data from RS232 LRF module, runs ballistic calculator and sends needed step count and direction
to stepper motor driver.
stepper motor turns elevation adjustment knob of  PVS-2 mount.

initially it used pre-calculated table instead of BC,but then i found some BC code on sourceforge, though it does not run on MCU as it is,modification is necessary.

also atmega is not good when dealing with floating point math. especially at 8 Mhz.
calculation time depends on distance - greater distance means more calculator iterations and more time consumed.
it takes around 3 sec for 250 meters calculation for subsonic .22lr.

there is a TTL/RS232 adaptor board attached to the rear end of pro mini board


a cheap i2c OLED display is used for useful info and debugging.
here is older video of testing normal versus fog LRF mode.
some small tree branches - invisible because out of focus - are causing near reflection,which is ignored in fog mode.

https://www.youtube.com/watch?v=3ORJj7ivokY

thanks for reading,any specific questions,let me know.

i will add more detailed info soon.
Link Posted: 7/14/2018 2:48:46 AM EDT
[#1]
Very cool! I've always wanted to do this on a regular scope.

Have you looked at using a teensy instead, 32 bit and they are quite fast.
Link Posted: 7/14/2018 6:00:12 AM EDT
[#2]
Quoted:
Very cool! I've always wanted to do this on a regular scope.

Have you looked at using a teensy instead, 32 bit and they are quite fast.
View Quote
thank you
what chip teensy board use?

i ran BC comparison test between atmega 328p @ 16 Mhz and STM32F103 @ 72Mhz.
to my surprise performance difference was roughly equal to clock frequency difference - STM was about 4 times faster.
32 bit architecture seems to play insignificant role in this case.

for my next project (if any) i will use some board based on STM32F3 or F4 series - F3s and F4s have FPU.
Link Posted: 7/14/2018 10:50:20 AM EDT
[#3]
Thats awesome
Link Posted: 7/14/2018 11:03:46 AM EDT
[#4]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
thank you
what chip teensy board use?

i ran BC comparison test between atmega 328p @ 16 Mhz and STM32F103 @ 72Mhz.
to my surprise performance difference was roughly equal to clock frequency difference - STM was about 4 times faster.
32 bit architecture seems to play insignificant role in this case.

for my next project (if any) i will use some board based on STM32F3 or F4 series - F3s and F4s have FPU.
View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Quoted:
Very cool! I've always wanted to do this on a regular scope.

Have you looked at using a teensy instead, 32 bit and they are quite fast.
thank you
what chip teensy board use?

i ran BC comparison test between atmega 328p @ 16 Mhz and STM32F103 @ 72Mhz.
to my surprise performance difference was roughly equal to clock frequency difference - STM was about 4 times faster.
32 bit architecture seems to play insignificant role in this case.

for my next project (if any) i will use some board based on STM32F3 or F4 series - F3s and F4s have FPU.
I haven't used one yet but they looked promising. I've only used an Arduino and a couple standalone 8 bit Atmel microcontrollers.
Link Posted: 7/14/2018 1:03:17 PM EDT
[#5]
Discussion ForumsJump to Quoted PostQuote History
Quoted:

I haven't used one yet but they looked promising. I've only used an Arduino and a couple standalone 8 bit Atmel microcontrollers.
View Quote
well i ordered one teensy 3.2, they seem to be well supported,although pricey.

in case if someone interested:

here you can download original BC code
if you compile example.c, it will write BC table to stdout.

modified code for MCU, at least works with Arduino IDE 1.8.2
copy these files to "libraries" folder and include ard_ballistics.h in your code.

here some example code that i used for speed test
EDIT - picture added
it outputs this on serial monitor when running on arduino uno
Link Posted: 7/14/2018 4:00:48 PM EDT
[#6]
Tagged for later reading.
Link Posted: 7/15/2018 2:00:16 AM EDT
[#7]
here you can download the actual control code

at this moment it is in sort-of-works state,needs lots of refining and cleaning.
i will update files from time to time,so content at this link may change.
Link Posted: 7/15/2018 6:54:04 AM EDT
[#8]
This project is awesome. I take it you're using this to ballistically adjust a laser aiming device?

That's pretty cool.
Link Posted: 7/15/2018 12:42:54 PM EDT
[#9]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
This project is awesome. I take it you're using this to ballistically adjust a laser aiming device?

That's pretty cool.
View Quote
thank you David.

no,i have no laser.
it was intended for diy cascade scope which uses PVS-2 mount for setting zero anyway.
if i had no PVS-2 mount on my hands,i would try to make something like weaver rail riser with builtin correction mechanism.
that would be more elegant and compact way to do it.

although this mechanical method has some disadvantages - correction takes time,stepper may skip steps,little noise,separate display - the thing i like most about it
is that any aiming device can be used with it - scope of any kind,lasers,even a bar with iron sights on both ends.

for accuracy test i will put a day scope on it.
night scope is most convenient,because LRF laser is visible through it.

may be later i will try to make a dedicated BDC gen3 scope - i have a HUD eyepiece for slim anvis tube,a tiny CRT from old video camera.
modern MCUs should have timers fast enough to generate full resolution PAL signal.
Link Posted: 7/25/2018 12:52:38 PM EDT
[#10]
a few words about LRF module.
it is made by company named Shenzhen Laser Explore Technology Co., Ltd.

old version is used in my device,it needs 9...12 volt power supply and communicates via RS232 only.
a voltage booster and RS232/TTL translator is necessary.
range up to 600 meters.
communication protocol for old module

also i have purchased their new 1000 meter version - it feeds from 2.5...5 volts and has both RS232 and TTL interfaces.
so it can be fed from Li-Ion and connected to MCU directly.
TTL voltage can be set using commands via serial.
comm protocol for new version

some pics of the new version - .22lr for size reference.




Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top