FutureKit Temperature Controller: Difference between revisions
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
I bought this figuring it looked like a fun board to reprogram if I did not use it as a temperature controller. I don't see any source code floating around the Internet for it, so I will create some. :-) | I bought this FK951 kit figuring it looked like a fun board to reprogram if I did not use it as a temperature controller. I don't see any source code floating around the Internet for it, so I will create some. :-) | ||
First I thought I'd try it out in its stock form. Then I packed and moved from Oregon to California and lost the ATmega8 microcontroller! I am sure it's one of my storage bins! But coding is more fun that searching bins... | First I thought I'd try it out in its stock form. Then I packed and moved from Oregon to California and lost the ATmega8 microcontroller! I am sure it's one of my storage bins! But coding is more fun that searching bins... | ||
Line 6: | Line 6: | ||
This is an approximately 8x10cm card with a large 4 digit red LED display, 5 push buttons, relay, LED, two 3 pin headers to connect temperature sensors via 3 wire ribbon, and a | This is an approximately 8x10cm card with a large 4 digit red LED display, 5 push buttons, relay, LED, two 3 pin headers to connect temperature sensors via 3 wire ribbon, and a | ||
7806 6vdc regulator. (6 volt? really? There is a diode inline that drops it below the 5.5vmax for the CPU.) | 7806 6vdc regulator. (6 volt? really? There is a diode inline that drops it below the 5.5vmax for the CPU. No idea why they did it that way; a shortage of 805's?) I measured it this evening at a nice stable 5.4v. | ||
Board input power is spec'ed at 12vdc, so that the 12v relay can fire. | Board input power is spec'ed at 12vdc, so that the 12v relay can fire. Max voltage input is determined by other components (like electrolytic caps) but should be fine up to about 14vdc. | ||
I am upgrading to an ATmega328P microcontroller to make it more compatible with my shiny new [[Arduino Uno]]. | I am upgrading to an ATmega328P microcontroller to make it more compatible with my shiny new [[Arduino Uno]]. A 328P will drop right in. I bought a replacement along with a USB tiny ISP programmer from Sparkfun; this board has pads for a 6 pin inline header that taps into the ICSP lines so I can reprogram the controller in situ. | ||
The temperature sensors are one-wire DS18B20 https://www.sparkfun.com/products/245 | |||
There is a 2x3 header on the board that is undocumented. It could be used to connect potentiometers or some other analog sensor (light sensor? PIR?) | |||
PC1 (ADC1/PCINT9) 1 6 PC2 (ADC2/PCINT10) | |||
1 | GND 2 5 GND | ||
2 | +12V 3 4 +12V | ||
4 | == Programming == | ||
I am using '''Atmel Studio 6''' and its built in GCC tool chain to program the board in C. | |||
=== The learning curve === | |||
Atmel Studio is similar to Microsoft Visual Studio. | |||
They have a configuration called a "solution" containing "projects". | |||
Each project contains source files. | |||
The key to getting going with Atmel Studio is to use ASF. | |||
ASF = Atmel Software Framework = a big library of code for Atmel micros. | |||
The trick is learning to use it. Start Atmel Studio and then click on the links there. They will direct you to videos, which are online here: http://www.atmel.com/microsite/atmel_studio6/videos.aspx Watch them. | |||
"Atmel Gallery" is the collection of extensions. You probably don't need to worry about them now, what you need to get started is already installed. | |||
=== Hello FK951: First, blink an LED === | |||
I stumbled through the process of using the ASF Wizard to create a new solution from scratch. I added these ASF modules to my solution. | |||
# System Clock Control (service), had to add this first | |||
# GPIO service, which added IOPORT driver as a dependency | |||
[[Category: Electronics]] | [[Category: Electronics]] |
Latest revision as of 20:25, 5 August 2015
I bought this FK951 kit figuring it looked like a fun board to reprogram if I did not use it as a temperature controller. I don't see any source code floating around the Internet for it, so I will create some. :-)
First I thought I'd try it out in its stock form. Then I packed and moved from Oregon to California and lost the ATmega8 microcontroller! I am sure it's one of my storage bins! But coding is more fun that searching bins...
Here is the data sheet for this kit.
This is an approximately 8x10cm card with a large 4 digit red LED display, 5 push buttons, relay, LED, two 3 pin headers to connect temperature sensors via 3 wire ribbon, and a 7806 6vdc regulator. (6 volt? really? There is a diode inline that drops it below the 5.5vmax for the CPU. No idea why they did it that way; a shortage of 805's?) I measured it this evening at a nice stable 5.4v.
Board input power is spec'ed at 12vdc, so that the 12v relay can fire. Max voltage input is determined by other components (like electrolytic caps) but should be fine up to about 14vdc.
I am upgrading to an ATmega328P microcontroller to make it more compatible with my shiny new Arduino Uno. A 328P will drop right in. I bought a replacement along with a USB tiny ISP programmer from Sparkfun; this board has pads for a 6 pin inline header that taps into the ICSP lines so I can reprogram the controller in situ.
The temperature sensors are one-wire DS18B20 https://www.sparkfun.com/products/245
There is a 2x3 header on the board that is undocumented. It could be used to connect potentiometers or some other analog sensor (light sensor? PIR?)
PC1 (ADC1/PCINT9) 1 6 PC2 (ADC2/PCINT10) GND 2 5 GND +12V 3 4 +12V
Programming
I am using Atmel Studio 6 and its built in GCC tool chain to program the board in C.
The learning curve
Atmel Studio is similar to Microsoft Visual Studio. They have a configuration called a "solution" containing "projects". Each project contains source files.
The key to getting going with Atmel Studio is to use ASF. ASF = Atmel Software Framework = a big library of code for Atmel micros.
The trick is learning to use it. Start Atmel Studio and then click on the links there. They will direct you to videos, which are online here: http://www.atmel.com/microsite/atmel_studio6/videos.aspx Watch them.
"Atmel Gallery" is the collection of extensions. You probably don't need to worry about them now, what you need to get started is already installed.
Hello FK951: First, blink an LED
I stumbled through the process of using the ASF Wizard to create a new solution from scratch. I added these ASF modules to my solution.
- System Clock Control (service), had to add this first
- GPIO service, which added IOPORT driver as a dependency