Author Topic: Yet another DIY GPSDO - yes, another one  (Read 173825 times)

0 Members and 13 Guests are viewing this topic.

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #300 on: October 13, 2021, 05:33:12 pm »
Where I am having trouble is 1) mounting the parts properly (the OCXO has oddball pin spacing) and 2) the software/firmware aspects.
...

I suggest you check the other forums here on EEVblog and ask for help on specific points where you are having trouble.

For mounting the parts: https://www.eevblog.com/forum/beginners/
Also check the pictures posted by enut11. You can copy what he did to mount the (5 pins) OCXO on a perfboard.

For the Arduino IDE, programming and flashing the MCU: https://www.eevblog.com/forum/microcontrollers/ or the excellent Arduino forum: https://forum.arduino.cc/
 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #301 on: October 13, 2021, 07:00:53 pm »
Hey @bob91343. I understand your situation. I too grew up with analog electronics and struggle with all this digital stuff. However, we now live in a digital age so have to manage it in some way. There's lots of help on this Forum and all you need do is follow the advice, step by step, at your own pace.
enut11

@AndrewBCN, here is my powered-up GPSDO project. Added the LED as suggested (bottom left micro board) but there is still some wiring to do.
I am powering it all from a 12v SMPS plugpak into a 7805 5v regulator. The regulator directly powers the OCXO and there is a 5v takeoff to the micro board.
The small heatsink under the 7805 seems adequate for now and runs a little hotter than the OCXO.
« Last Edit: October 13, 2021, 07:09:17 pm by enut11 »
an electronics nut from wayback...
 
The following users thanked this post: AndrewBCN

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #302 on: October 13, 2021, 09:46:41 pm »
@AndrewBCN
Some questions on the circuit. I intend to only use the modules above.
1) is Vocxo redundant?
2) What is the purpose of the 2.5v bias on STM pin26?
3) C4/C5 look to be part of a filter. Is the 10uF value critical? I have 22uF on hand.
enut11
« Last Edit: October 14, 2021, 01:24:06 am by enut11 »
an electronics nut from wayback...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #303 on: October 13, 2021, 09:49:50 pm »
...
@AndrewBCN, here is my powered-up GPSDO project. Added the LED as suggested (bottom left micro board) but there is still some wiring to do.
I am powering it all from a 12v SMPS plugpak into a 7805 5v regulator. The regulator directly powers the OCXO and there is a 5v takeoff to the micro board.
The small heatsink under the 7805 seems adequate for now and runs a little hotter than the OCXO.

Looking good.  :-+ Thanks for the pics, btw.
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #304 on: October 13, 2021, 10:07:43 pm »
@AndrewBCN
Some questions on the circuit. I intend to only use the modules above.
1) is Vocxo redundant?
2) What is the purpose of the 2.5v bias in STM pin26?
3) C4/C5 look to be part of a filter. Is the 10uF value critical? I have 22uF on hand.
enut11

1) Vocxo is only used if you are using an optional INA219 current sensor to measure the power consumption of the OCXO, you can ignore it in your case.
2) That's explained in the schematic version 0.6. Actually that's an input to the ADC channel 0, we just measure Vcc divided by 2. IIRC it's also optional.  :)
3) C4 and C5 are used to filter the PWM output of the STM32 to generate Vctl. In your case you have the choice of using the MCP4725 DAC or this simple PWM. I suggest you use the PWM. And no the value of C4/C5 is not critical, 22uF should work fine.

Why the PWM and not the DAC? The PWM is 16 bit and the DAC is 12 bit resolution.
 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #305 on: October 13, 2021, 10:38:30 pm »
Thanks. In that case I do not need the 4725 DAC so I will unplug it and save a bit of power. Also, I will not use the 4.7K/4.7K divider to pin 26 of STM micro

The 7805 was getting too hot with the small heatsink so I interfaced a programmable pre-regulator, here showing ~8.5v/220mA

Easy part done (all the wiring), now the hard part - loading the control program  >:D

Do I need to unplug the micro from the PCB in order to program it via USB C?
« Last Edit: October 14, 2021, 06:47:21 am by enut11 »
an electronics nut from wayback...
 
The following users thanked this post: AndrewBCN

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #306 on: October 14, 2021, 07:24:06 am »
Thanks. In that case I do not need the 4725 DAC so I will unplug it and save a bit of power. Also, I will not use the 4.7K/4.7K divider to pin 26 of STM micro

The 7805 was getting too hot with the small heatsink so I interfaced a programmable pre-regulator, here showing ~8.5v/220mA

Easy part done (all the wiring), now the hard part - loading the control program  >:D

