Picaxe based doal-channel oscilloscope

womai

Senior Member
Sorry for the cross post - but there was considerable interest in this topic and I think this board gets more views than the "miscellaneous projects" one.

I have put a website with the full scope design online. A few "details" are still missing at the moment, most importantly the bill of materials and a description of the PC software. But overall I think it should enable anybody to build his/her own. I thought I enable early access and get some feedback as to what should be improved.

Have a look and let me know what you think:

http://www.pdamusician.com/lcscope/

Wolfgang
 
Great! Thank you for sharing

I downloaded the schematic and the basic program. From the schematic I copied the BOM to a Word file and I am looking for the components. As soon as the PCBs are ready I WANT ONE. Just tell me how much and where to send the money.
 

womai

Senior Member
Hi Marmitas,

thanks for your interest! I have a few bare boards available right now, but I want to respect the board policy regarding commercial posts - so email me to the contact address on the scope webpage and I let you know the details.

At the same time, I can help you with the BOM - I have an almost complete BOM with part numbers for Jameco I can send to you, that can save you some time.

Wolfgang
 

womai

Senior Member
I put the bill of material onto the website (go to Design --> Download). It has the part numbers for Jameco - sorry for anybody not in the US, you'll probably have to find a different source to avoid excessive shipping costs. (but the Jameco site at least has data sheets for each component so finding equivalent replacements should be very doable).

http://www.pdamusician.com/lcscope/

Wolfgang
 

Dippy

Moderator
Nice.
Which size resistors are you using on your board layout?
The 'traditional' 0.25/0.4W ones 7-ish mm body, or the smaller 0.125W 3.5-ish mm body?
 

Andrew Cowan

Senior Member
Wolfgang

On my scope, I added a 3mm bolt through the 7805 and board to act as a heatsink. I found that when stepping down from 12V, the heatsink was getting rather hot after a while.

Andrew
 

Andrew Cowan

Senior Member
I bought a leftover prototype unit Wolfgang had for about £40. It is a great piece of kit - it is just as good as a £180 'normal' scope one of my friends has.

Andrew
 

womai

Senior Member
Dippy, I am using 0.25W resistors. At least for my large fingers those feel more comfortable to handle (less fragile), and I want to keep it simple to assemble even for beginners.

Andrew, good info on the 7805. So far I always used a 9V supply and did not observe any excessive heating (the scope draws around 170mA), but now I am glad that out of caution I added those screw holes "just in case".

As far as cost, my estimate is that one can build the full version for about US$80 worth of parts if one really has to buy every single piece (as I said, I sold those prototypes at cost). This includes enclosure, power supply, download cable, two coaxial probe cables (BNC on one side and grabbers on the other). Of course your mileage may vary:

On the downside, many components like the 74xx logic gates often have minimum orders (e.g. increments of 10) when you only need one or two, unless you go to Radio Shack and pay an excessive amount for a single one. Also the printed circuit board is expensive as a one-off, that's why I am offering them right away - that way if demand justifies I can have a larger batch made (50+ makes sense price-wise) and then offer them for sale pretty much at cost.

On the upside, many people will have at least some of the components lying around already - power supply, IC sockets, Picaxe download cable etc., so with a little scrounging you may be able to put a scope together for much less. As I said in the past, the whole idea was to create something that's simple and inexpensive to build (while having sufficient performance to be really usable), for people who can't afford one of the "real" scopes that cost $300 and above.

Wolfgang
 
Last edited:

212

Senior Member
Just so you know, I have been waiting patiently for these to be available, and I'm sure lots of others are as well. Thank you very much for doing this :)
 

womai

Senior Member
The easiest (and cheapest!) is to get them as free samples from Maxim (http://www.maxim-ic.com). Digikey has the MAX153 but wants a fortune for them.

For the I/O Expander MAX6956 as an alternative you can also use the MAX7300 without any changes to the circuit.

Wolfgang

P.S.: Don't try www.maxim.com if you want electronic components - that's a site with a different topic :)
 

alexthefox

Senior Member
The easiest (and cheapest!) is to get them as free samples from Maxim (http://www.maxim-ic.com). Digikey has the MAX153 but wants a fortune for them.

For the I/O Expander MAX6956 as an alternative you can also use the MAX7300 without any changes to the circuit.

Wolfgang

P.S.: Don't try www.maxim.com if you want electronic components - that's a site with a different topic :)
ok, i know this way from your part list....
but, if i want to buy from some internet shop, where can i find? by direct to maxim, it's little proibitive, they ask me $50 to ship 4 ic to italy!!!!!!
 
