author

Peter Balch

395
Inbox View Profile
22Instructables371,322Views366Comments

Tell us about yourself!

Achievements

100+ Comments Earned a bronze medal
10K+ Views Earned a bronze medal
Robots Contest
Contest Winner Runner Up in the Robots Contest
Maps Challenge
Contest Winner Second Prize in the Maps Challenge
  • Peter Balch commented on Peter Balch's instructable MIDI Drum Machine
    MIDI Drum Machine

    Perhaps you could test the display with a simpler test program.You get quite a few hits by searching google for something likeArduino ILI9341 Touch screen example

    View Instructable »
  • Transistor Curve Tracer

    I didn't but others have and have offered spare boards in the past.Look through the comments in the "People Made This Project!" section above. Or look through the (254!) comments below. There are certainly other people's gerber files available. I think my gerber specifies Q1, Q2 and Q3 pinouts that are hard to source.

    View Instructable »
  • ESP32-cam Standalone With Robot Arm

    What do you already know? What skills do you have? Digital or analog electronics?How may weeks do you have for the project? How many hours per day? What other classes do you have?What is you budget? Do you have trouble buying things from e.g. China - can you wait that long?What would interest you? Have you discussed it with your teachers? What do they say?How will they mark the project? How much are you expected to "invent"? What have you already considered?

    Natrurally, I can't do your project for you. But I will be happy to try to answer any specific technical questions.It's often hard to know where to start with a project. Of course, that's where google will help. But don't just copy the project directly - your lecturers are just as capable of google searches as you are!Good luck with your studies.

    Ah, now that's an interesting question that I think it's fair for me to answer. I presume it's part of your coursework at Ho Technical University. Is it an end-of-course project?It's tricky. The project should be hard enough to challenge you and impress your teachers and get you good marks but not so hard you can't finish it. In industry, you always try to reduce the "newness" of any project; in teaching you want to increase the "newness" (but not by too much). So it will depend on what your teachers expect of you and what you already know.Before I can even begin to answer, I need to know:What year are you in?What do you already know? What skills do you have? Digital or analog electronics?How may weeks do you have for the project? How many hours per day? What other cla…

    see more »

    Ah, now that's an interesting question that I think it's fair for me to answer. I presume it's part of your coursework at Ho Technical University. Is it an end-of-course project?It's tricky. The project should be hard enough to challenge you and impress your teachers and get you good marks but not so hard you can't finish it. In industry, you always try to reduce the "newness" of any project; in teaching you want to increase the "newness" (but not by too much). So it will depend on what your teachers expect of you and what you already know.Before I can even begin to answer, I need to know:What year are you in?What do you already know? What skills do you have? Digital or analog electronics?How may weeks do you have for the project? How many hours per day? What other classes do you have?What is you budget? Do you have trouble buying things from e.g. China - can you wait that long?What would interest you, challenge you (a little), excite you? Don't be over ambitious and achieve nothing.Have you discussed it with your teachers? What do they say?How will they mark the project? If you copied someone else's project that probably won't be enough. You need to show that you hit some problems and how you overcame them. How much are you expected to "invent". Undergraduate projects aren't expected to be very inventive. PhD projects should be at the cutting edge of research. MSc projects are somewhere in between.What have you already considered? If you google for e.g.electronic projects for 3rd year engineering studentsthen you'll find long lists of suggestions that range from projects that any beginner could do to projects that would tax the top students in the class.

    View Instructable »
    • ESP32-cam Standalone With Robot Arm
      2,936 views
      58 favorites
      22 comments
  • ESP32-cam Standalone With Robot Arm

    That's a very good place to start learning the ESP32cam. An FPV car is a lot easier than and autonomous robot. If you google "esp32cam wifi car" there are lots of good projects.

    > I have in mind a drill-targetting display. I'd have thought that 5 frames/sec would be adequate.So is it a computer-controlled drilling machine? What computer? Where does it get the drill table file from? Is it for PCBs?> So it shows an image of the work-piece, draws a target on the display, you touch the display with your finger to position the target over a calibration hole, I'd use the touch-with-finger to get nearby then have nudge buttons for accuracy. (It's hard to use the touch screen accurately.)> I had thought that it could also report information like spindle speed for example, but it looks like that's not an option with this micro. The lack of pins on the ESP32cam is the problem. With a Nano, spindle speed is easy.> I'm happy writing baseline PIC assembler, If you…

    see more »

    > I have in mind a drill-targetting display. I'd have thought that 5 frames/sec would be adequate.So is it a computer-controlled drilling machine? What computer? Where does it get the drill table file from? Is it for PCBs?> So it shows an image of the work-piece, draws a target on the display, you touch the display with your finger to position the target over a calibration hole, I'd use the touch-with-finger to get nearby then have nudge buttons for accuracy. (It's hard to use the touch screen accurately.)> I had thought that it could also report information like spindle speed for example, but it looks like that's not an option with this micro. The lack of pins on the ESP32cam is the problem. With a Nano, spindle speed is easy.> I'm happy writing baseline PIC assembler, If you're used to PIC assembler then programming an Arduino will be a huge relief. I did PICs for 20 years. C is a doddle compared with assembler. Of course, where I used a Nano in this Instructable, you could use a PIC16f877 or whatever. You could learn C by using Microchip's MPLab.> I had thought that it could also report information like spindle speed for example, If it's for PCBs then the spindle speed will be a few tens thousands of of RPM. So a few milliseconds per revolution. I might put white spot on the shaft and an optical sensor nearby - a lot easier mechanically than the magnetic sensors most people use. Connect the sensor to the external input of the Arduino's 16-bit counter then sample the counter every second to see many counts you've had. Or you could simply monitor the current going to the motor (e.g. with a 1-ohm resistor) and look at the commutator's pulses. That way the hardware is very easy. But it's difficult to get it to work if you're also using a pulsed speed controller.

    View Instructable »
  • ESP32-cam Standalone With Robot Arm

    Thanks. I really do like the ESP32cam. I see you work with ESP8266 - I bought one but haven't tried it yet. I'm so impressed with the idea of a camera in a small simple module like the ESP32cam. I've tried the Raspi camera but it seems like overkill for most projects.Now how about you putting an ESP32cam into your Squid Game doll ... ?

    Now you and I have to do something fun with it!

    Thanks. I try to write the sort of Instructables I would like to read. As you say: helpful information rather than a "project".Please do publish your project when it's finished. I'm quite impressed with the EPS32cam and I think a lot more people would use it when they see interesting Instructables.

    View Instructable »
  • Transistor Curve Tracer

    > it could be an error in the port to the NANO. How do you mean "port"? I'd expect the code to run exactly the same on both the Nano and ProMini. What differences did you find?> When i hit setup on the screen it often crashes and does not show any traces.From your photos, the screen seems to be working 100%. Are you doing something different when it crashes? Is it a loose wire?> the dac is sending out the correct values etc.It's 4 years since I wrote the code but, according to Step 5, the following commands can be sent from the PC to the curve tracer: Command 'A' nn: set DAC-A to the value nn (nn is a single byte) then return an 'A' to the PC. DAC-A controls the load voltage. Command 'B' nn: set DAC-A to the value nn then return a 'B' to the PC. DAC-B controls the bas…

    see more »

    > it could be an error in the port to the NANO. How do you mean "port"? I'd expect the code to run exactly the same on both the Nano and ProMini. What differences did you find?> When i hit setup on the screen it often crashes and does not show any traces.From your photos, the screen seems to be working 100%. Are you doing something different when it crashes? Is it a loose wire?> the dac is sending out the correct values etc.It's 4 years since I wrote the code but, according to Step 5, the following commands can be sent from the PC to the curve tracer: Command 'A' nn: set DAC-A to the value nn (nn is a single byte) then return an 'A' to the PC. DAC-A controls the load voltage. Command 'B' nn: set DAC-A to the value nn then return a 'B' to the PC. DAC-B controls the base/gate voltage. Command 'X': continuously send ADC values back to the PC. So you can use that to test both the outputs to the DACs and the inputs from the ADCs.Peter

    View Instructable »
  • ECG Display With Arduino

    The easiest answer is "try it and see". You're unlikely do to any harm to the circuit. (I say "unlikely" as I suppose you might have built up a static charge by walking on a nylon carpet. The Sparkfun board and the chip don't seem to have much static protection.)The datasheet says "In two-electrode configurations, RLD can be used to bias the inputs through 10MΩ resistors as described in the Leads Off Detection section. If left unused, it is recommended to configure A2 as a follower by connecting RLDFB directly to RLD." Unfortunately, you can't do that because the RLDFB pin of the chip isn't exposed on the PCB.The leads off detection works by sensing when either amplifier input voltage is within 0.5 V from the positive rail (3.3V). The Sparkfun board has 10M r…

    see more »

    The easiest answer is "try it and see". You're unlikely do to any harm to the circuit. (I say "unlikely" as I suppose you might have built up a static charge by walking on a nylon carpet. The Sparkfun board and the chip don't seem to have much static protection.)The datasheet says "In two-electrode configurations, RLD can be used to bias the inputs through 10MΩ resistors as described in the Leads Off Detection section. If left unused, it is recommended to configure A2 as a follower by connecting RLDFB directly to RLD." Unfortunately, you can't do that because the RLDFB pin of the chip isn't exposed on the PCB.The leads off detection works by sensing when either amplifier input voltage is within 0.5 V from the positive rail (3.3V). The Sparkfun board has 10M resistors to the positive rail. To stop leads off being reported you could add 10M resistors to ground at the RA and LA pins.I think that if you are just using 2 leads, you should leave RL disconnected. You'll probably get more noise that way.What RL does is to keep the user's body at a potential about half way between the gnd and 3.3V - e.g. at 1.6V. If RA and/or LA drift to gnd or 3.3V then the amplifier won't be able to see their signal. To keep RA and LA somewhere in between gnd and 3.3V, I'd suggest adding the 10M resistors I mentioned.If that fails, you could try connecting RA to gnd with a 1M resistor RA to 3.3V with a 1M resistor LA to gnd with a 1M resistor LA to 3.3V with a 1M resistorLet us know how you get on.Peter

    View Instructable »
  • ECG Display With Arduino

    As I said before: "Everything you've said makes it seem like you've not connected the output from the AD8232 module to the correct analog input of the Arduino. What pin are you using?"Which software are you using? Step 2 or Step 5? In Step 2, you'll see that the output from the AD8232 module is connected to A0. In Step 5, you'll see that the output from the AD8232 module is connected to A2. If the Aduino doesn't respond to changes to the ADC input then the Arduino is broken. But I doubt that is the case.Did you try going through any of the online Aduino ADC tutorials? They will test the ADC.The Nano and the Uno use the same IC so their ADCs are identical.

    View Instructable »
  • ECG Display With Arduino

    > i am still confused as to why the BPM aren't showing up on the screen. Does that box only appear when the arduino receives a signal Yes.> One more question: what kind of signal am i looking for in the plotter? I rarely work with it, so i'm not sure what to expect.You should see the typical ECG signal.> where exactly should i measure the voltage, On the output of the AD8232 module and also on the A2 input to the Arduino.> and what should it read? I don't remember. Probably between 1V and 2V

    View Instructable »
  • ECG Display With Arduino

    > the display shows the "disconnected lead" messagesTherefore either the leads are disconnected from the AD8232 module or the AD8232 module is disconnected from the Arduino.Did you build the circuit in Step 2? In other words, did you try it with LEDs?Try touching the leads together: Non touching: both LEDs lit LA touching RA: both LEDs lit LA touching RL: LO+ LED is off RA touching RL: RO- LED is offThat will tell you if the AD8232 module is working correctly.As I say: For the final circuit, remove the LEDs and connect LO+ and LO- to the Arduino. Don't leave the LEDs connected - the AD8232 pins won't go high enough for the Arduino inputs to register HIGH.> The screen shows a flatline at the very bottom of the displayThefore the ADC input to the Arduino is seeing zero v…

    see more »

    > the display shows the "disconnected lead" messagesTherefore either the leads are disconnected from the AD8232 module or the AD8232 module is disconnected from the Arduino.Did you build the circuit in Step 2? In other words, did you try it with LEDs?Try touching the leads together: Non touching: both LEDs lit LA touching RA: both LEDs lit LA touching RL: LO+ LED is off RA touching RL: RO- LED is offThat will tell you if the AD8232 module is working correctly.As I say: For the final circuit, remove the LEDs and connect LO+ and LO- to the Arduino. Don't leave the LEDs connected - the AD8232 pins won't go high enough for the Arduino inputs to register HIGH.> The screen shows a flatline at the very bottom of the displayThefore the ADC input to the Arduino is seeing zero volts.Once again, did you build the circuit in Step 2? In the Arduino IDE, select the Tools|SerialPlotter menu command. You should see a signal. That tells you that your module and Arduino are working.Can you check the voltage with a meter of oscilloscope? I thnk it's meant to be at an average of 1.5V - I can't remember but it will be something like that. Measure the voltage at both the module and at the Arduino. Try measuring it with the wire that connects them disconnected.At the start of ArdECG0.ino file, it saysconst int ECG_IN = A0;At the start of ArdECG1.ino file, it saysconst int ECG_IN = A2;Naturally, the pin number of the circuit you've built should match the pin defined in the INO file you're using.Peter

    View Instructable »
  • ECG Display With Arduino

    Thanks. I used to use headers so I could reuse components in later projects then I realised that Arduinos and displays and whatnot are so cheap I should just treat them as consumables. A new project means a brand new Arduino and display. It feels immoral somehow - it's a computer and computers are valuable, right? The first computer I programmed was about as powerful as an Arduino; it filled a room and weighed 10 tons.

    View Instructable »
  • "Astronomical" Clock

    I too look forward to my next project. It's taking much, much longer than I expected. It involves machine vision for robotic assembly and that is a hard problem.Ankaŭ mi antaŭĝojas pri mia venonta projekto. Ĝi daŭras multe, multe pli longe ol mi atendis. Ĝi implikas maŝinvizion por robota asembleo kaj tio estas malfacila problemo.

    View Instructable »
  • ECG Display With Arduino

    In the reply to mwhittle below, I discuss how to use resistors to create the different "average" values.

    View Instructable »
  • Transistor Curve Tracer

    I don't know which PCB layout you're using. There are a few variants around.If you look at the circuit in Step 3 you'll see that, for instance, Q3 connects toE - R37C - 12VB - R31If you look at my layout in Step 7 you'll see that Q3 connects topin 1 - R37pin 2 - 12Vpin 3 - R31Which implies that for my layoutE - pin 1 C - pin 2 B - pin 3 You'll have to look at the gerbers for your pcb or trace the actual pcb tracks. If the pads are in the wrong order, the usual remedy is to rotate the transistor through 120deg or flip it upside down.It's annoying my layout is odd. I must have taken a random PNP out of the library (e.g. BC847R is different from the "normal" pinout and BC182L is different again). Even the pin numbering (1 2 3) is not standardised between manufacturers. I never had …

    see more »

    I don't know which PCB layout you're using. There are a few variants around.If you look at the circuit in Step 3 you'll see that, for instance, Q3 connects toE - R37C - 12VB - R31If you look at my layout in Step 7 you'll see that Q3 connects topin 1 - R37pin 2 - 12Vpin 3 - R31Which implies that for my layoutE - pin 1 C - pin 2 B - pin 3 You'll have to look at the gerbers for your pcb or trace the actual pcb tracks. If the pads are in the wrong order, the usual remedy is to rotate the transistor through 120deg or flip it upside down.It's annoying my layout is odd. I must have taken a random PNP out of the library (e.g. BC847R is different from the "normal" pinout and BC182L is different again). Even the pin numbering (1 2 3) is not standardised between manufacturers. I never had any of the boards made.Peter

    I wouldn't worry about using BC639s. They're just what I happened to have handy. Any NPN that can take 12V and 120mA will be fine.Watch out for the pinouts of whatever transistors you use. My SMD layout assumes the base is pin 3 of SOT23 but many manufacturers use pin 1. (I think maybe BC639s are not made in SO23.) You're using a different board from amr101dm - right?From your description of your problems, it sounds to me as though there's a fault in the PCB - a broken track or two tracks touching.I suggest you use the code in Step 5 to test the board thoroughly before you start replacing components.Peter

    View Instructable »
  • Transistor Curve Tracer

    That's really nice. So the Transistor-Tester tests the component and tells the Curve-Tracer that it's a NPN and which pins are EBC. The Curve-Tracer sets up the relays and draws the curves.Right?Now I guess you can get rid of the 2-line LCD and make the Curve-Tracer display the part-kind and the pinout and other information like resistance/capacitance/inductance. You could alter the Main Menu screen so it shows you the component in its correct position.

    This is a very complicated project for someone who's just starting.Step 2 tells you how the circuit works and the sort of voltages you should see.Step 5 tells you how to send commands from a PC to the Arduino to set the voltages of the DACs and read the voltages of the ADCs. Use a meter to check the voltages you're actually getting versus what the Arduino thinks they are.

    View Instructable »
  • Transistor Curve Tracer

    If it were me, I'd write a program in the Arduino to test the circuit. Send a serial command from a PC to set the output voltage of a DAC then use a meter to check that the DAC is doing the right thing. Check the voltages at the terminals of Q1, Q2 and Q3.Then get the Arduino to report back to the PC the voltages that it's seing at its inputs.Are you able to write Arduino code?Or do you have an oscilloscope to check the various voltages?If not, maybe you could try running the code in Step 5 and see if what it's doing makes sense to you.Peter

    Did you eventually get Kübbeler's Transistor-Tester to send the information over a serial line? You are planning to have two Arduinos - right? One for the Curve-Tracer and one for the Transistor-Tester? In Step 7 I suggest doing that. I'm surprised it's as difficult as you found it. Can't you just transmit the text that would normally go to the 2-Line LCD?Putting both sets of software into one arduino would be hard work. You seem to be saying you want to use the same 3 pins for the Curve-Tracer and the Transistor-Tester. I think that would be much harder. Maybe you coud use an analogue switch like the DG442.Although I talked about doing it, I already own a LCR-T4 tester so I seemed like a lot of work for little benefit.Peter

    View Instructable »
  • Transistor Curve Tracer

    Is that the same as the LCR-T4 tester? How are you combining the Transistor-Tester software and Curve-tracer software? Do you use separate pins for the two functions?

    View Instructable »
  • ECG Display With Arduino

    It seems that there is no agreed standard. As I said in Step 2 "With the module I bought, ... Yours may be coloured differently". And I explained how to tell which is which.The AHA (American Heart Association) says:Right Arm WhiteLeft Arm BlackLeft Leg RedBut the IEC (International Electrotechnical Commission) agrees with your wife:Right Arm RedLeft Arm YellowLeft Leg Green Neither agrees with what the Chinese company sent me!I'm glad you got yours working. It looks good in the photo.

    View Instructable »
  • Speech Recognition With an Arduino Nano

    > const int AUDIO_IN = A7;> Should I change itYes. Sorry about that mistake.> how you connected the MAX9814 to a microphone boom? I just taped the whole MAX9814 module onto the boom of an old headset. So I was still using the module's own microphone.Please let me know how you get on. As I said in the introduction, this an "experimental" project - something for you to work on and improve.

    View Instructable »
  • ECG Display With Arduino

    I looks like one of the libraries is missing.

    DrawBox, ILI9341SetCursor and so on are in the SimpleILI9341 library which can be downloaded in Step 5.

    View Instructable »
  • ECG Display With Arduino

    You can download the code in Step 5.

    View Instructable »
  • Signal Generator AD9833

    I have added your design as a new Step. Please let me know if you'd like me to change anything.Peter

    View Instructable »
  • ECG Display With Arduino

    > atrial fibrillation ... It would be interesting to see when another episode is coming.Does that mean 24-hour monitoring? Software to spot the symptoms? An interesting project.> "It's running off 4 AA cells or a single Lithium cell for goodness sake - how dangerous can it be?" Somewhere in the comments, someone talked about a person being injured by a multimeter. It's hard to imagine. Apparently they poked the prongs through their skin. I guess skin resistance in the main barrier to hurting yourself with a small battery. How million many garage mechanics touch 12V wires every day without noticing?I have discussions with one of my clients who'll say things like "what if a child jumps across the desk and licks the microphone?".I have an old ECG machine from the 19…

    see more »

    > atrial fibrillation ... It would be interesting to see when another episode is coming.Does that mean 24-hour monitoring? Software to spot the symptoms? An interesting project.> "It's running off 4 AA cells or a single Lithium cell for goodness sake - how dangerous can it be?" Somewhere in the comments, someone talked about a person being injured by a multimeter. It's hard to imagine. Apparently they poked the prongs through their skin. I guess skin resistance in the main barrier to hurting yourself with a small battery. How million many garage mechanics touch 12V wires every day without noticing?I have discussions with one of my clients who'll say things like "what if a child jumps across the desk and licks the microphone?".I have an old ECG machine from the 1960s. There's no way that would pass muster today. Perhaps we were all tougher back then.Peter

    View Instructable »
  • Transistor Curve Tracer

    Hello - Happy New Year.I think it may be better if you looked at TiberioV in the "I Made This Project" section above. He uses through-hole components. (Personally, I prefer SM. You don't have to keep turning the board over. 0603 parts are fine when you get used to them.) TiberioV has published his gerbers. pierrotlalune67, Pierre-Yves Noyal, amr101dm and ralleeiner also have pcb layouts which they will share. (See the comments below)I recall that it's hard to find transistors that match the pin numbers for Q1, Q2, Q3 in my gerber.> do you have a BOM I could use?I didn't build a surface-mount version. Just through hole. And I never made a BOM - I just grab things out of my boxes of components.> the HT7533 and HT7550 are unobtanium everywhere There's nothing special about th…

    see more »

    Hello - Happy New Year.I think it may be better if you looked at TiberioV in the "I Made This Project" section above. He uses through-hole components. (Personally, I prefer SM. You don't have to keep turning the board over. 0603 parts are fine when you get used to them.) TiberioV has published his gerbers. pierrotlalune67, Pierre-Yves Noyal, amr101dm and ralleeiner also have pcb layouts which they will share. (See the comments below)I recall that it's hard to find transistors that match the pin numbers for Q1, Q2, Q3 in my gerber.> do you have a BOM I could use?I didn't build a surface-mount version. Just through hole. And I never made a BOM - I just grab things out of my boxes of components.> the HT7533 and HT7550 are unobtanium everywhere There's nothing special about them. Any 3.3V and 5V linear regulators would do instead.> would you suggest as a better performing replacement for the horrible LM358? > I was actually looking at the MC34072A or LM7322QMAX, what do you think?They should work well. mausi_mick used TCA0372.It's really worth reading the 200-plus comments below (and the comments in "I Made This Project") as other people make suggestions of improvements.Peter

    View Instructable »
  • Signal Generator AD9833

    Thanks for the files. I'm beginning to write an extra Step.The schematic is rather small and hard to read. Can you send a bigger one please.And do you have a photo?> You copy freq-Low to freq. High, but delete the old High-freq.Is it right ?I can't remember how the code works and I'm a bit busy with Christmas just now. Could it be that I am treating the High and Low variables as a queue - if you send N values, the latest two become High and Low?Peter

    View Instructable »
  • Signal Generator AD9833

    Do you want me to add your design as an extra "step"?I'll need a schematic, the code, a photo and maybe some text.Or could you write your own Instructable?I can't remember if you have my email address. Just google for peterbalch.

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    If the software hangs in the call to endTransmission() it's probably stuck in the loop in twi_writeTo() in twi.c: while(TWI_READY != twi_state){ continue; }It seems that maybe SPI isn't implemented properly in the LGT8F328D. If you google "lgt8f328p spi bug", you find some discussions.The easiest solution is to try it with a "real" Arduino.Or you could switch to software SPI. There are several libraries available and they're probably fast enough.Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    What is a LQT8F32BP ?When you downloaded the "SimpleSH1106" library, It came with a sample program to test the software. Did the sample code work?

    View Instructable »
  • Signal Generator AD9833

    That's a good way of doing it. Does it run off a battery?If you want to send me the code, the circuit and a photo, I could add it to the instructable as another Step.

    View Instructable »
  • A Walking Robot That's Easy to Build

    Step 9 (above) explains how you use the Servo18.exe Windows program to write a gait-table to a file (usually called Gaits.h).You the use the gait-table file when you compile your own sketch. Quad3.ino is a sample sketch.Peter

    View Instructable »
  • A Walking Robot That's Easy to Build

    I'd like to post a video but I've stripped down the robot to rebuild it with new servos. The old servos I chose were really poor quality. The new ones have slightly different splines so the old servo arms don't fit and I'm having to make everything again from scratch.Which leg movements are you talking about? Which Step?

    View Instructable »
    • A Walking Robot That's Easy to Build
      1,717 views
      22 favorites
      2 comments
  • LCD COG for an Arduino Nano

    That is weird.Is any non-zero number ending in 0 not displayed?

    View Instructable »
  • Transistor Curve Tracer

    Your LCD has a parallel interface and so needs 8 data pins plus 4 or 5 control pins.My circuit needs 4 ADC inputs (plus optionally 2 more to check the battery voltages) and 3 pins to control the DAC. So using your LCD that's a total of 19 or 20 pins (plus optionally 2 more to check the battery voltages).An Arduino Uno has 20 free pins so it should be possible.Your LCD needs completely different software and to read the touch screen so you'll have lots of work to do. I think that your touch screen sends an analogue signal to the Arduino which seems to give some people trouble with the libraries they've used.I've always avoided parallel interface LCDs because the need so many pins. Good luck.Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    > is some sort of circular problem, linked to voltmeter and supply voltage, because is using the 5V as reference,Not really.You can connect the ADC input to the 1.1V Bandgap reference while using the "5V" as a reference. You set the MUX pins of the ADMUX register to 1110. So you can measure the good 1.1V using the bad "5V" reference. Then you can do the maths to work out the actual voltage of the "5V" or the "3.3V" supply or whatever reference you're using.Peter

    View Instructable »
  • Transistor Curve Tracer

    I don't know whether you can compile Delphi4 with the Delphi7 IDE or how hard it is to make the neccessary changes.If you send me a personal email I'll send you the source - you'll find me easily via google. (I don't want to upload the code to Github because I don't want to have to maintain it or support it.)Peter

    View Instructable »
  • Transistor Curve Tracer

    > If I may, one more question - do you plan to publish the source code of the application for the PC? I don't mind uploading it to Github but it's written in Delphi 4 and might rely on other 3rd-party components. What do you use for Windows programming?> I would like to be able to set the minimum and maximum base current from the PC program.I could tweak this function a little myself....You want to make the PC program (CurveTracer.exe) send commands to the Arduino to set the minimum and maximum base currents or gate voltages? So setting the values of MinIbase, MaxIbase, MinVgate and MaxVgate.Right?> PS: In a function int GetJfetPinchOff(TkindDUT kind) in line:Thanks. I've changed it and uploaded the new version. Can you download it and check it works for you please.Peter

    View Instructable »
  • Transistor Curve Tracer

    You're right - it is a bit of a puzzle.The previous Print is Vce in mV i * 1000 * (R2 + R1)*AdcVref / ADC_MAX / R1Which makes sense: i is the reading from the ADC; scale it with the voltage divider (R2+R1)/R1; multiply it by the ADC ref voltage (5V); divide by 1024 (the ADC max); multiply by 1000 to get mV.j is the ADC reading for Vcc minus the ADC reading for Vce. So the voltage across the resistor R3 (in Volts) is j * (R2 + R1)*AdcVref / ADC_MAX / R1so the current through R3 (in Amps) is j * (R2 + R1)*AdcVref / ADC_MAX / R1 / R3But we want it as an integer (in 100s of uA) so multiply by 10000 j * (R2 + R1) * 10000*AdcVref / ADC_MAX / R1 / R3However the Arduino code says j * (R2 + R1) * 48000 / R3 / R1 / ADC_MAXSo I'd replaced 10000*AdcVref with 48000. AdcRef is 5 so I ought to have…

    see more »

    You're right - it is a bit of a puzzle.The previous Print is Vce in mV i * 1000 * (R2 + R1)*AdcVref / ADC_MAX / R1Which makes sense: i is the reading from the ADC; scale it with the voltage divider (R2+R1)/R1; multiply it by the ADC ref voltage (5V); divide by 1024 (the ADC max); multiply by 1000 to get mV.j is the ADC reading for Vcc minus the ADC reading for Vce. So the voltage across the resistor R3 (in Volts) is j * (R2 + R1)*AdcVref / ADC_MAX / R1so the current through R3 (in Amps) is j * (R2 + R1)*AdcVref / ADC_MAX / R1 / R3But we want it as an integer (in 100s of uA) so multiply by 10000 j * (R2 + R1) * 10000*AdcVref / ADC_MAX / R1 / R3However the Arduino code says j * (R2 + R1) * 48000 / R3 / R1 / ADC_MAXSo I'd replaced 10000*AdcVref with 48000. AdcRef is 5 so I ought to have said 50000 rather than 48000.I don't know why I did that. (Sorry - I wrote the code three and a half years ago!)Maybe I measured the actual current and found I needed a correction factor.I think you should substitute j = j * (R2 + R1) * 10000*AdcVref / R3 / R1 / ADC_MAX; // convert j to 100s of uAfor the original line j = j * (R2 + R1) * 48000 / R3 / R1 / ADC_MAX; // convert j to 100s of uAThe most important point is that you don't need to make any further changes to the code due to you changing your resistor values.I'm surprised I didn't write code to check the actual value of AdcVref. I just assume it's 5V. I could have measured it using the internal 1.1V reference. Instead I just assume that if the battery is good then the 5V reference will be good.Peter

    View Instructable »
  • ECG Display With Arduino

    But it will not now report if the leads are off. I suppose it's obvious if RA or LA comes off but what about RL?

    View Instructable »
  • ECG Display With Arduino

    I don't understand why a bigger signal would make a difference. Is it to do with "Lead Off"?Maybe not call CheckLeadsOff() if it's "stopped":if (! Stopped) CheckLeadsOff();

    View Instructable »
  • ECG Display With Arduino

    The STOP button should work in all three modes (did you try it?) but I suppose it's really only useful in the Large Display mode.It's annoying it needs another button. How about if there were an extra mode: Large display Large display Stopped Small display Poincaré displayIt might be enough just to change line 58 intoenum TMode { mdLargeECG, mdLargeECGStopped, mdSmallECG, mdPoincare, mdBattery } mode = mdLargeECG;

    Can you write Arduino C code? Try adding some print statements to see how Stopped and Stopping are changing.Here's a new version.

    View Instructable »
  • ECG Display With Arduino

    That looks good. what battery did you use?Rubber bulb electrodes eh? How well do they work? How long before they fall off. I have an ancient ECG from the 1950s (from a car-boot sale) with bulb electrodes. I ought to try them.

    That's a good idea - a second button for "freeze".Are you able to write Arduino C programs? I've made some changes to ArdECG1.ino to give ArdECG2.ino. I don't have time to test it now as I'm in the middle of another project but maybe you could test it.In ArdECG2.ino there's a second button which connects A4 to ground. When the button is pressed, Stopping is set to true. When the display reaches the end of the display line, Stopped is set true. Search the sketch for "BUTTON_STOP", "Stopping" and "Stopped" to see how they're used. I've attached a file to this Reply but I don't know whether Instructables allows attachments here.

    View Instructable »
  • LCD COG for an Arduino Nano

    In a font, a descender is the portion of a letter that extends below the baseline of a font.In SimpleUC1701.h, fonts are stored in PROGMEM (i.e. flash) memory.SmallFont characters are 8 pixels high so a 3-pixel wide character occupies 3 bytes. LargeFont characters are 16 pixels high so a 3-pixel wide character occupies 6 bytes (words are little-endian).If you look at the examples given, you'll see, for instance, that MediumFont[] begins like this 15, // size; should be 7 or 15 4, // descender ' ', //first char 5, 0,0,0,0,0,0,0,0,0,0, // space 1, 160,255, // !The DrawChar() function reads and draws font characters from the font stored in PROGMEM. Look at DrawChar() in SimpleUC1701.cpp.In the font, the first byte is the height of the whole font (ascenders and descenders). It is assigne…

    see more »

    In a font, a descender is the portion of a letter that extends below the baseline of a font.In SimpleUC1701.h, fonts are stored in PROGMEM (i.e. flash) memory.SmallFont characters are 8 pixels high so a 3-pixel wide character occupies 3 bytes. LargeFont characters are 16 pixels high so a 3-pixel wide character occupies 6 bytes (words are little-endian).If you look at the examples given, you'll see, for instance, that MediumFont[] begins like this 15, // size; should be 7 or 15 4, // descender ' ', //first char 5, 0,0,0,0,0,0,0,0,0,0, // space 1, 160,255, // !The DrawChar() function reads and draws font characters from the font stored in PROGMEM. Look at DrawChar() in SimpleUC1701.cpp.In the font, the first byte is the height of the whole font (ascenders and descenders). It is assigned to sz.The second byte is the height of the descender. It is assigned to desc.The third byte is the ASCII code for the first character in the font.Then come the bytes for each font. First in the width of the character then come the pixels for the character.

    View Instructable »
  • Transistor Curve Tracer

    > I have no more credit card.Maybe you can find a friend to buy stuff on your behalf.> tft 2.4" SPI, but no touch function. > 3.2" (model:YX32B) has touch, but NOT SPI. can I still use these?The YX32B needs lots of pins - is it a 16-bit parallel interface? The Arduino just doesn't have enough pins.It would be easier to change the program to use push-buttons rather than a touch screen. But if you're not a programmer then you're stuck with just copying the project as it is.If all you are wanting is to match JFETS then google for "match jfets circuit".There are lots of simple circuits that will do an approximate match.Or you can google "matching jfets phaser guitar" for dicussions of how important matching is.Good luck Peter

    View Instructable »
  • Oscilloscope in a Matchbox - Arduino

    > external horizontal channel?So you can do Lissajous figures?That's a nice idea but it would require a big re-write of the display part of the sketch.It's a couple of years since I wrote the code but if I recall correctly:The sketch collects 128 ADC values into the ADC buffer.The Arduino doesn't have enough memory for a screen-buffer, so it writes directly from the ADC buffer onto the screen.There might be enough memory to buffer maybe 300 x-values and y-values. So you collect 300 xy-values then blank the screen then draw them to the screen then maybe pause a little while so the user can see the screen then do it again.The pause is needed otherwise the screen will flicker badly.You don't get flicker with the current code because it doesn't blank the whole screen then redraw it. It jus…

    see more »

    > external horizontal channel?So you can do Lissajous figures?That's a nice idea but it would require a big re-write of the display part of the sketch.It's a couple of years since I wrote the code but if I recall correctly:The sketch collects 128 ADC values into the ADC buffer.The Arduino doesn't have enough memory for a screen-buffer, so it writes directly from the ADC buffer onto the screen.There might be enough memory to buffer maybe 300 x-values and y-values. So you collect 300 xy-values then blank the screen then draw them to the screen then maybe pause a little while so the user can see the screen then do it again.The pause is needed otherwise the screen will flicker badly.You don't get flicker with the current code because it doesn't blank the whole screen then redraw it. It just blanks a column at a time.Peter

    > Wouldnt a built in sig gen and external horizontal be useful? It has a sig gen. Do you mean connecting the internal sig gen to the x-axis?Why?When I was at school I thought Lissajous figures were really coll. But I've never needed them for real work.

    View Instructable »
  • Transistor Curve Tracer

    The MCP4802 is an 8-bit DAC controlled by SPI.The PCF8591 contains a DAC and four ADCs and is controlled by I2C. I presume it uses completely different commands.I've never used a PCF8591 but it looks like a nice chip. It looks like it would work well in the circuit.Do you have the programming skills to make the changes?

    Yes probably a couple of days. Why can't you order the MCP4802 - there seem to be lots on eBay, Alibaba, Mouser, Digikey, etc.

    View Instructable »
  • Peter Balch commented on Peter Balch's instructable MIDI Drum Machine
    MIDI Drum Machine

    It's going to take a little time. I gave the drum machine to a friend. Sorry.If you're just wanting to know how the MIDI output sounds, google forVS1053 midiand hit Videos. The quality will depend more on the amp and speakers (and microphone) than on the VS1053. I used a PAM8403 amp which is pretty dreadful (but I happened to have a box full of the modules from a previous project). As you say, an analog amp would be better.

    View Instructable »
  • 24-hour World Clock

    I hadn't thought of it as a ham clock - but, of course, that's just what it is.That's an interesting variation you made. Is the hour-number ring mounted on a clear plastic disk?Should I modify my program so it can print the Southern hemisphere without the "lobes".

    View Instructable »
  • Peter Balch's entry 24-hour World Clock is a winner in the Maps Challenge contest
  • Peter Balch's entry 24-hour World Clock is a finalist in the Maps Challenge contest
  • Peter Balch's instructable 24-hour World Clock's weekly stats:
    • 24-hour World Clock
      10,924 views
      126 favorites
      27 comments
  • 24-hour World Clock

    Under Windows:Right click on the image. Click on Save Image As. Select a filename and folder (e.g. the desktop).Double click on the saved file to display it or start the Windows Paint editor.Select Print - usually Control-P.A dialog appears - click Preferences. Then click Effects. There are settings for Resizing.That's for Windows; the details will vary according to the Windows version. I don't know how to do it on a Mac.It would be much better to download some free photo-editing software.I hope that helpsPeter

    The sample map in Step 3 is cropped to be printed on 8"x6" paper. If you want other maps, you could use my software which you can download as described in Step 1. You can use it with any Mercators or Millers map.My software might be your best option for custom printing.

    I see. So would it act as your GPS display on Christmas Eve?

    View Instructable »
  • 24-hour World Clock

    What a nice idea. You show where Santa currently is in the world.Or leave out the gap at the equator - just a complete world map. Hide a clock behind. Fix a magnet onto the hour hand of the clock. Santa's sleigh is magnetic and is magically moved around.

    Have you downloaded it? (Right-click and Save Image As).What photo-editing or image-processing software are you using? How do you print pictures normally?I drew the image high-resolution so it would print well with an in-store photo printer. Maybe you could google for "free photo editor" and find something to resize it.Windows built-in picture viewer allows you to select the print size (as a percent) and so does Windows image editor.

    View Instructable »
  • Signal Generator AD9833

    Adding a TDA2030A is a good idea. The TDA2030A is AC coupled, isn't it? And there's some sort of filtering on the feedback. Presumably that limits the frequency range of the signal generator?

    View Instructable »
  • Transistor Curve Tracer

    The zip file contains an exe and several source files. The source files are plain text so cannot contain a virus.I've downloaded the zip from this site and compared the exe with my original and they're identical. My virus checker doesn't find any virus in either copy.Is you anit-virus software just complaining that he zip file contains an exe? Not that the exe contains a virus?

    View Instructable »
  • ECG Display With Arduino

    The initialisation for a larger screen will be slightly different. You'll find my initialisation commands in ILI9341Begin(). You should match the bytes I'm sending with the register addresses in the ILI9341 chip documentation. It's worth looking at other libraries on GitHub, Adafruit, etc. to see what initialisation they're doing.A larger screen might be a little slower but I expect it will be OK.

    View Instructable »
  • Transistor Curve Tracer

    The LM358 op-amps I used are pretty poor: they don't go rail-to-rail and they're low current. If you could find a 12V rail-to-rail op-amp that will supply 200mA that would be better. Maybe using audio amp (speaker driver) chips?I'm not sure about the way I did the FET curve tracer. Maybe you can think of a better way.And, as I say in Step7, it would be nice to incorporate an LCR-T4 tester.Good luck (and write an Instructable when youre done)!Peter

    View Instructable »
  • ECG Display With Arduino

    I used a Chinese module. Does yours look like mine?> with your project i get only a straight lineIs that with the circuit and sketch of Step 2?You need to test the circuit with an input signal into the A0 pin of the Arduino. If you don't have a signal generator, then just disconnect the AD8232 module and touch the Arduino pin with your finger. You should see a change in the graph (Tools|SerialPlotter menu command).If there's a change in the graph then the problem is probably with the AD8232 module. If there's no change then the problem is with the Arduino.

    View Instructable »