author
12Instructables60,488Views78CommentsJoined November 18th, 2016

Tell us about yourself!

Complete Your Profile

Achievements

10K+ Views Earned a bronze medal
  • Oscilloscope in a Matchbox - Arduino

    Yes please do. What a great idea. It never occurred to me to make a shield - I've never owned an Uno.Did you add the AD9833 module? (Step 13.) I think the AD9833 is a good chip and a signal generator is well worth having but I'm not sure that it's ideal to have it built into the oscilloscope. Separate may be better.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer13 days ago
    Transistor Curve Tracer

    If you send me the code and the circuit diagram, I'll make a new "Step" for your improvements to the project. Your description here is OK but would be difficult for a beginner to follow I think.

    I think you had a previous version which used arduino but a better op-amp, etc.Would it be better to publish your arduino version?I couldn't write an instructable for the STM32F103/MapleMini.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer15 days ago
    Transistor Curve Tracer

    > I had some weeks holidays ... and time to think about it.I hope you had a good time. Where did you go?> It's a little bit slow with the graphic, You mean the menu pages? Yes, I think that's that's about as fast as an ATMega328 and SPI will do it.Of course, it's slow to draw the graphs because the "open collector op-amps" have so much feedback they're very slow and the s/w waits ages for them to settle.> for instance a diode> It would be nice to scale it more flexible.True.> -- the ATMega328 has only ADCs with 10 bit resolution.Yes but when you look at the noise in the signals we're measuring and the resolution of the display, it's not worth having much more.> You can see a demo of the Curve-Tracer with MapleMini here:That looks very good. Not much noise and...

    see more »

    > I had some weeks holidays ... and time to think about it.I hope you had a good time. Where did you go?> It's a little bit slow with the graphic, You mean the menu pages? Yes, I think that's that's about as fast as an ATMega328 and SPI will do it.Of course, it's slow to draw the graphs because the "open collector op-amps" have so much feedback they're very slow and the s/w waits ages for them to settle.> for instance a diode> It would be nice to scale it more flexible.True.> -- the ATMega328 has only ADCs with 10 bit resolution.Yes but when you look at the noise in the signals we're measuring and the resolution of the display, it's not worth having much more.> You can see a demo of the Curve-Tracer with MapleMini here:That looks very good. Not much noise and much faster. Why do the lines drop a little at the end?> Therefore I tried to migrate the SW from ATmgA328/NANO to STM32F103 MapleMini.Could you write an instrucable?Which op-amp did you use?Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer17 days ago
    Transistor Curve Tracer

    Imagine The NPN DUT collector and emitter are connected. The collector of Q3 is connected to 12V and Q3 is turned partially on so that its emitter is at 6V. That's the "worst case". R37 is 100 ohms. So the current is 6/100 = 60mA and the power in the transistor is 60*6 = 360mW. The maximum power of a BC847 is 250mW. Its max current is 100mA - which is OK but, in theory, it can't dissipate that much heat. In practice that's 360mW max but the average power is much less as it's not on all the time. Also the DUT collector and emitter are not connected - it's dissipating some power too.So I think you'll be OK using a BC847.I'm surprised you can't get BC639 SOT-23. I was sure I'd bought them in the past. I'll have to find a new "favourite transistor".Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    HiThat's great. I'm glad it worked for you.> access to a decent electronics lab with a signal generator and real oscilloscope to play with.Did you add the AD9833 (Step 13)? I found it is a good chip with reliable timing and amplitude.> Is there a hard requirement for D6 to be at +0.55V?The frequency counter either counts the number of rising edges in one second or measure the time from one rising edge to the next. I think D6 must be connected to +0.55V otherwise the comparator + input will be floating.So without D6 connected, the "Logic" mode of the frequency counter will work but the "AC (period)" mode won't. (Or maybe the floating D6 will mean it works sometimes but not reliably.)I've been finding that the "AC (period)" mode isn't as good as I'd lik...

    see more »

    HiThat's great. I'm glad it worked for you.> access to a decent electronics lab with a signal generator and real oscilloscope to play with.Did you add the AD9833 (Step 13)? I found it is a good chip with reliable timing and amplitude.> Is there a hard requirement for D6 to be at +0.55V?The frequency counter either counts the number of rising edges in one second or measure the time from one rising edge to the next. I think D6 must be connected to +0.55V otherwise the comparator + input will be floating.So without D6 connected, the "Logic" mode of the frequency counter will work but the "AC (period)" mode won't. (Or maybe the floating D6 will mean it works sometimes but not reliably.)I've been finding that the "AC (period)" mode isn't as good as I'd like because the comparator has no hyteresis so if there is noise, you get multiple triggers.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer20 days ago
    Transistor Curve Tracer

    Slew rate doesn't matter because we're measuring the DC characteristics of the transistor - you wait a few mS for everything to settle befor taking a reading. Rail-to-rail output is very convenient as it makes it possible to measure the transistor with Vbe and Vce close to zero. If you don't have rail-to-rail output then you have to find someother way of, say, offsetting the emitter voltage.The L1632 says it has "Large Output Drive Current" but the data sheet says 35-40mA. That's OK for small signal transistors but rather low for power transistors.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer22 days ago
    Transistor Curve Tracer

    Let's say you're using the L2722 to control the base of a transistor. According to the data sheet, the output of the L2722 can get to within 100mV of the 0V line which is good (I think that's what the data sheet says). But it can only get to within 0.5V of the 12V line. So if you're testing a germanium PNP then you might not be able to fully turn off the transistor. In reality, that might not be important but it's worth testing. If it turns out to be a problem then maybe there's some way of setting the emitter of the PNP to 0.5V below the 12V power line - say with a diode. Or maybe you could put a diode in the connection between the output of the L2722 and the base of the PNP so the base is 0.5V above the output of the L2722. The drop across a diode is very non-linear of course so you'd...

    see more »

    Let's say you're using the L2722 to control the base of a transistor. According to the data sheet, the output of the L2722 can get to within 100mV of the 0V line which is good (I think that's what the data sheet says). But it can only get to within 0.5V of the 12V line. So if you're testing a germanium PNP then you might not be able to fully turn off the transistor. In reality, that might not be important but it's worth testing. If it turns out to be a problem then maybe there's some way of setting the emitter of the PNP to 0.5V below the 12V power line - say with a diode. Or maybe you could put a diode in the connection between the output of the L2722 and the base of the PNP so the base is 0.5V above the output of the L2722. The drop across a diode is very non-linear of course so you'd have to have some way of drawing a current through the diode. Or maybe the 0.5V will not be important.I was unhappy with my "open collector" op-amp design but it did allow the base voltage of a PNP to get very close to the 12V line.> What the dividers 47k/33k on A inputs? Just choose whatever gives you the voltage swing you need. The values are specified in the Ardiono sketch.Good luck.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer4 weeks ago
    Transistor Curve Tracer

    My thought is that for bipolar and MOSFET transistors the answer is no, not really. With the curve for collector current vs voltage, you'd get more points on the x-axis but I think it has enough points already.When setting the steps for base current, you could have lots more steps or they could be more finely specified but step size isn't a problem.The real problem with the graphs is noise - I take several readings and average them. I don't know where the noise comes from. I presume it's digital interference from the power. More bits in the DACs wouldn't help.With JFETs, you use the DACs to adjust Vgs and smaller steps might help (i.e. more DAC bits). But once again, the actual problem is noise. With JFETs, noise is particularly bad because noise in Vgs gets amplified by the FET.The bes...

    see more »

    My thought is that for bipolar and MOSFET transistors the answer is no, not really. With the curve for collector current vs voltage, you'd get more points on the x-axis but I think it has enough points already.When setting the steps for base current, you could have lots more steps or they could be more finely specified but step size isn't a problem.The real problem with the graphs is noise - I take several readings and average them. I don't know where the noise comes from. I presume it's digital interference from the power. More bits in the DACs wouldn't help.With JFETs, you use the DACs to adjust Vgs and smaller steps might help (i.e. more DAC bits). But once again, the actual problem is noise. With JFETs, noise is particularly bad because noise in Vgs gets amplified by the FET.The best way to improve the circuit is to use the TCA0372 as discussed by mausi_mick below.Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    Nice idea. Have you tried it and examined the quality of the resulting data?Peter

    View Instructable »
  • Peter Balch's instructable Signal Generator AD9833's weekly stats: 6 weeks ago
    • Signal Generator AD9833
      170 views
      2 favorites
      0 comments
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer7 weeks ago
    Transistor Curve Tracer

    The Photon Particle has enough (12-bit) ADC pins and digital pins and it has hardware SPI so it should do the job as well as an Arduino does. The software will be different, of course. I think the Photon Particle has only one DAC pin but the curve tracer needs two so you'd still need a separate DAC chip.

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    I have added a new step - Step 13 - which describes how to add a signal generator. I have also updated the INO to improve the frequency counter.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer7 weeks ago
    Transistor Curve Tracer

    Search eBay for ILI9341(not IL9341) or for "2.8 LCD TFT". The cheapest I found was £3.70 from Hong Kong.If you're thinking of building one, look at mausi_mick's comments below. He reckons the TCA0372 is better than the "open-collector op-amp" design I used.Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    I'm new to Atmels (25 years with PICs) so it's all a bit of a mystery to me.> free-running mode ... just using a loop to read the ADC at the relevant interval, That's a really nice idea. I wish I'd done that. Not sure it's advantageous to change now though.> 500nS if pre-scaler = 4 (so probably is long enough). OK. But that means that "unable to fill the capacitor" is even less of an explaination of the roll-off above 20kHz.Any thoughts?Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    Hi AndrewThank you for your interesting comments.It's certainly the case that it's poor quality at high sample rates. I keep telling people that it's just a vague indication of the signal and they should buy a "proper" oscilloscope.> when you're running at 1 sample per microsecond you'll have 4 consecutive identical samples every time.I checked and yes, you're right. Darn it.I'd been running the 1MHz code with a prescaler of 1 and it needed a lot of smoothing. At prescaler = 1, the buffer values come in identical pairs.When I changed the prescaler to 2 I forgot to take the smoothing out and it looked really good. So I didn't notice the identical readings. > you can't read ADCH early and get a partially converted value;Yes, you're right. I'd thought I understood how the A...

    see more »

    Hi AndrewThank you for your interesting comments.It's certainly the case that it's poor quality at high sample rates. I keep telling people that it's just a vague indication of the signal and they should buy a "proper" oscilloscope.> when you're running at 1 sample per microsecond you'll have 4 consecutive identical samples every time.I checked and yes, you're right. Darn it.I'd been running the 1MHz code with a prescaler of 1 and it needed a lot of smoothing. At prescaler = 1, the buffer values come in identical pairs.When I changed the prescaler to 2 I forgot to take the smoothing out and it looked really good. So I didn't notice the identical readings. > you can't read ADCH early and get a partially converted value;Yes, you're right. I'd thought I understood how the ADC worked but clearly I didn't.The next slower sample rate that the program uses is 4 times slower so it can (and does) manage one conversion per sample.> it only gives 250 nanoseconds for the sample and hold capacitor to settle which isn't really enoughSettle from what? I don't think the capacitor is altered by the ADC conversion is it? And we're not changing channels. What you're saying is that the capacitor may not be able to follow the input voltage as closely as one would like. It will act as a low-pass filter - which may be no bad thing. The cut-off frequency will depend on the output impedance of the signal you're measuring.I think the capacitance is 14pF. Assume a signal impedance of 10k. And maybe assume that because the cap is only connected to the signal for 1/4 of the time, the cut-off freq is 1/8th (?). I reckon that's a low pass cut-off of 142kHz. I can see a 50kHz sine wave but it's a quarter the size of a 10kHz wave so clearly the cut-off freq is lower. Hmmm.> At pre-scaler values of 8 and above, it should be possible to use free-running modeI can't remember why I didn't like free-running mode. Maybe it was because I had to use interrupts and the overhead was far too long.I think I'll leave the 1MHz mode in but change the instructable to warn people about the sampling. 1MHz is good in Logic mode.I'll emphasize that the analogue input is OK for audio up to 20kHz but the Logic mode works well up to 200kHz (I've just tried it).Thank you for your input.Peter

    Is it a difference in the Windows version? If you're able to program the Arduino on the "bad" computer then the COM port must be working. My program must be doing something different.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    I have tried it without any Arduino connected and just get "Error opening COM port" errors.The way that version of the exe works is that it attempts to send a 'z' command to the Arduino. If that fails (e.g. because the COM port does not exist) then it closes the COM port and stops trying to send any more commands until you select another COM port. If it succeeds in sending the 'z' command then it does so again every 100msec.I've uploaded (to step 2) a new version that waits 3 sec if it doesn't receive a buffer. That should allow you to clear any messages.If you have no Arduino connected then the exe should give you an error - "Specified com port doesn't exist" from the driver software or "Error opening COM port" from my exe. I don't understand why it's givi...

    see more »

    I have tried it without any Arduino connected and just get "Error opening COM port" errors.The way that version of the exe works is that it attempts to send a 'z' command to the Arduino. If that fails (e.g. because the COM port does not exist) then it closes the COM port and stops trying to send any more commands until you select another COM port. If it succeeds in sending the 'z' command then it does so again every 100msec.I've uploaded (to step 2) a new version that waits 3 sec if it doesn't receive a buffer. That should allow you to clear any messages.If you have no Arduino connected then the exe should give you an error - "Specified com port doesn't exist" from the driver software or "Error opening COM port" from my exe. I don't understand why it's giving a "Range check error" - that suggests the COM port is open and has sent bad data to my exe.Are you using the right COM port (at 115200 baud)? Close my exe if it's running then click on the 'Serial Monitor' button in the Arduino IDE (at the top right). That will display the COM number in the caption bar and reset the Arduino. The Arduino should reply with "@ArdOsc ready". Type z into the editbox at the top and click the Send button. The Arduino should send a buffer of ADC data. Does that work?The commands a, b, c, d, e, f, g and j, k, l, m, n are the same as clicking one of the "x-time" or "y-gain" buttons. Type one of them into the editbox - the Arduino should reply with "@". If all seems well, close the Arduino IDE Serial Monitor window and open my exe. When you've cleared any error messages, click Options|Debug then click Options|Comms. You can see what is being sent and received. Is the COM port correct (bottom left)? Click the mouse in the left hand pane of sent data. Type z. A buffer of data should be recieved (right pane). Type one of a to g or j to m. The Arduino should reply with "@". If all seems well, uncheck Options|Debug (but leave the Comms window open). The program should now run continuously. Watch the data in Comms window. What's going wrong?Thanks, Peter

    Sorry I hadn't uploaded it to the right place. It should be visible now. The date of the exe should be 10 Oct.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    Hi NicoI've only just received your message and I'm busy most of the day. I'll try to check it out this evening. It's very odd that changing the signal produces errors.Peter

    I can't get it give the error you report. The exe was having trouble opening the COM port: the correct port wasn't being listed as an option.I've uploaded a new version of the exe to fix the port problem but it probably won't fix the "Range check error". Download the new version from Step 2 - it should be dated 9 Oct 2018.Can you give me any more clues on how to reproduce the error?Thanks,Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer2 months ago
    Transistor Curve Tracer

    Yes. Any Arduino using an ATMEGA328P 16MHz 5Vshould be fine. I've only tried the Pro Mini myself.(Some old Arduinos used other chips or ran slower and some Pro Minis run at 3.3V.)Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    "Useful?" - it depends what you want to use it for. As I said it's really only to see what sort of a signal there is.In the "+/-0.5V range, the bandwidth is limited by the ADC. At higher sample rates there are problems with antialiasing (which you'll get with any ADC) and with the Arduino ADC struggling to do the conversion.I've attched a composite photo of 1kHz to 100kHz sine waves. The incoming sine waves are all the same height (there from an AD9833 function generator).As you can see, the audio range up to 20kHz is quite reasonable. I'm happy with 50kHz. But the ADC isn't doing at all well at 1Msps.Antialiasing problems should be reduced with a low-pass filter at half the nyquist frequecy.The filter won't have a sharp cut-off so you might ask for 40db down at half the ...

    see more »

    "Useful?" - it depends what you want to use it for. As I said it's really only to see what sort of a signal there is.In the "+/-0.5V range, the bandwidth is limited by the ADC. At higher sample rates there are problems with antialiasing (which you'll get with any ADC) and with the Arduino ADC struggling to do the conversion.I've attched a composite photo of 1kHz to 100kHz sine waves. The incoming sine waves are all the same height (there from an AD9833 function generator).As you can see, the audio range up to 20kHz is quite reasonable. I'm happy with 50kHz. But the ADC isn't doing at all well at 1Msps.Antialiasing problems should be reduced with a low-pass filter at half the nyquist frequecy.The filter won't have a sharp cut-off so you might ask for 40db down at half the nyquist. A simple RC filter has a roll of 20db/decade (I think) so that would mean 1Msps needs an RC filter with a center frequency of 10kHz. Or you could use an active filter. But you can't overcome the ADC's digitisation limitations.At higher gains, the frequency response of the LM358 begins to matter but with such low gains (5db/stage) I think it should be good up to 100kH.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    In Step 8, I have now attached Gerber files and EasyPC source files for an SM PCB. These have not been tested so use them at your own risk. Let me know if you find any errors.

    As I say in the introduction, it's really just to tell you if the signal is present, roughly how big it is and roughly what is its frequency? For a sythesizer, you may be wanting a better quality scope.On the other hand, I can imagine having two of them on the front panel rather like Vu meters. That would be cool. For a "Vu meter oscilloscope" you wouldn't need the op amp or the buttons. An input "stage" of three resistors arranged like R11, R12, R13 would give you your +/-12V range.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    Here's what I used:1.3" OLED 1 offArduino Nano 1 offLM358 1 offstripboard 1.8"x1.3" 3 offpushbutton 2 off100nF 4 off10u 1 off1k 1 off1M 2 off4k7 3 off10k 1 off120k 1 off150k 1 off270k 2 off470k 1 offFor R9, I used a 33k to trim the "0V" of the display but you may need a different value.Plus the usual solder, bits of wire, USB lead for programming, etc.You might want a better op-amp. The LM358 doesn't have a great frequency response and produces weird output if it's overloaded.I made a bezel for the buttons from sheet polystyrene and painted the arrows on with typewriter correction fluid.I'm currently adding a signal generator module - an AD9833 (£2.50 on eBay) so if you're ordering stuff you might want one. It seems like a nice unit.Peter

    > People could try the Microchip MCP602 ... It certainly can't be worse than the LM358.> ... it has near rail-to-rail output. Fortunately rail-to-rail isn't needed for this circuit. The Arduino can only measure up to 1.1V in the "AC" ranges.> I don't get where the gain of 5 is coming from The DC range uses Vcc as the reference voltage for the ADC. So it's range is 0 to 5V.The coarse AC range uses the internal bandgap as the reference. So its range is 0 to 1.1V. Which is very roughtly a 5 times gain. The offset due to the resistors R7, R8, R9 means the actual range is -0.55 to +0.55. The graticule shows -0.5V, 0V and +0.5V.> the inverting op-amp formula with 1M/270K gives an 'ideal amp' gain of -3.7True. So the input range is now -0.55/3.7 to +0.55/3.7 = -0.15 to +0...

    see more »

    > People could try the Microchip MCP602 ... It certainly can't be worse than the LM358.> ... it has near rail-to-rail output. Fortunately rail-to-rail isn't needed for this circuit. The Arduino can only measure up to 1.1V in the "AC" ranges.> I don't get where the gain of 5 is coming from The DC range uses Vcc as the reference voltage for the ADC. So it's range is 0 to 5V.The coarse AC range uses the internal bandgap as the reference. So its range is 0 to 1.1V. Which is very roughtly a 5 times gain. The offset due to the resistors R7, R8, R9 means the actual range is -0.55 to +0.55. The graticule shows -0.5V, 0V and +0.5V.> the inverting op-amp formula with 1M/270K gives an 'ideal amp' gain of -3.7True. So the input range is now -0.55/3.7 to +0.55/3.7 = -0.15 to +0.15. The graticule shows -0.1V, 0V and +0.1V. I guess I was thinking that the graticule was one fifth of the coarse AC range.The final the input range is -0.55/3.7/3.7 to +0.55/3.7/3.7/3.7 = -0.04 to +0.04. The graticule shows -20mV, 0V and +20mV. and 20mV is one fifth of 0.1V.You're right none of them mean a gain of 5 times. A proper oscillloscope has voltage ranges of 1, 2, 5, 10, 20, 50, etc. I didn't want that many ranges and had to choose some that seemed useful.> A possible enhancement is to add voltage clamping on the signal input An Arduino has clamping diodes on its pins. The diodes can source/sink 1mA (that's buried in an application note somewhere). R4 is 10k so any voltage from -10V to +15V is safe. You could increase R4 if you wanted. The input impedance of the ADC is 100M and 14pF (I think - it's hard to get these figures) so a bigger R4 wouldn't degrade the signal. Try 100k and see what the signal looks like.> To be really safe, people could do the same with the voltmeter inputR13 is 470k so you'd have to touch a voltage more than 470V to damage the Arduino.> I look forward to reading and using your code. :-)Please tell us all how you get on.

    View Instructable »
  • Peter Balch's instructable Oscilloscope in a Matchbox - Arduino's weekly stats: 2 months ago
    • Oscilloscope in a Matchbox - Arduino
      5,504 views
      62 favorites
      8 comments
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    If you are needing a very cheap oscilloscope, you could try searching eBay for "dso138". It uses an ARM Cortex processor which is faster than an Arduino and has a faster ADC.For instance:https://www.ebay.co.uk/itm/DSO138-2-4-TFT-Handheld...

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Oscilloscope in a Matchbox - Arduino2 months ago
    Oscilloscope in a Matchbox - Arduino

    Please do let me know how you get on.Peter

    View Instructable »
  • Thanks, I guess I just didn't wait long enough. When I "published" it, I didn't get the dancing robot that I remember, so I was worried it might have gone wrong.And thank you very much for featuring it. I think it might be that all except one of my Instructables have been featured. Which certainly encourages me to try even harder next time.All the best,Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer2 months ago
    Transistor Curve Tracer

    PSOC as in "Programmable System on a Chip" from Cypress? It's not something I've ever looked at.

    The section "Step 5: Serial Comms to PC" describes the serial interface and has a Windows EXE that displays the curves. Or do you mean when looking at gate charge vs voltage? The serial interface allows primitive commands to set DAC values and read ADC results. You could use those to draw the gate charge graph. You may need to add other commands to turn the current source on/off.

    > i think it can be an issue to make a stable 10uA current generator... Why do you need a constant current generator? What you're making is a graph of charge vs voltage - right? So let's say your "current generator" is a 10V source and a 1M resistor. As the gate charges up, the current through the resistor will change. But you know what that current is - it's (10V-Vg)/1M. So you know the charge in the gate. Surely the fact that it's not linear is irrelavent.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer2 months ago
    Transistor Curve Tracer

    I've been looking at high-speed ADC on the Arduino recently. It's possible to get rather poor quality ADC samples at 1Msps. You can get better quality samples at 100ksps - i.e. 10uS per sample - but they're not great. If we assume that a big power MOSFET has a gate charge of 100nC and you charge it at 1mA, it will be "full" after 100uS. So, at best, that would be 10 ADC samples - not really enough for a decent graph.A more typical MOSFET has a gate charge under 10nC so a Arduino is nowhere near fast enough at 1mA.If you could charge the gate at 10uA then it would be OK but I'm not sure how well that would work for the MOSFET. And you've got to worry about the Atmel's input impedance - say 100Mohm and 14pF. 100Mohm wouldn't have much effect on the 10uA current. Shall we guess a...

    see more »

    I've been looking at high-speed ADC on the Arduino recently. It's possible to get rather poor quality ADC samples at 1Msps. You can get better quality samples at 100ksps - i.e. 10uS per sample - but they're not great. If we assume that a big power MOSFET has a gate charge of 100nC and you charge it at 1mA, it will be "full" after 100uS. So, at best, that would be 10 ADC samples - not really enough for a decent graph.A more typical MOSFET has a gate charge under 10nC so a Arduino is nowhere near fast enough at 1mA.If you could charge the gate at 10uA then it would be OK but I'm not sure how well that would work for the MOSFET. And you've got to worry about the Atmel's input impedance - say 100Mohm and 14pF. 100Mohm wouldn't have much effect on the 10uA current. Shall we guess a gate capacitance of 5nF? (I know it's non-linear but we can guess an approximate value.) So 14pF is trivial. It looks to me like the ADC could measure the rising gate voltage OK.The question is, can you reasonably charge a gate at 10uA - most people discuss switching gates fast not slowly.Have you tried looking at it with an oscilloscope?Do you think my numbers are reasonable?Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    I like the photos of the diode curves showing current limiting.> two pictures of the current state of construction:Looks good - but I still prefer my ZIF socket.> I have used ADC 5 and ADC7 to measure/regulate the base current direct over a part of the 27k resistance, Are you saying that you are measuring the voltage at the gate of a FET rather than assuming Vgs is the same as the output voltage of the DAC? Surely the gate impedance is so high the voltage across the 27k is close to zero.Or are you saying that you are measuring the voltage at the base because you don't want to assume that Vbe is 0.7V? I wondered about that assumption and decided that the difference it made for different transistors was very small and a curve tracer doesn't need that level of accuracy. Am I wrong do...

    see more »

    I like the photos of the diode curves showing current limiting.> two pictures of the current state of construction:Looks good - but I still prefer my ZIF socket.> I have used ADC 5 and ADC7 to measure/regulate the base current direct over a part of the 27k resistance, Are you saying that you are measuring the voltage at the gate of a FET rather than assuming Vgs is the same as the output voltage of the DAC? Surely the gate impedance is so high the voltage across the 27k is close to zero.Or are you saying that you are measuring the voltage at the base because you don't want to assume that Vbe is 0.7V? I wondered about that assumption and decided that the difference it made for different transistors was very small and a curve tracer doesn't need that level of accuracy. Am I wrong do you think?I've never looked at how Vbe varies with base current. > voltage of the SMPS is higher than 12.2V.> The 11.93V is from the used divider 49.9k/26.1k So the minimum Vbe is 0.3V. Which is probably just OK for germaniums.Would it be worth putting a diode betewwn the emitter of the DUT and the "12V" so that you cane make Vbe go down to zero?Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    That all makes sense and the photos look very good indeed. I'm glad you found my code clear enough to follow.So ADC0 is the voltage at the load resistor? ADC1 is the voltage at the NPN collector and ADC2 is the voltage at the PNP collector.Why do you need separate ADC inputs for the bases? Don't you just measure the DAC output? Or are they "not used" and you assume the DAC is right?You don't seem to me measuring the battery voltage to tell you when it needs replacing? Are you using separate SMPS for 12V, 5V and 3.3V?

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    > some µF between + and -.Where? In parallel with the feedback resistors of the op-amps? Across the power supplies?> a dual switch for pos. and neg. side I thought of that but had a ZIF socket to hand.> Than I try to integrate encoder(s) for a quicker change of the parameters ... min ... max. A rotary knob to turn and push?> a MCP4812 /10 bit.> Perhaps it's a little bit better for jFETS near 0V Vds.That makes sense.So what analog input pins are you using? The ones I showed the schematic or some others as well?Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    > I think the opamp TCA0372 is the best choice, its stable for all devices .Does the attached PDF show the circuit you are using?> I have found a small error in the source-code near line 327:OK, I'll fix that. Thanks.> I have changed some things for the j-FET curves. Now it looks better:Excellent. What have you changed?Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    > the LM358 with Q1/Q2 has perhaps some problems with stability Yes but it worked for me with the 100n C1..C4. They slow the frequecy response so I put big delays in after any big change to the DAC. If your circuit responds faster then you can make the delays smaller (remember to try the Q command).> problem is Q3 and his base-resistor (R21/4.7k) :> If the beta is not so high, BC639 have always had high gain for me. I started with 10k but settled on 4k7.> I think the TCA0372 is the best choice, They sound useful. I'll order some - but I don't fancy having to re-wire the stripboard.Have you measured how close the TCA0372 can get to 0V and 12V? Can you post photos of the curves for NPN and PNP?> it was a lot of noise on the curves.I guess it will have a faster response than...

    see more »

    > the LM358 with Q1/Q2 has perhaps some problems with stability Yes but it worked for me with the 100n C1..C4. They slow the frequecy response so I put big delays in after any big change to the DAC. If your circuit responds faster then you can make the delays smaller (remember to try the Q command).> problem is Q3 and his base-resistor (R21/4.7k) :> If the beta is not so high, BC639 have always had high gain for me. I started with 10k but settled on 4k7.> I think the TCA0372 is the best choice, They sound useful. I'll order some - but I don't fancy having to re-wire the stripboard.Have you measured how close the TCA0372 can get to 0V and 12V? Can you post photos of the curves for NPN and PNP?> it was a lot of noise on the curves.I guess it will have a faster response than my "open collector op-amp". So you can make the dealys smaller. Then take multiple ADC measurements and average them to reduce the noise.

    Those photos look very good indeed. I don't see any of the noise you mentioned.> Ubat = 11.26V> Uout (no load) = 11.05 VSo both the TCA0372 and the L2722 can get their output to within 0.2V of the power line. That's very good. How close can they get to 0V? Fig 4 of the L2722 doc from ST says it can get to within 0.5V of the power line and 0.05V of the 0V line.A 6V output into 100ohm is 0.35W so it shouldn't overheat. > Uout (100 Ohm) = 10.98 V (TCA 0372)> Uout (100 Ohm) = 11.00 V (L2722)I hadn't measured that for my "open collector" output so I can't compare but it seems acceptable.> The op in non-inverting-mode with R1 = 49.9k, R2 = 26.2k> and 3.9... V (via zener) on + inputIf it's in in non-inverting-mode then you connect the 26.2k to 0V. The 0.. 4.08V from...

    see more »

    Those photos look very good indeed. I don't see any of the noise you mentioned.> Ubat = 11.26V> Uout (no load) = 11.05 VSo both the TCA0372 and the L2722 can get their output to within 0.2V of the power line. That's very good. How close can they get to 0V? Fig 4 of the L2722 doc from ST says it can get to within 0.5V of the power line and 0.05V of the 0V line.A 6V output into 100ohm is 0.35W so it shouldn't overheat. > Uout (100 Ohm) = 10.98 V (TCA 0372)> Uout (100 Ohm) = 11.00 V (L2722)I hadn't measured that for my "open collector" output so I can't compare but it seems acceptable.> The op in non-inverting-mode with R1 = 49.9k, R2 = 26.2k> and 3.9... V (via zener) on + inputIf it's in in non-inverting-mode then you connect the 26.2k to 0V. The 0.. 4.08V from the DAC is amplified by (49.9k+26.2k)/26.2k and so turns into 11.8V. Right?So what's the zener for?And 11.8V isn't quite enough with a 12.6V supply. If you want to turn off the base of a PNP DUT then you need to get Vbe below 0.2V. Well, maybe most people aren't old enough to have drawers full of germanium transistors from the 1970s. But even a silicon transistor might turn on at 0.6V.I'm very impressed by your photos. The DUT is turning off completely.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    I tried TDA chips but didn't look at the TCA0372. From the datasheet it might work. The big test is how close the output can go to the 0V and 12V lines. Have you measured that?

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    You're right. I've changed it to base*5 and uploaded the new INO to this Instructable. I tested it with the hardware and the base currents are as shown on the graph.Thank you for spotting that.I noticed that the PNG of the circuit has been reduced in size by the Instructables website so it's almost unreadable. So I've uploaded a new version of CurveTracerCircuit.zip (step 3) which includes the original PNG file.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    > Now I realized the driver for the DUTs with only one NE5532I've just looked at the NE5532. It's useful chip but:How close can the output go to Vcc? From the datasheet, it's not rail-to-rail but is a couple of volts short of the rail? If the output can't reach "12V" (or is it 14V for you) then you can't fully turn off a PNP DUT. Can the NE5532 reach 0V?I don't like the vertical line at the left edge of the photo above. That's what you get for a PNP when the output of the op-amp can't reach "12V". It should slope more.What's the maximum output current of the NE5532? It says it's somewhere between 10mA and 60mA. 60mA is good but 10mA isn't enough to be useful.> I need there only one ADC I don't understand.> (I take ADC0 to A0 on Arduino), Are you saying that ...

    see more »

    > Now I realized the driver for the DUTs with only one NE5532I've just looked at the NE5532. It's useful chip but:How close can the output go to Vcc? From the datasheet, it's not rail-to-rail but is a couple of volts short of the rail? If the output can't reach "12V" (or is it 14V for you) then you can't fully turn off a PNP DUT. Can the NE5532 reach 0V?I don't like the vertical line at the left edge of the photo above. That's what you get for a PNP when the output of the op-amp can't reach "12V". It should slope more.What's the maximum output current of the NE5532? It says it's somewhere between 10mA and 60mA. 60mA is good but 10mA isn't enough to be useful.> I need there only one ADC I don't understand.> (I take ADC0 to A0 on Arduino), Are you saying that you measure the output of the ADC and assume the op-amp has amplified it correctly?> I changed ADC3 /A3 against ADC7/A7 on my board .I used A7 to check that the actual voltage of "12V". I think you need that so you can measure Vce of a PNP DUT.> Peter, thank You very much , the best project I have ever seen on instructables !I'm glad you're enjoying it so much.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    > perhaps the LM7322 is a good choice.Looks nice but is only SM and is quite expensive. I was trying to design something people could build with mostly what they had in their component drawer. Hence through-hole and stripboard. Alternatively, I imagined a Chinese company wanting to make one with SM and a better op-amp.One design I tried that worked quite well was not to use the DAC for the DUT collector load (i.e. only have a DAC for the base). The collector load resistor was connected to a 100u capacitor. A transistor connected to an Arduino digital pin shorted the cap to discharge it. Then the transistor was turned off and the cap slowly charged. As the cap charged, the Arduino ADCs measured Vcc of the DUT and the voltage across the load resistor. (You also need e.g. a 1k across of...

    see more »

    > perhaps the LM7322 is a good choice.Looks nice but is only SM and is quite expensive. I was trying to design something people could build with mostly what they had in their component drawer. Hence through-hole and stripboard. Alternatively, I imagined a Chinese company wanting to make one with SM and a better op-amp.One design I tried that worked quite well was not to use the DAC for the DUT collector load (i.e. only have a DAC for the base). The collector load resistor was connected to a 100u capacitor. A transistor connected to an Arduino digital pin shorted the cap to discharge it. Then the transistor was turned off and the cap slowly charged. As the cap charged, the Arduino ADCs measured Vcc of the DUT and the voltage across the load resistor. (You also need e.g. a 1k across of the C-E pins of the DUT so there is some charging current even when the DUT is "turned off").The advantage is that it's cheap and works well - it had less noise that the method I use now.The disadvantage is that you can't deal with JFETs in the rather sneaky way I do. Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    That could well be a better design than mine. I had real trouble with stability as you can tell.The best solution is, of course, to get rid of the dreadful LM358 and replace it with a decent rail-to-rail op-amp. I've done more searching and still haven't found a through-hole one.If you send the command 'Q' over the serial line then the Arduino produces a square wave at the DACs. You can look at the edges of the square wave with an oscilloscope and see how much it is degraded by the capacitors. In my code, there are big delays after any big change to the DACs to allow for the slow response of the "open collector op-amp".Peter

    Useful to know - thanks.I've been looking at the 1.1V internal Vref for the ADC (for another project). It has the advantage that it's a clean, stable signal. In the curve tracer I use the "5V" Vcc as Vref for the ADC which is variable and noisy. I compensate for the variable "5V" by measuring the voltage but it might be better to use the internal 1.1V.Some people run the Arduino off a "5V" or even "Raw" supply and use the 3V3 output as Vref for the ADC. If you're using an external 3.3V regulator for the display then the 3V3 pin should be pretty clean.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer3 months ago
    Transistor Curve Tracer

    A Nano will work just as well. A Nano is like a ProMini but with extra features.The ProMini has a 328p processor chip, a voltage reulator (to turn e.g. 9V into 5V) and that's it.The Nano is the same but with a second voltage reulator (to turn e.g. 9V into 3.3V) and an FTDI chip as a USB-to-serial converter.The "official" ProMini has two fewer ADC pins than the Nano but most of the ProMini clones on eBay give you the extra pins anyway (the positions of the extra pins varies between manufacturers).I chose the ProMini for its smaller size as I didn't need the built-in USB-to-serial converter for thr final "product". But the downside was that I then had to provide an external 3.3V regulator.If you use the Nano you can use its built-in 3.3V regulator to power the display ...

    see more »

    A Nano will work just as well. A Nano is like a ProMini but with extra features.The ProMini has a 328p processor chip, a voltage reulator (to turn e.g. 9V into 5V) and that's it.The Nano is the same but with a second voltage reulator (to turn e.g. 9V into 3.3V) and an FTDI chip as a USB-to-serial converter.The "official" ProMini has two fewer ADC pins than the Nano but most of the ProMini clones on eBay give you the extra pins anyway (the positions of the extra pins varies between manufacturers).I chose the ProMini for its smaller size as I didn't need the built-in USB-to-serial converter for thr final "product". But the downside was that I then had to provide an external 3.3V regulator.If you use the Nano you can use its built-in 3.3V regulator to power the display - I think it's powerful enough. But you'll have to work out your own stripboard layout.Please do let me know how you get on building one.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer4 months ago
    Transistor Curve Tracer

    That's wonderful. It looks really good. Is it running at 3.7V ?Does the touch now work properly? I don't undertand why it didn't work before.

    > But I need one MT3608 step-up from 3.7V ( Lion/Lipo-Battery) to 5V-5.3V for Arduino Nano.My first thought was "why do you need 5V at all? Just run it all off unregulated 3.6V to 4.2V from the Lipo". You'd need to change the potential dividers that go into the ADCs. The MCP4802 will work at 2.7V to 5V; I'm using its 4V internal reference but you could tell it to use 2V then double the gains of the op-amps.I guess that's a lot of work and just using a boost SMPS is easier. Or have two Lipo cells.> Then one more MT3608 for the 12V-12,7V for the LM358 DriverAs you say, it's 12V-12,7V. And the "5V" supply might be a bit low. I designed the circuit assuming that the supply voltages would be exact but they never are. The 47k/33k potential dividers that go into the A...

    see more »

    > But I need one MT3608 step-up from 3.7V ( Lion/Lipo-Battery) to 5V-5.3V for Arduino Nano.My first thought was "why do you need 5V at all? Just run it all off unregulated 3.6V to 4.2V from the Lipo". You'd need to change the potential dividers that go into the ADCs. The MCP4802 will work at 2.7V to 5V; I'm using its 4V internal reference but you could tell it to use 2V then double the gains of the op-amps.I guess that's a lot of work and just using a boost SMPS is easier. Or have two Lipo cells.> Then one more MT3608 for the 12V-12,7V for the LM358 DriverAs you say, it's 12V-12,7V. And the "5V" supply might be a bit low. I designed the circuit assuming that the supply voltages would be exact but they never are. The 47k/33k potential dividers that go into the ADCs make 12V into 4.95V which is awfully close to the 5V limit of the ADCs. You can begin to lose the left-hand part when you draw the curves of a PNP. Maybe I should have chosen 15k/10k or 56k/33k.> and perhaps one MT3608 for testing Zener_Diodes between 1.5V and 28V (the limit of the MT3608).Yes. That would be useful.The Arduino code automatically recognises when a component is inserted and draws the graph. If I remember right, it tests the component with a 6V supply. So it won't see a 9V Zener. Maybe I should have added a "Draw the graph now" button on the menu screen.Peter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer4 months ago
    Transistor Curve Tracer

    The ILI9341 chip has its own internal screen buffer memory. You send commands to it over an SPI bus or a parallel bus. Parallel is faster, of course but uses a lot more Arduino pins. If you're buying a module on eBay, look at the pin-names in the photo: are they MOSI, SCK, etc. or D0, D1, D2, ...?The commands you send to it are pretty basic: you define an n*m rectangle on the screen then send the n*m 16-bit words for the pixels to fill it. So all the cleverness to draw lines or characters is in the Arduino. The libraries you can download are of variable quality - some just don't work, some are fast and some are slow. Fast is more prone to timing problems and the ones I tried had trouble sharing the SPI bus with other devices. So my library is slower: it takes just over 2 sec to draw the...

    see more »

    The ILI9341 chip has its own internal screen buffer memory. You send commands to it over an SPI bus or a parallel bus. Parallel is faster, of course but uses a lot more Arduino pins. If you're buying a module on eBay, look at the pin-names in the photo: are they MOSI, SCK, etc. or D0, D1, D2, ...?The commands you send to it are pretty basic: you define an n*m rectangle on the screen then send the n*m 16-bit words for the pixels to fill it. So all the cleverness to draw lines or characters is in the Arduino. The libraries you can download are of variable quality - some just don't work, some are fast and some are slow. Fast is more prone to timing problems and the ones I tried had trouble sharing the SPI bus with other devices. So my library is slower: it takes just over 2 sec to draw the screen. It also occupies a lot less of the Arduino's program memory.

    Wow. That's exactly what I've been working on for the last few days!I've got a Nano to give me over 1M samples per second with 8 bits. There's a bit of noise but it's useable. At 500k sps or less, it's decent quality. The trick is not to use interrupts - the overhead is too big.The Girino is a very good start but it can't sample so fast and it doesn't have a display:https://www.instructables.com/id/Girino-Fast-Arduino-Oscilloscope/

    Thank you. Please build one. I'd love it if it became a group project like the LCR-T4.The design is a compromise and maybe I made the wrong decisions. Is 12V the right voltage? Is 50mA the right current? What about the base/gate currents and voltages. It's meant to work with an "average" component but what does that mean? It had to be easy to build rather than have the dozens of knobs of a Tektronix 576.

    Further to the suggestion of an oscilloscope as the next project ...Search eBay for DSO138. It's a digital oscilloscope for just over £10 Maximum sampling rate : 1Msps Sampling buffer depth : 1024 bytes Analog bandwidth : 0 - 200KHz Vertical Sensitivity : 10mV / Div - 5V / Div Maximum input : 50Vpp (1: 1 probe ), 400Vpp (10: 1 probe ) Time base range : 10μs / Div - 50s / Div ( 1-2-5 progressive manner )It's going to be hard to compete with that. What I have is a room full of electronic Stuff including 4 oscilloscopes. It's a fuss to use a proper 'scope. Often, all I want is presence/absence of signal. A year ago I built a 15x13x6cm box with a breadboard on the top. Inside is a Serial->USB, a PIC programmer and a Sealey logic analyser. What's nice is that it's self-contai...

    see more »

    Further to the suggestion of an oscilloscope as the next project ...Search eBay for DSO138. It's a digital oscilloscope for just over £10 Maximum sampling rate : 1Msps Sampling buffer depth : 1024 bytes Analog bandwidth : 0 - 200KHz Vertical Sensitivity : 10mV / Div - 5V / Div Maximum input : 50Vpp (1: 1 probe ), 400Vpp (10: 1 probe ) Time base range : 10μs / Div - 50s / Div ( 1-2-5 progressive manner )It's going to be hard to compete with that. What I have is a room full of electronic Stuff including 4 oscilloscopes. It's a fuss to use a proper 'scope. Often, all I want is presence/absence of signal. A year ago I built a 15x13x6cm box with a breadboard on the top. Inside is a Serial->USB, a PIC programmer and a Sealey logic analyser. What's nice is that it's self-contained and so small. I hardly use the rest of the workbench (or benches!).I'm thinking I'll add a voltmeter module and a 'scope with a 1.3" screen. Small is nice.Any thoughts?

    View Instructable »
  • Peter Balch's instructable Transistor Curve Tracer's weekly stats: 4 months ago
    • Transistor Curve Tracer
      1,960 views
      38 favorites
      6 comments
  • Peter Balch commented on Caffeinomane's instructable Girino - Fast Arduino Oscilloscope4 months ago
    Girino - Fast Arduino Oscilloscope

    Hi, thanks for a great Instructable.I'm building the 'scope and have hit a couple of problems. The "HardwareSerial" compiler error is straightforward to overcome. As is working out which pin is which (the ADC is A0, the comparator is D6 and D7). My main problem is speed.It works reliably with a prescaler of 128, 64 or 32. After I added womai's changes, it worked at prescaler=16 but it is unreliable at 8 - I get a couple of scans and then it freezes. It freezes immediately at prescaler=4 or 2. I'm using a 328p at 16MHz.What speed did you get it to run at? You were doing it 6 years ago; could the ISR overhead be bigger with newer libraries?Two minor problems:Only the Toggle trigger mode seems to work. If I choose Rising or Falling, it still triggers on "change". Any th...

    see more »

    Hi, thanks for a great Instructable.I'm building the 'scope and have hit a couple of problems. The "HardwareSerial" compiler error is straightforward to overcome. As is working out which pin is which (the ADC is A0, the comparator is D6 and D7). My main problem is speed.It works reliably with a prescaler of 128, 64 or 32. After I added womai's changes, it worked at prescaler=16 but it is unreliable at 8 - I get a couple of scans and then it freezes. It freezes immediately at prescaler=4 or 2. I'm using a 328p at 16MHz.What speed did you get it to run at? You were doing it 6 years ago; could the ISR overhead be bigger with newer libraries?Two minor problems:Only the Toggle trigger mode seems to work. If I choose Rising or Falling, it still triggers on "change". Any thoughts? (I've checked that ACSR gets the right value)There's a small bug if you set e.g. waitDuration=ADCBUFFERSIZE-100 so you can see before the trigger event. The region before the trigger is often mostly zeros. I guess what's wrong is: the circular buffer is initialised to zero; start recording; the trigger happens after 20 samples; so there are 80 un-filled slots. The answer is probably to not allow the trigger until at least 100 samples have been recorded.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Transistor Curve Tracer4 months ago
    Transistor Curve Tracer

    I do hope you make one. If you need any advice or find any bugs, please let me know."In the next few days" - wow. You're faster than me. The order I did it was: get the display working, then the DAC, etc. running off a bench power supply and finally the regulators and SMPS.

    View Instructable »
  • Peter Balch commented on Nematic!'s instructable How Rotary Encoder Works With Arduino!4 months ago
    How Rotary Encoder Works With Arduino!

    Actually, bouncing isn't a problem with the algorithm that Nemeen has chosen.The wrong way to do it is to count on (say) the rising edge of the Clock: if Data is high, count up; if Data is low, count down. If the switch bounces then you'll get multiple counts.The right way is to count on both the up and down edges of the Clock. If Data != Clock then count up, otherwise count down. Bouncing counts both up and down so cancels out.However AFAIK, you really must sample both Clock and Data at the same instant. In Nemeen's code, the Clock is sampled then the Data several instructions later. That's wrong. The Data may have changed.Instead, one should read a whole byte, e.g.int i = PORTD;then look at the individual bits of i.I suspect it may be a bad idea to add RC filtering to the inputs - the...

    see more »

    Actually, bouncing isn't a problem with the algorithm that Nemeen has chosen.The wrong way to do it is to count on (say) the rising edge of the Clock: if Data is high, count up; if Data is low, count down. If the switch bounces then you'll get multiple counts.The right way is to count on both the up and down edges of the Clock. If Data != Clock then count up, otherwise count down. Bouncing counts both up and down so cancels out.However AFAIK, you really must sample both Clock and Data at the same instant. In Nemeen's code, the Clock is sampled then the Data several instructions later. That's wrong. The Data may have changed.Instead, one should read a whole byte, e.g.int i = PORTD;then look at the individual bits of i.I suspect it may be a bad idea to add RC filtering to the inputs - the filters may have different time-constants. You need to know what's happening in a single instant.Peter

    View Instructable »
  • Peter Balch commented on paperplateandplane's instructable DIY Kit Kat Molds5 months ago
    DIY Kit Kat Molds

    My father was chief engineer at Rowntrees and was the one person in the factory who had the formula for the volume of a Kit Kat. It was quite complicated when he showed it to me - it was written in pencil on the back of an envelope (or perhaps that's just in my imagination).He explained that as the price of chocolate increased he would re-design the moulds to be smaller and smaller until the biscuit started showing through. Then he would increase the size and Rowntrees would put up the price.

    View Instructable »
  • Peter Balch commented on Matlek's instructable DIY Bone Conduction Bike Helmet 6 months ago
    DIY Bone Conduction Bike Helmet

    Let's think about the direction of the vibration.To transmit from the surface of the head to the cochlea I guess the transducer has to move in/out (relative to the head). Moving along the surface of the skin isn't going to work as well.The rotor of the motor rotates - which translates into a vibration along the surface of the motor. Which becomes movement along the surface of the skin. Not at right-angles to the skin.Clipping it into the T-piece makes the whole T-piece try to rotate. So the ends are moving in/out of the head.In my mind, the T-piece doesn't just hold the motor in place, it changes the direction of the vibration from along the skin to at right-angles to the skin.The attached image might explain better what I mean.

    View Instructable »
  • Peter Balch commented on Matlek's instructable DIY Bone Conduction Bike Helmet 6 months ago
    DIY Bone Conduction Bike Helmet

    How do you think the motor works to stimulate the ears? If you hold the motor against your skin with just your fingers, can you hear the music - in other words, is the motor itself vibrating? Or is there a reaction torque to the motor trying to turn which is transmitted to the T-shaped clip holding the motor?Is the T-shape an essential part of the design?

    View Instructable »
  • Eye of Horus, Open Source Eye Tracking Assistance

    Very nice. What IR filter do you use?

    View Instructable »
  • Peter Balch's instructable Magic Lantern Revamp's weekly stats: 7 months ago
    • Magic Lantern Revamp
      670 views
      8 favorites
      0 comments
  • Peter Balch's instructable LCD COG for an Arduino Nano's weekly stats: 7 months ago
    • LCD COG for an Arduino Nano
      163 views
      8 favorites
      0 comments
  • Plastic Smoothie - DIY Plastic Recycling

    Have you considered putting the warm sheet through a pasta maker to get a more consistent thickness?

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable Closeup Magnifying Glasses10 months ago
    Closeup Magnifying Glasses

    Good question: I just measured it. From the "distant" (objective) lenses to the workpiece is 90mm (3.5"). From the bridge of my nose to the "distant" lenses is 80mm (3.2"). So that's a total of 170mm (6.7").I used 3.5 dioptre lenses. A bit of high school physics tells me that from the the bridge of my nose to the workpiece ought to be 193mm (7.6"). That's about 20mm more than I found in practice. I'm slightly short sighted so it's prboably about right.If I had used 3 dioptre lenses then the total distance would be 217mm (8.5"). That's all a lot closer than the 16 to 18 inches you want from your nose to your embroidery. It's hard to say what the magnification is. My jeweler's loupe doesn't "magnify" at all. What it does is allow me ...

    see more »

    Good question: I just measured it. From the "distant" (objective) lenses to the workpiece is 90mm (3.5"). From the bridge of my nose to the "distant" lenses is 80mm (3.2"). So that's a total of 170mm (6.7").I used 3.5 dioptre lenses. A bit of high school physics tells me that from the the bridge of my nose to the workpiece ought to be 193mm (7.6"). That's about 20mm more than I found in practice. I'm slightly short sighted so it's prboably about right.If I had used 3 dioptre lenses then the total distance would be 217mm (8.5"). That's all a lot closer than the 16 to 18 inches you want from your nose to your embroidery. It's hard to say what the magnification is. My jeweler's loupe doesn't "magnify" at all. What it does is allow me to hold the workpiece closer to my eye. The result is that It is in focus while it is 7 times closer. So I suppose you could say that the magnification is 7 times. By that measure, the "magnifying glasses" magnify by about 3.5 times.I hope that helpsPeter

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable A Wheeled Steampunk Mouse11 months ago
    A Wheeled Steampunk Mouse

    Thanks.Yes, papier mache for the bottom of the shell and tinplate for the top. I tried a variety of materials but papier mache turned out to be the easiest to get the shape I wanted. I suspect that vacuum-formed polystyrene sheet would be better but the vacuum-cleaner powered former I made doesn't work well enough.I'm a huge fan of tinplate as a modelmaking material. It's strong and easy to cut and solder. Decades ago when my son was a toddler he lived on formula milk and I saved all the tinplate cans. So I've got a lifetime supply.

    View Instructable »
  • Peter Balch commented on mikeasaurus's instructable Unusual Uses for WD-401 year ago
    Unusual Uses for WD-40

    Never use WD-40 to "fix" a clock. The clock will begin to work well but when the solvent evaporates, the sticky residue will gum-up the works.Clockmaker discussion groups are full of complaints about how hard it is to repair damage from WD-40. The answer is to spray the clock again with WD-40 to dissolve the gunk then clean it all off with your favourite solvent. Then lubricate with proper clock oil.

    Hipsters, steampunks and assorted young people who have romatic notions about the past. Old typewriters sell well.It's also good for (unobtainable) dot-matrix printer ribbons and the like if you're into retro computing.

    View Instructable »
  • Peter Balch commented on mikeasaurus's instructable Unusual Uses for WD-401 year ago
    Unusual Uses for WD-40

    Margarine is better for cleaning ingrained grease on hands. Rub in the margarine. Then rub in washing-up liquid. Then rinse under water.Margarine works well because it is full of emulsifiers and fats. Plus the fats help stop your skin drying out.

    Margarine is better for cleaning ingrained grease on hands. Rub in the margarine. Then rub in washing-up liquid. Then rinse under water.Margarine works well because it is full of emulsifiers and fats. As a bonus, the fats help stop your skin drying out.

    Margarine is better for cleaning ingrained grease on hands. Rub in the margarine. Then rub in washing-up liquid. Then rinse under water.Margarine works well because it is full of emulsifiers and fats. Plus the fats help stop your skin drying out.

    WD-40 will restore a typewriter ribbon that has dried-out.

    View Instructable »
  • Peter Balch's instructable Servo Sequencer's weekly stats: 1 year ago
    • Servo Sequencer
      82 views
      6 favorites
      2 comments
  • Peter Balch commented on Peter Balch's instructable A Steampunk Orrery-Clock1 year ago
    A Steampunk Orrery-Clock

    Google for "pyramid clock" then hit images (rather than shopping). I got around 20 hits. I've pasted in a few below. The prices vary enormously from $7 to $150. It's a huge compliment that that you've been inspired to make one.. Please do post the results. The dome, beads, etc are easy to find but I suspect that the difficulty might be finding a nice wooden box. It occurred to me that the black plastic base for a trophy could work well. Peter https://www.banggood.com/EMPO-Design-Concept-PVC-Pyramid-Decorative-Clock-p-912968.html https://www.evertek.com/viewpart.asp?auto=98338&cpc=RECOM http://www.ebay.com/itm/Ideal-Valentine-Gift-4-Time-Pyramid-Clock-A-Moving-Sculpture-Timepiece-/221746791818 https://www.myxlshop.co.uk/empo-pyramid-design-clock-empo.html?id=5016256...

    see more »

    Google for "pyramid clock" then hit images (rather than shopping). I got around 20 hits. I've pasted in a few below. The prices vary enormously from $7 to $150. It's a huge compliment that that you've been inspired to make one.. Please do post the results. The dome, beads, etc are easy to find but I suspect that the difficulty might be finding a nice wooden box. It occurred to me that the black plastic base for a trophy could work well. Peter https://www.banggood.com/EMPO-Design-Concept-PVC-Pyramid-Decorative-Clock-p-912968.html https://www.evertek.com/viewpart.asp?auto=98338&cpc=RECOM http://www.ebay.com/itm/Ideal-Valentine-Gift-4-Time-Pyramid-Clock-A-Moving-Sculpture-Timepiece-/221746791818 https://www.myxlshop.co.uk/empo-pyramid-design-clock-empo.html?id=50162560&gclid=CIP6zIHL4tQCFSa-7Qod32UNbg https://www.ebay.co.uk/i/252874985121?chn=ps&dispItem=1&adgroupid=45192390362&rlsatarget=pla-331477147172&abcId=1129006&adtype=pla&merchantid=113272112&poi=&googleloc=9046888&device=c&campaignid=861899495&crdt=0

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable A Wheeled Steampunk Mouse1 year ago
    A Wheeled Steampunk Mouse

    For this particular project I wanted wheels that really drove the mouse logic. I reckoned I had to start with a ball mouse. I couldn't see a compact way to connect wheels to the camera of an optical mouse. I've never seen a BT mouse with a ball. My experience with BT mice has been disappointing. I had to keep re-pairing them and the batteries didn't last long. And I had to remember to turn it off every night. Perhaps I was just unlucky with the mice I tried. Apple ones may well work better but I suspect that the re-pairing is a Windows problem.Of course, there's an instructable for a Qi mouse:https://www.instructables.com/id/Make-wireless-charging-mouse/

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable A Wheeled Steampunk Mouse1 year ago
    A Wheeled Steampunk Mouse

    Thanks. Yes it took forever.I hadn't realised that Apple mice could be used with Windows. It seems you need a special driver and possibly even a special Bluetooth dongle. Not ideal but worth knowing.

    View Instructable »
  • Peter Balch's instructable Vintage Intercom Re-purposing's weekly stats: 1 year ago
    • Vintage Intercom Re-purposing
      898 views
      23 favorites
      1 comments
  • Peter Balch's instructable A Steampunk Disk Drive USB Meter's weekly stats: 2 years ago
    • A Steampunk Disk Drive USB Meter
      5,557 views
      98 favorites
      2 comments
  • Peter Balch's instructable Closeup Magnifying Glasses's weekly stats: 2 years ago
    • Closeup Magnifying Glasses
      785 views
      27 favorites
      3 comments
  • Peter Balch's instructable A Steampunk Orrery-Clock's weekly stats: 2 years ago
    • A Steampunk Orrery-Clock
      1,667 views
      78 favorites
      0 comments
  • Peter Balch commented on Peter Balch's instructable Closeup Magnifying Glasses2 years ago
    Closeup Magnifying Glasses

    40 years? A mere trifle!As my lenses begin to crystalise and I can't change focus the flip-up action becomes essential.

    View Instructable »
  • Peter Balch's instructable A Wheeled Steampunk Mouse's weekly stats: 2 years ago
    • A Wheeled Steampunk Mouse
      1,911 views
      69 favorites
      6 comments
  • Peter Balch's instructable A Sgian-dubh memory stick's weekly stats: 2 years ago
    • A Sgian-dubh memory stick
      1,610 views
      22 favorites
      5 comments
  • More Activities