Alex,
I just ordered the samples from Maxim and Microchip. I expect to have some extra units. As soon as they arrieve I'll let you know what I have available to give you. I will be glad to share what I have.
Andres
 

alexthefox

Senior Member
Alex,
I just ordered the samples from Maxim and Microchip. I expect to have some extra units. As soon as they arrieve I'll let you know what I have available to give you. I will be glad to share what I have.
Andres
thank you, i appreciate your think. i need only maxim. i can find easy rest of the components. thank you again
 

nbw

Senior Member
That looks one cool piece of kit! I have 2 questions - the expensive scopes one can buy are 10, 20, 40+ MHz - this one goes a bit slower - about 1MHz? Not being too knowledgeable in scopes, will this much lower frequency affect the quality / accuracy of the readings. Similarly for the 7-frames per second update - do you find that's enough? I've only had a brief play with an old 5MHz scope, and it updated many times a second which I found quite useful.

Finally, I had an idea which you may have considered / discarded but it occurred to me: could you draw power (instead of a wallwart) from the USB port? Some ports can handle up to 500mA at 5V. I'm not sure if the circuit needs 9V for a voltage regulator or similar - circuits I've made using the PC's USB line are very nicely regulated to 5V.

Anyway - great work!!
 

alexthefox

Senior Member
i finish to assembly oscilloscope, and when i go to programming picaxe i keep this error:

serxd requires timeout - use [65535,SAME_LINE] as timeout value (firmware >=vA.3)
Error: command not supported in this mode!the ardware connected to the computer is:
PICAXE-28X1 vA.2


what i can do?
thk
 

BeanieBots

Moderator
Sorry, just re-read your post.
According to the error message, your firmware A.2 does not support the command.
Hopefully technical will respond because I'm quite sure the serin timeout is supported by all versions of 28X1 firmware.
 

alexthefox

Senior Member
Sorry, just re-read your post.
According to the error message, your firmware A.2 does not support the command.
Hopefully technical will respond because I'm quite sure the serin timeout is supported by all versions of 28X1 firmware.
ok thankyou, so:
can any technical help me?
 

hippy

Technical Support
Staff member
Looking at the error message ...

serxd requires timeout - use [65535,SAME_LINE] as timeout value (firmware >=vA.3)
Error: command not supported in this mode!the ardware connected to the computer is:
PICAXE-28X1 vA.2


The "use [65535,SAME_LINE] as timeout value" is the fix, so change ...

SERRXD ...

to

thisline: SERRXD [ 65535,thisline ] ...

