ChaeyaJ0Thai
Posts: 12
Joined: Fri Feb 03, 2023 8:19 pm

Beginning an o'scope project

Tue Sep 26, 2023 10:40 pm

Hello.

I'm trying to begin an oscilloscope project.
First did a search around, and found that there are already a handful of possibilities, but most of them (Pico firmware or Android APK) are closed source and on top on that privative (one must pay for them).

So I though about trying to begin new one more from scratch.
Planning to use the Raspberry Pi 4.

I'd like to begin with being able to measure relatively small DC and AC (with positive and negative) signals.
Already read that the GPIO can at most sense from 0 to 3.3 V.

I have two initial doubts,
For a project like this, is the GPIO the only way to go? Cannot be done through a USB port? with the GPIO already occupied there will be no room for Raspberry display or battery unit
For AC signals, what would be the max frequency it could read? Could this be changed?

Thanks all.

User avatar
neilgl
Posts: 6916
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Beginning an o'scope project

Tue Sep 26, 2023 10:57 pm

The pi4 does not have any onboard ADC so you need external components to measure analog variable voltages.
The GPIO when used as digital inputs report either 0 or 1 (maximum voltage is 3.3volts) I can’t remember exactly what voltage (above 1.8V?) is treated as high.
Have a look at piscope http://abyz.me.uk/rpi/pigpio/piscope.html

drgeoff
Posts: 13828
Joined: Wed Jan 25, 2012 6:39 pm

Re: Beginning an o'scope project

Tue Sep 26, 2023 11:19 pm

There is an oscilloscope project in issue 71 of MagPi. It is not without some foibles. See what I wrote at viewtopic.php?t=217240

But frankly for the same money as you will spend on a RPi, micro-SD card, PSU etc you can get a complete battery powered scope with screen. Go to aliexpress.com and put 'portable oscilloscope' into the search box and see what is on offer in the £20 to £80 (or you local currency equivalent) range.
Quis custodiet ipsos custodes?

ame
Posts: 8217
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Beginning an o'scope project

Wed Sep 27, 2023 12:01 am

There was an interesting article on Hackaday today:
https://hackaday.com/2023/09/26/__trashed-13/
Oh no, not again.

ChaeyaJ0Thai
Posts: 12
Joined: Fri Feb 03, 2023 8:19 pm

Re: Beginning an o'scope project

Fri Sep 29, 2023 6:54 pm

I see.

Searching a bit more I found this:
https://www.linux-magazine.com/Online/F ... to-Digital

Think this could be a good start? Thanks

User avatar
radiolistener
Posts: 622
Joined: Thu Aug 03, 2023 6:49 am

Re: Beginning an o'scope project

Sat Sep 30, 2023 6:58 am

ame wrote:
Wed Sep 27, 2023 12:01 am
There was an interesting article on Hackaday today:
https://hackaday.com/2023/09/26/__trashed-13/
Using Chinese logic analyzer, which cost is just 5 USD, you can do 24 MS/s
https://www.aliexpress.com/item/1005003243227313.html

ame
Posts: 8217
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Beginning an o'scope project

Sat Sep 30, 2023 7:43 am

radiolistener wrote:
Sat Sep 30, 2023 6:58 am
ame wrote:
Wed Sep 27, 2023 12:01 am
There was an interesting article on Hackaday today:
https://hackaday.com/2023/09/26/__trashed-13/
Using Chinese logic analyzer, which cost is just 5 USD, you can do 24 MS/s
https://www.aliexpress.com/item/1005003243227313.html
Cool story, bro.
Oh no, not again.

ChaeyaJ0Thai
Posts: 12
Joined: Fri Feb 03, 2023 8:19 pm

Re: Beginning an o'scope project

Sat Sep 30, 2023 5:53 pm

For the project I think I'll be sticking with the ADC MCP3204.

There are many mentions of it here in the forums, and its preferred communication way SPI.

But I'm VERY noob in C/C++, are there good novice guides to begin with SPI communication programming?
Thanks.

Return to “Automation, sensing and robotics”