0

I am making a 100W AC-DC linear power supply, for which I want to show output Voltage and Output current on LCD display. I already used shunt resistor and voltage resistor to bring both values to analog pins on my ATmega328P in DIP socket, which has an Arduino bootloader on it. I want to programm my ATmega328P on the board without taking it off everytime and putting it into Arduino UNO board to just programm it and put it back, so how can I integrate a programmer onto board? I intend to use the FT232R ic, which I think would work more than fine for this application. On finished product I want to have a USB connector on the case just to update/correct the software.

  • If you want an USB connector, an Arduino Nano or 32u4 based Arduino may be a better solution. – Paul Jul 21 '17 at 19:10
1

I suggest use ICSP(In circuit serial programming) feature of the Atmega 328 chip. Grab the .hex file from the arduino IDE and a USB ISP external programmer to write the program to the chip. Here you will have to use a 6 pin header on your custom board to take out the pins which are used to program the atmega.

  • External programmers are cool, but if you want your end-user to connect to the board, you'll most likely want USB. But I agree that it is useful to have the ICSP header available, so you can put on the bootloader if you're making more of these boards. – Paul Jul 21 '17 at 19:13
  • That's correct paul. But here the OP has said that she plug the chip into an UNO for programming and then remove it to the target board. And she want to avoid that. In that case this is the simplest solution rather than building an UNO in the application. – danial weaber Jul 22 '17 at 2:03
0

I use an FTDI cable with my home-builds. Then the board doesn't need the interface hardware (it's in the cable) and the MCU doesn't need to be removed.

I put a 6-pin male header on the board to match 6-pin female socket my cables come with. The header is direct-wired to the Tx, Rx, +5, & Gnd pins. If you have an auto-reset circuit on your board, connect the RTS pins to that. Then, reprogramming is as simple as connecting your board and clicking 'upload'. Without the auto-reset circuit, you just hold the reset button while you click upload, count 3, and release the reset.

Update:

You can do it with only 4 pins on the board. If I understand correctly, just wire Tx, Rx, +5 & Ground of the Arduino to the 4 pins and replace the Arduino-end socket on the FTDI cable with one wired to match however you wired the board. If you use L-shaped male pins, they'll lie parallel to the board and won't add any height (above what is already on it).

  • Hmm..that doesn't sound as a bad idea, but I'd like to make only 4 pins onto the PCB and from there connect the USB cable panel mount. In other words, I'm searching for a schematics for USB cable - ftdi - atmega connection. – Jakey Jul 21 '17 at 15:44
  • Check the schematics of the Arduino Nano, they are basically exactly the circuit you describe. – Paul Jul 21 '17 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.