Do I need to unplug the micro from the PCB in order to program it via USB C?

Looking very good.  :-+ In principle, you can program the STM32 Black Pill in-circuit and run the firmware while always connected to your PC - and read the status messages on the Arduino IDE Serial Monitor (see my post on the first page of this thread). This is actually almost essential for testing/debugging, since you don't have an OLED display.

But for testing your STM32 programming setup (with the Blinky program) I would disconnect the Black Pill from the perfboard.

Once you have passed the "Blinky test", we can proceed to configure the firmware to your hardware setup.

 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #307 on: October 14, 2021, 09:11:46 am »
This is the website that I was working from:
https://www.sgbotic.com/index.php?dispatch=pages.view&page_id=49

Man, what a process downloading and installing the Arduino IDE!
I ended up with V1.8.16. I also downloaded and installed STM32Cube.

I then copied the 'blink' code into a new page on the IDE and started the upload process.

I received an error message
Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Generic STM32F4 series, BlackPill F411CE, STM32CubeProgrammer (DFU), Enabled (generic 'Serial'), CDC (generic 'Serial' supersede U(S)ART), Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"

Sketch uses 22128 bytes (4%) of program storage space. Maximum is 524288 bytes.

Global variables use 3624 bytes (2%) of dynamic memory, leaving 127448 bytes for local variables. Maximum is 131072 bytes.

An error occurred while uploading the sketch

STM32_Programmer_CLI.exe not found.

Please install it or add <STM32CubeProgrammer path>\bin' to your PATH environment:

https://www.st.com/en/development-tools/stm32cubeprog.html

Aborting!

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Could this be due to me changing STM32Cube from the default installation directory?
an electronics nut from wayback...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #308 on: October 14, 2021, 09:26:38 am »
...
Could this be due to me changing STM32Cube from the default installation directory?

I can't really help you here, because I use Linux and you are using Windows 10. But from the error message, it seems you can solve the problem by uninstalling STM32Cube and reinstalling it in its default installation directory, where the Arduino IDE should be able to find it.

If you need help with this Windows 10 installation, please take a look at the STM32duino forum, there are a number of very competent people there willing to help.

https://www.stm32duino.com/viewforum.php?f=35
« Last Edit: October 14, 2021, 11:46:18 am by AndrewBCN »
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 505
  • Country: ca
Re: Yet another DIY GPSDO - yes, another one
« Reply #309 on: October 14, 2021, 04:15:22 pm »
for arduino ide need a package
https://github.com/stm32duino/Arduino_Core_STM32

as it described in "getting started" .JSON url  add in  "Additional Boards Managers URLs"  ; that located: Files -> Preferences; at very bottom as  stated "additional ... " with window on right side,  click on to add more url's board

then:
menu Tools -> Board -> right side board manager type STM32, it will shows "STM32 MCU based board"  i think it 2.1V

older version
https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #310 on: October 14, 2021, 07:29:12 pm »
Well, some success with Blinky, but I am not sure!

I re-installed the STM32 Cube into its default directory.
I then tried to upload Blinky but got the following error message:
"Error: No debug probe detected"

On re-connecting the STM32 to USB the blue led now blinks slowly.

As I said, I am not sure if it has successfully passed this test!

an electronics nut from wayback...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #311 on: October 14, 2021, 07:44:13 pm »
Well, some success with Blinky, but I am not sure!

I re-installed the STM32 Cube into its default directory.
I then tried to upload Blinky but got the following error message:
"Error: No debug probe detected"

On re-connecting the STM32 to USB the blue led now blinks slowly.

As I said, I am not sure if it has successfully passed this test!

It seems "Blinky" has been flashed successfully!  :-+

Now you can try to upload a program to test the serial monitor and then we can move on to testing the GPSDO firmware.

To test the serial monitor, try flashing the Communication-> ASCII table example. Open the serial monitor and you should see the ASCII table being printed out.

 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #312 on: October 14, 2021, 08:03:34 pm »
A little more info on the serial monitor test please.

As for the "blinky" test, it is more a fading in-out of the blue LED rather than a flash which makes me think that something is not working?
an electronics nut from wayback...
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 505
  • Country: ca
Re: Yet another DIY GPSDO - yes, another one
« Reply #313 on: October 14, 2021, 08:53:40 pm »
basically arduino looking for PATH for bin folder for CubeProg, in overall you can install it in any place   adding path, or create a custom one per session. like:

my working folder:  C:\Arduino  ;  inside C:\Arduino\arduinoIDE - with IDE and STM: C:\Arduino\STM32CubeProg

i created runard.BAT in :\Arduino\arduinoIDE , to launch IDE, with custom PATH variable it looks like, last after ; is what we need :

