author
11Instructables245,708Views32CommentsTexasJoined May 27th, 2015
These Arduinos are driving me up the wall.

Achievements

10K+ Views Earned a bronze medal
  • dmjlambert's instructable Arduino ICSP Programming Cable's weekly stats: 11 days ago
    • Arduino ICSP Programming Cable
      78 views
      0 favorites
      0 comments
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple2 months ago
    HV Rescue Simple

    I had a brief look at the data sheet for the ATmega32. When I compare the parallel programming sections of the data sheets for ATmega32 and ATmega328P I notice they are very similar, but there are differences in how to go into programming mode. On the ATmega328P all you do is set 4 pins low, power the target VCC at 5V and a short time later bring RST high to 12V. On the ATmega32 there is a more complex way described where you bring RST low and toggle XTAL1 at least 6 times, then set 4 pins low and bring RST high to 12V. I don't believe the provided sketch for programming does those elaborate steps. However, it is interesting that the data sheet mentions an alternate way of going into programming mode of powering the target VCC at 5V and simultaneously bring RST high to 12V, us...

    see more »

    I had a brief look at the data sheet for the ATmega32. When I compare the parallel programming sections of the data sheets for ATmega32 and ATmega328P I notice they are very similar, but there are differences in how to go into programming mode. On the ATmega328P all you do is set 4 pins low, power the target VCC at 5V and a short time later bring RST high to 12V. On the ATmega32 there is a more complex way described where you bring RST low and toggle XTAL1 at least 6 times, then set 4 pins low and bring RST high to 12V. I don't believe the provided sketch for programming does those elaborate steps. However, it is interesting that the data sheet mentions an alternate way of going into programming mode of powering the target VCC at 5V and simultaneously bring RST high to 12V, used in certain circumstances to reprogram the fuses. So, with all that said, I suggest just try it and see what you get. If you need to remove the delay between the time VCC gets power and RST gets 12V, that should be an easy fix in the sketch. But it could be the sketch as-is provides close enough to simultaneous applying of voltages to accomplish entering programming mode. You'll have to study the data sheets to figure out the wiring.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple2 months ago
    HV Rescue Simple

    The concept is to use the transistor as a switch. At the sketch's command, it starts conducting and shorts the 12V signal to ground. The 12V signal goes through a 1K resistor, so that limits the amount of current you are sending to ground to a few milliamps.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple2 months ago
    HV Rescue Simple

    Yes, emitter should be grounded to the Arduino GND. And 2N2222A should be fine. If you always get 12V at the RESET pin of the target MCU then your transistor circuit is not working. Yes perhaps the base does not get 5V so the transistor does not turn on. 2N2222 comes in a variety of packages, and the pinout depends on whether it is the metal can package like you show a picture of, or the plastic package, and there is a variant of the plastic package with different pinouts if the part number begins with P, as in P2N2222A. So it is easy to get the transistor wiring wrong with transistors that come in different configurations like that. Or you could have a bad transistor, bad resistor or incorrect values, bad breadboard, etc. NOT(12V_EN) means 12V is "enabled" going...

    see more »

    Yes, emitter should be grounded to the Arduino GND. And 2N2222A should be fine. If you always get 12V at the RESET pin of the target MCU then your transistor circuit is not working. Yes perhaps the base does not get 5V so the transistor does not turn on. 2N2222 comes in a variety of packages, and the pinout depends on whether it is the metal can package like you show a picture of, or the plastic package, and there is a variant of the plastic package with different pinouts if the part number begins with P, as in P2N2222A. So it is easy to get the transistor wiring wrong with transistors that come in different configurations like that. Or you could have a bad transistor, bad resistor or incorrect values, bad breadboard, etc. NOT(12V_EN) means 12V is "enabled" going to the reset pin if the base voltage is NOT high. Send 0V to the base and it turns off the transistor, and the transistor stops shorting the 12V signal to ground. Send 5V to the base and it turns on the transistor, and the transistor conducts, effectively shorting the 12V signal to ground.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple2 months ago
    HV Rescue Simple

    Hi I don't know what you mean by "at the standby".The idea of this high voltage programming is 12V is applied to the reset pin of the target MCU during the very brief period that programming is happening, to read or write the fuses. 12V is not applied to the reset pin all the time. The transistor keeps the 12V signal from the battery grounded and effectively at 0V most of the time, and the sketch turns off the transistor for a brief period to allow the 12V to flow to the target MCU reset pin and do the fuse reading or writing. I mention in the last paragraph of the instructable that programming happens very quickly, but if you want to "see" the 12V signal with a multimeter you can add a delay to the sketch and monitor the reset pin voltage with your multimeter....

    see more »

    Hi I don't know what you mean by "at the standby".The idea of this high voltage programming is 12V is applied to the reset pin of the target MCU during the very brief period that programming is happening, to read or write the fuses. 12V is not applied to the reset pin all the time. The transistor keeps the 12V signal from the battery grounded and effectively at 0V most of the time, and the sketch turns off the transistor for a brief period to allow the 12V to flow to the target MCU reset pin and do the fuse reading or writing. I mention in the last paragraph of the instructable that programming happens very quickly, but if you want to "see" the 12V signal with a multimeter you can add a delay to the sketch and monitor the reset pin voltage with your multimeter. If you can't get the process to work or can't get consistent results, it could be you have a bad MCU that you are trying to program. The circuit does not fix broken parts, but it will "rescue" you from fuse settings that prevent normal programming, such as when you previously (and intentionally) set the fuses to disable ICSP programming or to disable the reset pin. I would call this a medium difficulty project, because although there are very few parts, there is a lot of wiring. Chances for wiring mistakes are high, if not being very careful and if not using stick-on labels for guidance.

    View Instructable »
  • How to Unlock Digispark ATtiny85 and Convert It to a Trinket

    I read the datasheet for the processor ATtiny85 or whatever processor I'm using, and search the internet for answers. Adafruit who is the creator of the trinket, and Digistump who is the creator of the similar Digispark have information on their websites and possibly forums, and there is the arduino.cc website forum that is popular to search and get examples. One of my Instructable articles is about storing a button selection in EEPROM. Other people probably have better Instructables than me, as mine are getting outdated and I have not been keeping up with my knowledge in this area. My projects are often very simple and do not involve all the features of the processors I use.

    It is just a preference, You can set whichever fuses you wish during this programming. Depending on project requirements I may want that fuse set so I preserve the contents of the EEPROM.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple5 months ago
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple1 year ago
    HV Rescue Simple

    It may be. This is fairly simple, but a lot of wiring that is easy to get mixed up, so it could also be your wiring. This project lets you rescue an MCU from a situation where you previously used fuse settings that prevent it from being programmed further, but not rescue an MCU from an unknown condition or accidental damage. So the best thing to do is prove the wiring by HV programming a known-good MCU.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple1 year ago
    HV Rescue Simple

    Hi, I don't know about the atmega8515. It would probably work. Refer to the data sheet for the atmega8515 where it talks about parallel programming pin mapping, and fuses, connect it and try programming it. The brief look I had at the data sheet makes me think it would work fine.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple1 year ago
    HV Rescue Simple

    You can intentionally set fuses to unusual values including things like disabling reset or disabling ISP, and then use HV programming to set the fuses back to normal to allow further programming. But if something was done to actually damage the MCU, you probably can't recover from that, and must replace the MCU.

    View Instructable »
  • Bluetooth Serial Adapter for Pro Mini

    I have not found it a problem to have the connections near the antenna. In theory, it may be a problem if you are looking at getting the absolute maximum range out of the module.These cheap bluetooth modules can be used at any typical speed, but they must be programmed to use one specific speed between the module and the Arduino, and manually reprogrammed each time you want to use a different speed. So, the speed your sketches work with must be the same as the speed the bootloader works with, if you want to use the bluetooth for both programming and then immediate interaction with your sketch via the serial monitor. For example, if you are programming a typical 16 MHz Pro Mini that has a 57600 BPS bootloader, and your sketch interacts with you at 57600 also, you will find this ada...

    see more »

    I have not found it a problem to have the connections near the antenna. In theory, it may be a problem if you are looking at getting the absolute maximum range out of the module.These cheap bluetooth modules can be used at any typical speed, but they must be programmed to use one specific speed between the module and the Arduino, and manually reprogrammed each time you want to use a different speed. So, the speed your sketches work with must be the same as the speed the bootloader works with, if you want to use the bluetooth for both programming and then immediate interaction with your sketch via the serial monitor. For example, if you are programming a typical 16 MHz Pro Mini that has a 57600 BPS bootloader, and your sketch interacts with you at 57600 also, you will find this adapter is very much like using a wired serial adapter. You will notice it does not matter what speed you set the computer's comm port to in the serial monitor, because that speed is only for communication between your computer and it's built in bluetooth adapter. The speed you set your computer's comm port to is really not used at all, since the computer's bluetooth adapter should be using an internal USB connection and only partially emulating a serial port. The speed in that part of the communication between the computer and its bluetooth adapter, and also over the air between bluetooth modules happens as fast as possible and at rates much higher than typical serial speeds. For dynamic speed change that changes at the Arduino end when you change the speed of the port on your computer, you would need a fancier and more expensive bluetooth module such as an Adafruit Bluefruit module.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple1 year ago
    HV Rescue Simple

    Yes, at the bottom of step 1 is the download of zip file with the sketch and schematic.

    View Instructable »
  • Arduino Nano ATmega238P/CH340G V3.0 PCB Layout

    Yes, it looks like you found a mistake. That is not my schematic, it is a link on the Internet to somebody's blog. That is a good thing to be aware of, thanks for pointing it out.

    View Instructable »
  • dmjlambert commented on dmjlambert's instructable HV Rescue Simple2 years ago
    HV Rescue Simple

    I have not yet programmed an SMD chip with HV programming, so I don't have experience to guide you. Besides just freeing up the reset lead on the chip, you may also need to remove the connection to the crystal, because I recall that one of the connections you need to make from the programmer to the chip is one of the XTAL pins. You should be able to put a soldering iron on the extra pins you need that are not already available around the perimeter of the board and lift the pin off the trace by inserting an X-acto knife under the pin and lift it carefully. Then solder a flying lead onto that pin. That is a wire that you solder directly to the pin of the chip. I believe you are in for some SMD work and may need a soldering iron with a sharp tip, a magnifying glass, and a steady ...

    see more »

    I have not yet programmed an SMD chip with HV programming, so I don't have experience to guide you. Besides just freeing up the reset lead on the chip, you may also need to remove the connection to the crystal, because I recall that one of the connections you need to make from the programmer to the chip is one of the XTAL pins. You should be able to put a soldering iron on the extra pins you need that are not already available around the perimeter of the board and lift the pin off the trace by inserting an X-acto knife under the pin and lift it carefully. Then solder a flying lead onto that pin. That is a wire that you solder directly to the pin of the chip. I believe you are in for some SMD work and may need a soldering iron with a sharp tip, a magnifying glass, and a steady hand.

    View Instructable »
  • How to Restore the Arduino UNO R3 ATmega16U2 Firmware Using the Arduino IDE

    This was written with 1.6.5 or 1.6.6 The instructable is now outdated, so I may just delete it.

    View Instructable »
  • How to unlock Digispark ATtiny85 and convert it to a Trinket

    I just downloaded the zip file and in it is the schematic. I was able to zoom the schematic to any size with my favorite image editing program. I think you just need to zoom in if it is too small.

    View Instructable »
  • How to unlock Digispark ATtiny85 and convert it to a Trinket

    I think that is the case, you don't need a HV programmer for the extended fuse because nothing about the extended fuse could cause the chip to be non-programmable via ISP. I did not study this programmer code in detail or alter it, it is from a different blog and I just adapted the schematic a little bit to work with Digispark boards. I have another Instructable https://www.instructables.com/id/HV-Rescue-Simple/ that is based on Jeff Keyzer's version 2 of his HV Rescue Shield. I simplified the hardware to make it breadboard-based with fewer components, and enhanced the sketch to work with most Arduinos and give it a menu with control of the fuse values.

    View Instructable »
  • How to unlock Digispark ATtiny85 and convert it to a Trinket

    I don't think I agree with using the word "wrong." Those are my preferred fuse values. The differences between those and what the Digispark comes set with are brown out detection, EESAVE, and start up time. Digispark's official values are on this page: http://digistump.com/wiki/digispark/tutorials/programming

    View Instructable »
  • How to unlock Digispark ATtiny85 and convert it to a Trinket

    I think the fuse settings and the core you use when you compile a sketch for it determine how fast the processor runs. It sounds like your sketch is compiled for 16MHz but your processor is actually running at 1MHz if you are noticing that speed difference. If you have put the Micronucleus bootloader back onto it and are programming it as a Digispark, then you should be able to find information on the Digispark website or wiki about speeds. If you have put the Trinket bootloader on it and are programming it as a Trinket, you should be able to find information in Adafruit's tutorials or forums about that. There are a variety of cores you can use to add on to the Arduino IDE to program plain ATtiny85's using an ISP programmer, and most of those will involve using the Burn Bootloa...

    see more »

    I think the fuse settings and the core you use when you compile a sketch for it determine how fast the processor runs. It sounds like your sketch is compiled for 16MHz but your processor is actually running at 1MHz if you are noticing that speed difference. If you have put the Micronucleus bootloader back onto it and are programming it as a Digispark, then you should be able to find information on the Digispark website or wiki about speeds. If you have put the Trinket bootloader on it and are programming it as a Trinket, you should be able to find information in Adafruit's tutorials or forums about that. There are a variety of cores you can use to add on to the Arduino IDE to program plain ATtiny85's using an ISP programmer, and most of those will involve using the Burn Bootloader function of the IDE to set the fuses to the appropriate values. Help for using those cores could probably be found at the arduino.cc website in the Microcontrollers section of the forum.

    View Instructable »
  • Bluetooth Serial Adapter for Pro Mini

    Yes, I recommend posting your question on the arduino.cc forum, it looks like the section "Networking, Protocols, and Devices" would be appropriate. Include information such as how you have each pin wired, include a diagram (hand drawn is fine), include a photo of your Pro Mini and the HC-05 module, and include information about how you configured the HC-05 when you were in AT mode and setting it up. Also confirm the Pro Mini accepts uploads when used with a regular wired FTDI adapter.

    View Instructable »