Interest in very simple but usable oscilloscope?

Flenser

Senior Member
Oops. I corrected my calculations for the power rating of the resistors used with a 0.4A polyswitch. They should have been calculated using the short-circuit current and not the polyswitch trip current.

It looks like the best match would be a polyswitch with a resistance that is not too low, and the 0.2A polyswitch illustrates this. It doesn't need an additional resistor that can take 2.5A+ and, by itself, is able to both limit the short-circuit current to below 5A and cutout (eventually) if the breadboard uses more than 200mA.

It occurs to me that we could supply 0.3A to the breadboard by using two 0.3A polyswitches in series and 0.4A by using three 0.4A polyswitches in series, all without needing a resistor rated for such a high current. It would be nice to find an application note that validated this sort of approach.
 

John West

Senior Member
It sounds to me like you're intending to mean "parallel", not "series." Or am I missing something? I haven't researched the Polyswitch type of breakers as yet.
 
Last edited:

John West

Senior Member
A small "concept" rant:

As far as the design and construction of a simple scope, logic-state analyzer and Arbitrary Waveform Generator goes, perhaps an implementation that consists of a common pcb and all common circuitry, but with each of the devices added as modular implementations would be worth considering.

Code could be implemented pretty much separately and the individual modules on the circuit populated as desired. The devices would individually be quick enough then to talk to each other (i.e. the scope could read the AWG signal as it would be coming from an independent PIC circuit read by another independent PIC circuit as per Wolfgang's most recent plans,) yet the overall cost of the bd and box and on/off switch, circuit breaker, USB comm, etc, would be common to all three incorporated circuits and reduce the overall cost of this multipurpose test device.

IOW, implement the three test equipment devices in one box, as individually as necessary or convenient, but try to share common components that would otherwise have to be duplicated if the gear were designed and built as entirely separate devices.

I suggest this because it is quite clear that each of these devices would be a welcome addition to most any picaxer's workbench, so I would expect them to want all three functions sooner or later as time, and funds permit. Having all three devices in one box would save construction cost and space, and the combination of all three would still be quite small if they were all incorporated into a single package.

Yet it would still reduce and simplify both the hardware and software design requirements compared to either a fully integrated piece of all-in-one test gear, or two or three independent pieces of gear.
___
To me, this sounds like the ideal picaxe test tool. It is in a size and price range compatible with picaxe hobbyist's projects, runs at picaxe data rates, and looks at picaxe level analog signals with picaxe appropriate accuracy and resolution. Hard to beat.

Having said this, it's all up to whatever Wolfgang decides and has the time to implement. It's his baby, and I for one, expect I'll be pleased with whatever he comes up with.
 
Last edited:

womai

Senior Member
All very valid ideas, and indeed this was where I was drifting with the 18F2550 based design. I deliberately pulled back from there a bit because of two concerns

- trying to create an "eierlegende Wollmilchsau" as we say in German (literally translated something like "egg-laying wool milk sow", meaning that something that is - unrealistically in most cases - intended to to everything at the same time) will end up with a thing that becomes much more expensive and certainly more complex than originally intended. That could easily scare off a good part of the intended audience.

- more importantly, the chance of me finishing all these different functions - especially firmware and PC software - in reasonable time would have become quite remote. And a good concept that does not get implemented in real hard- and software does not help anybody.

- finally, there is a certain chance that trying to put in a signal generator/AWG as well as a scope/logic analyzer in a single microcontroller may end up being two deficient sets of instruments in one box due to resource and/or computing power limititations.

On the other hand, I am quite confident that either the AWG/pattern generator or the scope/logic analyzer will see the light of day rather sooner than later since it's a much closer goal, and will have reasonable performance without too many tradeoffs. Better get one simple instrument out the door, with good performance. Also a bit psychology at work here - which as a hobby cyclist / swimmer / runner I know quite well - if the finish line looks closer, it's easier to put in the extra bit of effort!

Wolfgang
 

Flenser

Senior Member
Womai,

This from the bus pirate logic analyzer page:
"Jack Gassett at the Gadget Factory has a version compiled from the latest source code http://www.gadgetfactory.net/gf/project/lax/frs/?action=FrsReleaseBrowse&frs_package_id=1. He also has a Windows compile of SUMP http://www.gadgetfactory.net/gf/project/lax/frs/?action=FrsReleaseBrowse&frs_package_id=1 for his ButterFly Platform that doesn’t require you to install Java".

That "Butterfly Platform" is a FPGA board they sell and looking around the GadgetFactory site it's since been renamed to Papilio or Papilio_One.

I downladed the most recent file at that link Papilio_One_Logic_Analyzer_QuickStart_2.12.zip dated 2011-02-04 and unziped it. It appears to be both the Linux & Windows versions together. I unzipped the whole lot, ran the windows BP_LogicAnalyzer.exe from that directory and Sump has started up without issue. Click the menu Device->Capture and you get to the dialog box asking you to select the COM port and baud rate that the sampling hardware is connected to.
 

John West

Senior Member
Womai, I see I wasn't clear enough about what I was suggesting. My suggestion was simply to house all three devices in a common box, with a common cable and power switch and PCB in order to keep down total cost. I expected there would be at least two independent PICs involved.

This could then be a bite-sized multi-step project, as opposed to that all-inclusive eierlegende Wollmilchsau you described, with each function being designed and implemented as time permitted, but housed in a single box. If a common PCB proved too time consuming to design up front, then it could be implemented as two (or three) different pcbs in the box as time permitted. I'm just adverse to the idea of multiple pieces of test equipment to handle, using duplicate cables, switches, fuses, etc, as the cost of those items starts adding up.

But again, this is just a thought. It's your project, and only you can decide on the optimum configuration that you're up to dealing with, especially at tax time. I'd be happy just to see the little scope come to life.
 

womai

Senior Member
John,

one possibility could be to do the scope first, and use a spare pin to download waveform data to the AWG/pattern generator. I.e. PC sends data to the scope, scope forwards it to the AWG. Power can come from the scope as well since I plan to break out the USB power supply anyway. That would go at least half to in the direction you suggested.

The again, right now the scope layout is done in a way that makes the box optional anyway (e.g. all connectors are solidly mounted onto the PCB, no firm need to have them mounted onto the front/back paned.

Housing two boards in the current enclosure (Serpac A-21) could make it pretty crowded, but I'll see what I can do. Maybe add space for an "extension connector" somewhere on the board, unstuffed unless one does add the additional PCB. A bit similar to the Arduino shields. Or just use the logic analyzer pins for that purpose.

Everybody, just keep the suggestions coming. I'm not promising I will/can implement everything that gets suggested, but I will certainly take it into good consideration.

Wolfgang
 

womai

Senior Member
Thinking a bit more about it, having the AWG as an extension board to the scope would help in one more aspect. The AWG needs a pretty high sample rate since I need to oversample sufficiently for a decent waveform output. Unfortunately this clashes with the need to poll the USB connection in regular intervals, which takes a few microseconds every time.

I already put together some demo code (on the 18F2550) where the USB polling is done in the main loop and the sampling output is done in a time interrupt (to assure perfectly regular timing of the samples), but the best I could push that was ~300 kSamples/sec. Doesn't help that the timer interrupt adds additional overhead. With the necessary oversampling that will limit output to ~30-50 kHz bandwidth (less for non-sinusoidal signals) - waveform fidelity and maximum bandwidth being mutual tradeoffs.

With the "extension to scope" concept though there is no need for the AWG to be USB capable since it gets normal serial data from the scope. I can then turn things around, run the sampling in the main loop at max. speed (I got ~700 kSamples/sec on an 18F series PIC!) and process the serial input data in an interrupt (no need for polling there, and it is acceptable to interrupt the regular output when new data gets downloaded). Can use the cheapest 18F series device available since it does not need to have a USB port. Or could use a 24F or dsPIC30F chip instead which would get ~2-3 MSamples/sec according to tests I have run in the past.

Wolfgang
 

John West

Senior Member
I see from your comments that with multiple devices the communication with the PC is far more complex than I'd considered. But it sounds like you might be coming up with reasonable ways to implement a semi-integrated suite of test equipment in a single package. That's a lot of juggling. If you're up to it, go for it, or go with discrete devices if that's the best way to get the project done.

Your ability to work out such interactions is well beyond mine, so I'll just sit back and watch, and kibitz when I can't help myself. :)
 

graynomad

Senior Member
Yes by offloading the AWG function to another chip it can run a nice tight loop with no glitches. Occasionally the "master" will interrupt and cause a disturbance, but presumably this will only happen in order to load a new parameter and/or waveform in which case it doesn't matter.
 

womai

Senior Member
It's alive! Just managed to get the Pickit 2 to program my device and to establish USB communication with the latter (device is set up as a HID). I can now send and receive data packets between my VB6 program on the PC and the microcontroller. That's one giant step ahead.

Of course that was after I discovered I must have somehow turned off the x4 PLL when playing with the code last week, and after realizing that connecting the VUSB pin to the 5V supply means trouble (is supposed to be at 3.3V, which the PIC can generate internally). But who reads the user manual first??? (there is a jumper od the dev board to break that connection, but factory default is "connected" - thanks Microchip! ;)

Also reassuring to see the the compiler I use (Mikroelektronika MikroC) produces HEX files that work with the Pickit, so I won't need to convert all my existing code to Microchip's C18. Saves me weeks.
 

Flenser

Senior Member
Womai,

Some more info on using the Sump Logic Analyzer client.

The people on Dangerous Prototypes have done a fork of the original Sump client to "Jawi's Logic Sniffer client software", which is being actively developed.
Forum pages:
http://dangerousprototypes.com/forum/viewforum.php?f=57&sid=f40106391956f8257e01a8ec5ba41f93
and
http://dangerousprototypes.com/forum/viewtopic.php?f=57&t=1198

And downloads from here:
http://ols.lxtreme.nl/

This alternative Sump client has some really nice extra goodies. Plugins that decode UART, 1-wire, SPI, I2C, JTAG plus a couple of other generic measure and State analyzers. The download link above has a screen capture showing the decode output for one of these protocols.

Another of the DangerousPrototypes.com projects is the PIC18-based "USB IR Toy" which includes a logic analyzer mode using the Sump client:
http://dangerousprototypes.com/docs/USB_IR_Toy:_SUMP_logic_analyzer_mode

The logic analyzer mode for their USB IR toy is able to take advantage of the Sump client using just the following 3 Sump commands:
0×00 – Reset, return to RC decoder mode (all modes)
0×01 – SUMP run (captures and sends data to SUMP logic analyzer client)
0×02 – SUMP ID (responds: 1ALS )
It triggers on the start of a received command (so it ignores the trigger commands from Sump) and uses a fixed rate of 10kHz for sampling the decoded IR signal (so it ignores the sampling rate commands from Sump)

Based on this I did a little test program to drive the Sump clients (the attached sump.txt in C for the AVR attiny2313 because that was the quickest for me). It's only intended so see if the downloaded software works, and both clients do! The matching output in sump.jpg is using the alternate "Logic Sniffer" client.
 

Attachments

womai

Senior Member
Got USB working.
Got ADC working.
Got internal voltage reference working (to calibrate out USB supply variations).
Got PWM working (to generate trigger threshold).
Got time interrupts working (for real-time sampling).

Still need to get comparator setup & interrupts done. After that it's a question of putting it all together and work on the PC software (which will be a derivative of the DPScope software, which means there should be a lot of functionality right away, including FFT and automated measurements, with relatively little coding effort).

Had a closer look at Sump. Unfortunately it expects communication through a (virtual or real) serial port, while my scope will be a HID (human interface device), so not compatible. Also looking into the PICkit2 logic analyzer software, which is pretty close in functionality to what I think my scope will be able to do hardware-wise.

Wolfgang
 

lbenson

Senior Member
All I want for Christmas ...

This project seems to have stalled. Is there any likelihood that it will be completed? I'm sure the interest is there. I'd like to have one.

I do understand that a lot of effort is required to carry something like this over the finish line, and life has competing calls on one's time.
 

womai

Senior Member
Stalled, probably :) Abandoned - not at all. To give an excuse, I recently moved with my family from the US back to Europe (Germany to be exact), as you can probably imagine the related effort kills any hobby side projects for a few months. But now we are more or less settled in, and the DPScope SE is the next big thing on my evening to-do list. It's actually already set up on my work bench (finally enough space in the home for a real electronics workbench, yohoo!). John West gave me a ton of improvement suggestions on the software already (he's the official alpha-tester :) so I'll do that first and then work on datalogger mode and logic analyzer mode.

Wolfgang

P.S.: Christmas is "maybe" a bit early to hope for it to be finished - but the holidays will be a good time to tinker on this project!
 

womai

Senior Member
>>So where abouts did you move to?

Regensburg, a beautiful mid-sized city about 1 hr north-east from Munich. Not even a car needed to get around, doing all by bike, bus or walking. What a change from the L.A. area!
 
Top