Hacker News new | ask | show | jobs
by tomxor 2984 days ago
I love these little stories, they always make me want to go out and buy a proper oscilliscope so I can start my own adventures.

I'm surprised by how simple and easy to understand the data serialisation is on some bits of hardware as in this case.

5 comments

Thank you for the kind words! I will echo slig and say that I have been really happy with the Rigol DS1054Z so far. I love that you can build a really capable electronics lab at home in 2018 for less than $500.
Any guides in getting started with an oscilloscope?
eevblog has an extensive collection of oscilloscope vids.
Micsig scope tablets are great too. Similar price and specs but they're also battery powered and portable!
Having an oscilloscope is great, and it needn't be thousands.

For general tinkering and exploring I picked up the Digilent Analog Explorer 2 with the Ham Radio bundle[1]. They had a coupon deal where 'hamradioworkbench2018' would unlock a $100 discount. Not sure if that still works. While it is a USB scope (so you are dependent on your PC/Laptop for a display) it includes some other useful bench top tools.

Used scopes in the 100 - 200 Mhz range from the 90's are often pretty inexpensive and can usually be calibrated and repaired. This is especially true of the Tektronix 465 and 475 series which were sold in huge numbers. While not as crisp as a digital scope they work well and can be found (at least in the Bay Area) for $50 - $100. About double that on ebay.

The Rigol folks really pushed the price point hard and their DS1054 and DS1102D series are fairly common and inexpensive at $300 - $500.

Scrounge around HAMFests or surplus liquidators and you can often find a deal if you know what you want.

[1] https://store.digilentinc.com/ham-radio-workbench-bundle/

I'm an electronics enthusiast (play with it on weekends) and the Rigol DS1054Z oscilloscope (it's the same used by OP) has a really good cost/benefit, and it's also hackable.
Yes I was just looking at it, £300 seems pretty reasonable. A while ago I was looking at old used stuff but even they are in the thousands. Thanks for recommending it, it's nice to know some HN readers are using it because I don't really know what to look for in an oscilliscope :)
I know Rigol was doing a promotion around the holidays where they'd give you expanded bandwidth, serial decode/trigger, and a few other goodies at no charge.

Of course, you can always just see about taking matters into your own hands (http://gotroot.ca/rigol/riglol/)

Test Equipment dot Net is running the Rigol promotion through June:

https://www.tequipment.net/rigol-promotions-and-offers/

If you want a cheaper and more portable solution, have a look at Picoscope (UK). Don't believe the guff about USB scopes being garbage. These things have plenty of bandwidth and it's really nice being able to carry around a scope in your pocket.

Unless you do a lot of high speed IO, 25MHz covers pretty much everything (most 8-bit Micros top out at 20MHz, some go to 48-50MHz). Even the 10MHz version is fine if you were just doing audio work or slower digital stuff.

For £300 you could get a 50MHz 2 channel scope (at 0.5Gs/s). If you want 4 channels you're not going to beat the Rigol for price, but portability matters sometimes (other times being able to monitor every SPI line simultaneously is a godsend). I have a Rigol DS1104Z and a Picoscope 2205A, I've used both extensively.

Plus you get a lot of nice features in the software (which is cross platform), including serial decoding for free. Most of them have a signal generator built in too.

Wow, it also has drivers for the raspberry Pi ! https://www.picotech.com/support/topic14649.html

This pairing would make for a trully tiny all in one oscilliscope, i'm tempted to get a picoscope and a tiny LCD just for laughs: project #1

You may not want to do that. The sampling rate is very important on a scope, especially for analog signals because of Nyquist.
Hmm, I was expecting the sampling frequency to have been made independent of the USB bus, (i.e for the sampling to occur purely on the picoscope itself and data merely relayed over USB).

I don't even know what the frequency limitations of USB are I just know it's capabilities are highly dependent on the host so relying on it for precise high frequency sampling seems like a bad idea, and if that is the case for the picoscope then you are correct, I just find it a surprising design decision.

Am I wrong in thinking this? or are you referring to a different reason?

I think the idea is to use the Pi purely as a display. Picotech's scopes tend to be well specced with regard to analogue bandwidth/sampling rates - around 5x Nyquist typically.
In this particular case, it's not too surprising. PC-connected barcode scanners traditionally use a relatively-ordinary RS232 (or USB nowadays, usually with support for either depending on which cable you're using), and almost always just pretend to be ordinary keyboards. I'd be more surprised if it deviated from that at all.

I was kinda hoping that this would be someone porting Nerves to run on the barcode scanner itself; quite a few of these scanners actually have reasonably-powerful ARM cores (especially once you get into the 2D scanners).

Watch EEVblog and bigclive on YT for oscilloscope advice.
bigclive works on electric / electronic stuff, and he's sometimes a bit sniffy about cheap hobbyist kit. (Fair enough when he's talking about things you use with / on mains electricity where there's a risk of death.)

For RS232 any 'scope is going to be fine, even a chinese clone knockoff or an ancient second hand scope.

For decoding serial one of those $5 logic analyzers is more than sufficient, you don't really need an oscilloscope at all. I don't really like using protocol decoding on my scope unless I need to correlate timing with an analog signal because it's tedious to set up and use for a simple digital signal.

https://www.aliexpress.com/item/New-Arrival-USB-Logic-Analyz...

RS232 is 12V, but a couple of resistors would sort that out.

If you're a beginner I would actually recommend the Saleae Logic Analyser over this scope, unless your routinely dealing with analog or voltages over 5.5V, the Saleae is much more useful, has serial (and other) decoders built in as opposed to having to pay extra on the Rigol, has better capture and triggers plus as a bonus it doesnt have that noisy fan going all the time.

Yeah, in the article he uses a good old MAX3232, which is specifically for doing RS232 to TTL level shifting. Totally agree, the Saleae or one of the cheaper clones I linked is a better choice for most hobbyists. Scopes are indispensable for certain uses, but most Arduino/RasPi projects these days are all digital and you can do everything you need with a logic analyzer + a decent multimeter.

I use my scope just often enough that I'm glad I have it, but I sometimes also regret buying it because it's not that often that I actually need it.

It's worth noting that some of those cheap logic analyser only work with pirated versions of expensive logic analysers software.
While cheap knockoff analyzers often ship with pirated software (e.g. Saleae) many, if not most, work equally as well with the open source Sigrok software.
Saleae gives their software away for free, there's not any need to pirate it but still using their software is morally shady IMO because they put a lot of effort into it. I prefer Sigrok anyway, even with the actual Saleae analyzers.

Also worth noting that Sigrok loads the analyzer with open source firmware, you're not using any pirated code. The hardware is basically a clone of the original Saleae logic analyzer, but the Saleae hardware is just a standard reference implementation of a cheap Cypress chip so that doesn't really bother me.