or similar ( I didn't check the manual for syntax ).

The "firmware >=vA.3" is a bit confusing but in the context that you have firmware A.2 I would interpret that as saying, "but it will work without needing to make this change if you have firmware A.3 or later".

Earlier versions of the Programming Editor may have let the command through without complaint but that doesn't mean it worked as expected.
 

alexthefox

Senior Member
Looking at the error message ...

serxd requires timeout - use [65535,SAME_LINE] as timeout value (firmware >=vA.3)
Error: command not supported in this mode!the ardware connected to the computer is:
PICAXE-28X1 vA.2


The "use [65535,SAME_LINE] as timeout value" is the fix, so change ...

SERRXD ...

to

thisline: SERRXD [ 65535,thisline ] ...

or similar ( I didn't check the manual for syntax ).

The "firmware >=vA.3" is a bit confusing but in the context that you have firmware A.2 I would interpret that as saying, "but it will work without needing to make this change if you have firmware A.3 or later".

Earlier versions of the Programming Editor may have let the command through without complaint but that doesn't mean it worked as expected.
original line:
serrxd b_command, b_param1, b_param2

so i must change with:

thline: serrxd [65535,thline],b_command, b_param1, b_param2
 

womai

Senior Member
As to nbw's questions:

That looks one cool piece of kit! I have 2 questions - the expensive scopes one can buy are 10, 20, 40+ MHz - this one goes a bit slower - about 1MHz? Not being too knowledgeable in scopes, will this much lower frequency affect the quality / accuracy of the readings. Similarly for the 7-frames per second update - do you find that's enough? I've only had a brief play with an old 5MHz scope, and it updated many times a second which I found quite useful.

Finally, I had an idea which you may have considered / discarded but it occurred to me: could you draw power (instead of a wallwart) from the USB port? Some ports can handle up to 500mA at 5V. I'm not sure if the circuit needs 9V for a voltage regulator or similar - circuits I've made using the PC's USB line are very nicely regulated to 5V.
First, you need to distinguish between analog bandwidth and sample rate (the latter determines the so-called digital bandwidth). The analog bandwidth tells you how fast a change makes it all the way to the analog-to-digital converter (ADC). But you also need to sample the signal often enough, otherwise the highest analog bandwidth will not help. With sophisticated interpolation (sin(x)/x), sampling about 2 - 3 times per period is sufficient for a sine wave. With the simpler linear interpolation ("connect the dots"), you need about 6 - 10 samples per period. My scope design samples at up to 1 million times per second, meaning you can look at signals up to approx. 1000000/7 = 150 kHz. The analog bandwidth of the input amplifier stage is around 400 kHz, so it is really the digital sample rate that limits performance here. Those considerations are the same for higher-end scopes, e.g. typical PC based scopes offer around 50 MHz sample rate, so with linear interpolation that is usable for signals up to 5 - 7 MHz.

As long as your signals are slower than that, a lower sample rate has no effect on the accuracy or quality of the reading. The current design works nicely for everything in the audio range (DC - 20 KHz) and quite a bit above.

The screen update rate is mostly a measure of how "responsive" the scope behaves, e.g. when looking at a rapidly changing waveform. Faster is better here, up to a limit of approx. 25 frames per second (your eye can't discern any faster changes than that). The main limitation here is the processing speed of the Picaxe as well as the maximum data rate of the serial connection of the PC (19200 baud for the Picaxe). I spent quite some time optimizing the scope firmware for speed. At the moment both limitations are virtually identical (meaning the Picaxe processes the samples as fast as they can be sent) so making one faster and not the other would not make sense. I am eagerly waiting for the Picaxe 28X2 to become available because when clocked at 32 MHz it should roughly double the frame rate.

I also played with the idea to supply the scope from the USB port. Two things kept me from doing that so far - first, afaik the +5V are not fed out from the USB-to-serial converter. Second, the circuit uses the 5V supply as its voltage reference for the ADC converter, so any noise or inaccuracy in that supply would show up directly in the scope waveforms. That's a big concern especially for smaller signals, the scope can go down to 20mV/div so you would see anything above maybe 1mV noise or so. Supplies coming from digital circuits (especially a computer) tend to be quite "dirty". Right now - using separate voltage regulators for analog and digital section of the scope, respectively, the curve is almost perfectly noise-free even in the most sensitive range settings. So as you assumed, I need something higher than 5V to be able to regulate it down to clean 5V. Of course I could add a step-up switching converter and then a linear regulator, but doing so again risks introducing noise (switching converters need good shielding) and would add cost & complexity.

Wolfgang
 
Last edited:

womai

Senior Member
to alexthefox:

I am not sure where your particular line of code ("serxd") comes from. I just checked the scope firmware code I put on the scope website, and that particular line reads:

Code:
serrxd b_command, b_param1, b_param2
As mentioned by others, make sure you select the Picaxe 28X1 in the download options. Also make sure you move the jumper on the scope board to the DL ("Download") position when you try to download the firmware. After that, move it back into the TX ("Transmit") position. This is explained in detail and with a picture here:

http://www.pdamusician.com/lcscope/build_it_11.html

Good luck!

Wolfgang
 

womai

Senior Member
To alexthefox: I just checked the Picaxe 28X1 in my own scope prototypes - says Picaxe 28X1 Firmware A.2, so the same as you have.

Wolfgang
 

alexthefox

Senior Member
To alexthefox: I just checked the Picaxe 28X1 in my own scope prototypes - says Picaxe 28X1 Firmware A.2, so the same as you have.

Wolfgang
but you dont get the same error of mine?
i have:
last sw version.
i set 28x1 chip
get the error. i try with 2 dfferent 28x1 chip with same firmware...
 

womai

Senior Member
No, I don't get this error. Actually I just downloaded the firmware into one of my prototypes two days ago (and both the download as well as subsequent scope operation works fine), and it most definitely does not have any timeout in the serrxd parameters.

Wolfgang
 
Top