Hacking a Fnirsi DSO152 mini oscilloscope to play Breakout

Sdílet
Vložit
  • čas přidán 15. 04. 2024
  • In whch yr hmbl svt buys a very cheap battery-powered oscilloscope, promptly breaks it, and then makes it do something stupid.
    The Fnirsi DSO152 is a $15-$20 single-channel mini oscilloscope. Inside it's based on a CH32F103 processor, which is a copy of ST's STM32F103... and there's a header for a standard SWD debugger interface. Can I do anything with this? Spoiler: yes. It's essentially a Blue Pill with a high-bandwidth screen, USB-C, battery and charger, and some bespoke analogue circuitry attached. Reprogramming it is trivial, which makes it very plausible for repurposing for other things.
    You can find the source code plus the huge gimp PCB scan on github here: github.com/davidgiven/dso152-...
  • Věda a technologie

Komentáře • 28

  • @hjalfi
    @hjalfi  Před 2 měsíci

    I've since found that Fnirsi also make the DSO153, which comes in an identical (if blue) case and has higher resolution oscilloscoping and a signal generator. So, both input and output analogue stages. I can't find a high resolution image of the PCB but it looks oddly similar, although with a different microcontroller and a six-pin debug header. The UI looks identical so there's a decent chance it's another CH32, although a bigger one.

    • @Nibb31
      @Nibb31 Před měsícem +2

      Out of curiosity, I just took apart my DSO153 and unfortunately they have scratched off the markings on the processor. It's a smaller 12x12 pin package and there is more going on on the PCB with a large inductor (maybe for the signal generator). It has 6 unmarked pin holes instead of the 4 debug ones on the DSO152. I can send you a pic if you're interested.

    • @hjalfi
      @hjalfi  Před měsícem

      @@Nibb31 Bah, I wish people wouldn't do that... given the UI looks the same it's probably another STM32-compatible, and figuring out which debug pins do what is it the very worst a matter of trying all the combinations, and then it should be identifiable through the debugger. I found a teardown with microscope views here: czcams.com/video/8_s7yX8SnX8/video.html Maybe when I see the thing for sale on Aliexpress I'll get one.

  • @madiskaal
    @madiskaal Před 2 měsíci +5

    This looks pretty good starting point for open-source car diagnostic tool

    • @hjalfi
      @hjalfi  Před 2 měsíci +2

      One thought I had was whether it'd be possible to reassign the analogue input to a digital pin, to get higher bandwidth, and use it as a super logic probe --- you wouldn't get the true waveform but being able to show an actual trace could be really useful.

  • @adriansdigitalbasement
    @adriansdigitalbasement Před 2 měsíci +4

    Very cool to see it repurposed like this!

  • @gwandrer
    @gwandrer Před 2 měsíci +1

    Nice! Thanks for the amount of time spent and the details you put there. It's very encouraging to do the same on every gadget I have now. :)

  • @olavl8827
    @olavl8827 Před 2 měsíci +3

    Nice hacking there ;-) And thanks for mentioning the Buck50 firmware. That will give me something to play with in the coming weeks. I did once make an "oscilloscope" with an Arduino Nano, based on an article I found on a website. It did even kind of work, just not very well and I lost interest. It might be interesting to see how well or how badly a Bluepill will handle this task. I may buy the Fnirsi or something similar as well (though I do have a GW-Instek scope).

    • @mikejones-vd3fg
      @mikejones-vd3fg Před 2 měsíci

      I skipped the diy arduionno scope and just bought the dso2512g, its about the same here but looks like it uses customs fpga's and achievs like 8megaherts instead of 200khz which i think is the only drawback of these off the shelf mcu's. I too got a few ch32f103's after playing around with the arduino and wanting to try something more powerful. I had no idea they were this powerful! cool stuff

  • @andymouse
    @andymouse Před 2 měsíci +2

    A few more games I would be tempted to buy one, well done !!....cheers.

  • @Atmatan_Kabbaher
    @Atmatan_Kabbaher Před 2 měsíci +2

    This looks like an absolutely awesome first scope for someone like me, who would use it with Flipper Zero.
    Running arm, exposed uart, easy to take apart, small and solid...
    That fits literally every niche a device needs to go in my bag..

    • @hjalfi
      @hjalfi  Před 2 měsíci

      Be aware that the stock firmware _doesn't_ give you a UART (or if it does I haven't found it yet). And as I haven't found a way of dumping the stock firmware, once you've released it it's not an oscilloscope any more!

    • @Atmatan_Kabbaher
      @Atmatan_Kabbaher Před 2 měsíci

      @@hjalfi Flipper should at least be able to give you access to the console to start decoding it. There's probably a custom firmware out there you could flash to turn it back into a scope

  • @DavidPlass
    @DavidPlass Před 2 měsíci +3

    Hey you made it to Hackaday

  • @jstro-hobbytech
    @jstro-hobbytech Před 2 měsíci +1

    Awesome video. It would be hilarious if you could use the analog input connected to a function generator and depending on the waveforms the paddle is controlled hahaha est rube goldberg device ever haha.
    Seriously though. Cool video.

  • @garylcamp
    @garylcamp Před 29 dny +1

    I just got mine today and it looks great. I wish you could have gone into a little more detail on updating over USB. I cant get to connect to my PC (Win10 says it is malfunctioning). The instructions are not at all clear to me. What is a U Disk? A USB used as a storage (drive)? Pressing the pwr and and then the OK buttons in any combination of longs and shorts and holds still gets a Win10 complaint as soon as the USB is plugged in. Everything else works fine. I watched 10 or so videos on the DSO152 so far. I guess I will try to go to the company or the website community next.
    Anyway, thanks for the video, very interesting though above my head on programming.

    • @hjalfi
      @hjalfi  Před 5 dny

      I never even tried to make the USB update work, as there's no firmware image available to update it with! All my work was with the SWD debugger.

  • @candas1
    @candas1 Před 2 měsíci +1

    If careful, programming pings can also be used in your sketch

    • @hjalfi
      @hjalfi  Před 2 měsíci +1

      Yes, but I'm very aware of my ability to cock things up and would rather not risk it!

  • @L1Q
    @L1Q Před 2 měsíci +1

    what do you mean USB is working? could it possibly host a thumb drive and dump data to it?

    • @hjalfi
      @hjalfi  Před 2 měsíci +1

      Maybe. It already works the other way around, where _it_ acts as a peripheral to another device. The question is whether it'll work the other way around, where it hosts another peripheral. The CH32F1 supports host mode but I don't know if the connector is wired up appropriately (or whether it needs to be wired up appropriately).

  • @shaolin95
    @shaolin95 Před měsícem +1

    Is better as a gaming machine than as an oscilloscope 😂

  • @mikejones-vd3fg
    @mikejones-vd3fg Před 2 měsíci +1

    woah a ch32f103? I got some of those too after playing with arduino and wanting to try something more poweful. Didnt get much into them as it was a little more difficult then i imagined with the different toolchain wch uses compared to stm32 , but i did manage to get a white noise generator code example loaded up on it and it worked really well, i thought would be a good mcu for a signal genrator but had no idea it could run an oscilliscope or a game like breakout. Well my 486 25mhz cpu back in the day ran doom2, so it shouldnt be surprsing todays cpu's at 72mhz could so something similar i guess. Can you make it run doom? jk i dont care to tsee that, doom needs 60fps, its a mockery of what doom is making it run on any hardware, i was FPS starved in the game with my fpuless 486, it cant run on any hardware.. it needs an FPU to run good. and you dont get a fpu in the f103 range, you need f403.

    • @hjalfi
      @hjalfi  Před 2 měsíci +1

      I just treated it like a ST32F103. No different configuration, no WCH toolchain, I just installed the std32duino core, set things up, and pressed 'compile and upload'. Also, the ST32F1 absolutely has enough grunt to run Doom. What it doesn't have is the memory. The screen has more memory than the MCU! You may be able to do a limited port of Castle Wolfenstein; raycasting is easy.

  • @cocusar
    @cocusar Před 2 měsíci

    Would you be interested in doing the exact same thing but for the "more expensive" model? (I think it's the dso180h or something, featured by a lot of youtubers, including diode gone wild) it's around 100 bucks but I bet it's quite a lot better than the this one

    • @hjalfi
      @hjalfi  Před 2 měsíci

      I found a teardown of it which gave me a look at the motherboard: it's a significantly more complex device, with discrete ADCs, a monster FPGA doing a lot of the work, and the CPU is a Allwinner FC100S which is an 533MHz AMR9 with 32MB of onboard RAM capable of running Linux. Making this run custom code is probably not that hard, but figuring out the FPGA and the analogue side will be a nightmare, and definitely out of my pay grade. Interestingly, I see that the Hantek DSO2000 series of oscilloscopes use the FC200S, so maybe there's scope for a cross-platform oscilloscope firmware package...

    • @cocusar
      @cocusar Před 2 měsíci

      @@hjalfi oh the FC100S! I wanted to develop a board with it in the past. if that thing runs linux, it'd be cool to hack it. I hope I'd be able to buy one. Yeah the fpga part might be out my paygrade as well, at least for a quick and dirty hack. But anyway, a great hack!

  • @broncochamo
    @broncochamo Před 2 měsíci +1

    Sweeeeeeeeeet