REM ------
SET PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arduino\STM32CubeProg\bin

arduino.exe
REM ------

for com port, when you STM running, it will be COM port in your system, to know precise  one:

You can press Windows + R keys simultaneously to open Windows Run.
type  compmgmt.msc, and hit Enter to open it.

Device Manager -> Ports (COM @ LPT)  ...  List of ports (COM-X ) your device

compilation process in IDE should invoke STM ...  like this:
Sketch uses 22156 bytes (8%) of program storage space. Maximum is 262144 bytes.
Global variables use 3624 bytes (5%) of dynamic memory, leaving 61912 bytes for local variables. Maximum is 65536 bytes.
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.6.0       

and so ... lot of additional info .... ending:

File download complete
Time elapsed during download operation: 00:00:01.152

RUNNING Program ...
  Address:      : 0x8000000
Start operation achieved successfully



« Last Edit: October 14, 2021, 09:06:46 pm by GigaJoe »
 

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #314 on: October 14, 2021, 09:16:39 pm »
Gigajoe quote
"You can press Windows + R keys simultaneously to open Windows Run.
type  compmgmt.msc, and hit Enter to open it.
"

Yes, I did this after plugging the STM32 into the USB port. It did not show up in Device Manager Ports. Do any of the buttons on the STM32 board have to be pressed?
an electronics nut from wayback...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #315 on: October 14, 2021, 09:35:30 pm »
Gigajoe quote
"You can press Windows + R keys simultaneously to open Windows Run.
type  compmgmt.msc, and hit Enter to open it.
"

Yes, I did this after plugging the STM32 into the USB port. It did not show up in Device Manager Ports. Do any of the buttons on the STM32 board have to be pressed?

Yes, you have to keep the BOOT button pressed while plugging in the USB C cable to the STM32 board, to enter DFU mode. Check post #78 on page 4 of this thread, I pointed Bob around three months ago to a website that explains the STM32 flashing procedure in detail. Or ask on the STM32duino forum.
« Last Edit: October 14, 2021, 09:40:22 pm by AndrewBCN »
 

Offline GigaJoe

  • Frequent Contributor
  • **
  • Posts: 505
  • Country: ca
Re: Yet another DIY GPSDO - yes, another one
« Reply #316 on: October 14, 2021, 09:35:39 pm »
you need drivers to support com port mode , and  DFU programming mode, drivers installing with  cube prog,  or separately, able to find it in folder ...\STM32CubeProg\Drivers - where CUBE Prog was installed

so when STM plug-in and running it will be COM port, press -0 and reset - DFU mode, if no com port, and DFU - as exclamation mark in devices - drivers not installed (or STM not recognized )

try restart PC if drivers was installed ....

UPD:  just a note ,  if ublox connected to PA9 PA10, as on PDF diagram, it possible that board using the same pins for USB, it depends on model. so STM will not recognized in OS.
« Last Edit: October 14, 2021, 11:29:08 pm by GigaJoe »
 
The following users thanked this post: enut11

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #317 on: October 15, 2021, 06:20:29 am »
Gigajoe quote
"You can press Windows + R keys simultaneously to open Windows Run.
type  compmgmt.msc, and hit Enter to open it.
"

Yes, I did this after plugging the STM32 into the USB port. It did not show up in Device Manager Ports. Do any of the buttons on the STM32 board have to be pressed?

Yes, you have to keep the BOOT button pressed while plugging in the USB C cable to the STM32 board, to enter DFU mode. Check post #78 on page 4 of this thread, I pointed Bob around three months ago to a website that explains the STM32 flashing procedure in detail. Or ask on the STM32duino forum.

Thanks for the reminder @AndrewBCN. Looks like I skipped over that when I was scanning the thread to catch up on what I had missed.

I must say that Win10 is very fussy in handling the STM32 via USB, more often than not rejecting and refusing to talk to it.

Anyway, using reply #78, I managed to to get Blinky to work properly this time. I then loaded the ASCII program and got the following response in Monitor:

"ASCII Table ~ Character Map
!, dec: 33, hex: 21, oct: 41, bin: 100001
", dec: 34, hex: 22, oct: 42, bin: 100010
#, dec: 35, hex: 23, oct: 43, bin: 100011
$, dec: 36, hex: 24, oct: 44, bin: 100100
%, dec: 37, hex: 25, oct: 45, bin: 100101
&, dec: 38, hex: 26, oct: 46, bin: 100110
', dec: 39, hex: 27, oct: 47, bin: 100111
(, dec: 40, hex: 28, oct: 50, bin: 101000
), dec: 41, hex: 29, oct: 51, bin: 101001" plus a lot more...

