forked from MPaulHolmes/AC-Controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Programming the Board
knoxsp edited this page May 27, 2020
·
6 revisions
To program the board, you will need
- An AVRISP MKii to program the ATTiny25
- A pickit 3 programmer to program the main XXX chip
You will need Atmel Studio, which is free, and something like an AVR isp mkii, or some other AVR programmer.
- Using an AVR programmer, such as an AVRISP MKii, plug it into the 2x3 pin connector (with a 0.1" x 0.1" pitch) on the board. The red stripe on the ribbon wire goes with the dot on the board.
- Program the ATTiny25 with DC-DC-Converter.hex.
- Using Atmel Studio (I use Atmel Studio 7), go to Tools -> Device Programming. Under "Device", select ATTiny25. Under the "Memories" tab, select the ATTiny .hex code under the "flash" label. Then program the chip (click "program"). Don't do anything with the "EEProm" area.
- With power attached, measure the voltage between each pair of back metal tabs of Q3/Q4, Q5/Q6, Q7/Q8, Q9/Q10, Q11/Q12, Q13/Q14.
- You should get around 24v (+/-) for each measurement. If you don't, check your soldering! Disconnect 24v power. Remove the AVRISP MKii.
- Plug in a pickit 3 into the 6 x 1 connector, with the dot on the board corresponding to the triangle on the pickit 3. I use MPLAB IDE 8.83. If you also use that, click on File -> Import.
- Select the AC controller software .hex file. Then go to Programmer -> Select Programmer -> Pickit 3.
- Then, turn on the 24v power to the board, and then go to Programmer -> Program.
- Power up your computer. Connected to the controller with a serial cable. If you are suing a 9 pin serial connector, the cable wiring is shown below
This works for an external USB to serial converter as well.
- Using whichever terminal program you choose (ex: the arduino serial monitor is a good candidate, as it is cross-platform), connect to the serial port at
115200 baud
,no parity
,8 data bits
,1 stop bit
- When your terminal program is connected, power up the controller. The relays click for precharge and main contactor. Then you should see this on your terminal
AC Controller version 1.0
It should also show an error for the throttle, that it is lower than minimum, and ask if it is connected. But it is not, not yet.