So that appears to work.

I believe I am now ready to tackle the REAL program to control my GPSDSO.  :)
an electronics nut from wayback...
 
The following users thanked this post: AndrewBCN

Offline enut11

  • Super Contributor
  • ***
  • Posts: 1000
  • Country: au
  • Love building/modifying/restoring test equipment
Re: Yet another DIY GPSDO - yes, another one
« Reply #318 on: October 15, 2021, 07:15:54 am »
@AndrewBCN quote:
"PS: I have just noticed that STM32 Core version 2.1 has just been released a few days ago. It is the version I recommend for use with the STM32 GPSDO firmware.
« Last Edit: October 11, 2021, 07:32:22 pm by AndrewBCN »"

The latest Core for my Black Pill F401CC is version 1.9. Is this a problem?
enut11
an electronics nut from wayback...
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #319 on: October 15, 2021, 09:45:11 am »
@AndrewBCN quote:
"PS: I have just noticed that STM32 Core version 2.1 has just been released a few days ago. It is the version I recommend for use with the STM32 GPSDO firmware.
« Last Edit: October 11, 2021, 07:32:22 pm by AndrewBCN »"

The latest Core for my Black Pill F401CC is version 1.9. Is this a problem?
enut11

Yes. Actually it's the other way around, the earliest Core for the Black Pill F401CC was version 1.9. Please uninstall version 1.9 (simply delete the whole directory) and then reinstall 2.1 from this link: https://github.com/stm32duino/Arduino_Core_STM32/releases/tag/2.1.0
« Last Edit: October 15, 2021, 11:04:34 am by AndrewBCN »
 

Offline AndrewBCNTopic starter

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: fr
Re: Yet another DIY GPSDO - yes, another one
« Reply #320 on: October 15, 2021, 09:51:29 am »
...

Anyway, using reply #78, I managed to to get Blinky to work properly this time. I then loaded the ASCII program and got the following response in Monitor:

"ASCII Table ~ Character Map
!, dec: 33, hex: 21, oct: 41, bin: 100001
", dec: 34, hex: 22, oct: 42, bin: 100010
#, dec: 35, hex: 23, oct: 43, bin: 100011
$, dec: 36, hex: 24, oct: 44, bin: 100100
%, dec: 37, hex: 25, oct: 45, bin: 100101
&, dec: 38, hex: 26, oct: 46, bin: 100110
', dec: 39, hex: 27, oct: 47, bin: 100111
(, dec: 40, hex: 28, oct: 50, bin: 101000
), dec: 41, hex: 29, oct: 51, bin: 101001" plus a lot more...

So that appears to work.

I believe I am now ready to tackle the REAL program to control my GPSDSO.  :)

Excellent!  :-+ Well done.
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #321 on: October 15, 2021, 11:12:33 am »
You can press Windows + R keys simultaneously to open Windows Run.
type  compmgmt.msc, and hit Enter to open it.
For directly to the Device Manager:
Code: [Select]
C:\>devmgmt.msc
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #322 on: October 15, 2021, 01:10:45 pm »
This ublox NEO-M9N board looks pretty nice and a decent value at $40.
It's designed as a daughter board for some arbitrary standard, but that shouldn't hurt much.
https://www.digikey.com/en/products/detail/MIKROE-3922/1471-MIKROE-3922-ND/11507397
What do you think?
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #323 on: October 15, 2021, 02:15:28 pm »
A few months ago I bought a Neo-M8N board and a cheap Bingfu puck antenna. Both together were less than $25 from Amazon (of course I threw in some other random cheap item to get free shipping).

Indoors and 3 meters from any window, the GPS module alone did struggle to connect. But once I hooked up the antenna it was able to connect in a matter of minutes. As far as I can tell from the u-blox software the part is genuine.

https://www.eevblog.com/forum/chat/what-did-you-buy-today-post-your-latest-purchase!/msg3612283
« Last Edit: October 15, 2021, 02:19:43 pm by rdl »
 

Offline Renate

  • Super Contributor
  • ***
  • Posts: 1460
  • Country: us
Re: Yet another DIY GPSDO - yes, another one
« Reply #324 on: October 15, 2021, 05:44:14 pm »
A few months ago I bought a Neo-M8N board...
Oh, I hadn't realized that those little guys had a micro USB connector on them too.
I have a NEO-5M (that was discontinued ~2014?) on a fleet surveilance board that I removed from a friend's 2nd hand van!
I forget where the SMA antenna went to. In any case, with a 1/4 wave antenna it can barely pick up the time sometimes.
So I ordered the NEO-M9N and an active antenna.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf