FutureKit Temperature Controller: Difference between revisions

From Wildsong
Jump to navigationJump to search
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. I bet it would work down to the dropout of the voltage regulator, which must be around 8 volts. High voltage input is determined by other components (like electrolytic caps) but should be fine up to about 14vdc.
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]]. It 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.
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.


Sensors are one-wire DS18B20 https://www.sparkfun.com/products/245
The temperature sensors are one-wire DS18B20 https://www.sparkfun.com/products/245


7 segment LED display:
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?)
port D0-D7 control the segments:
PD0 g
PD1 c
PD2 d
PD3 e
PD4 dt
PD5 b
PD6 f
PD7 a
port PB0,PC3,PC4,PC5 select the digit
PC5 1 (numbered left to right)
PC4 2
PC3 3
PB0 4


Push buttons are on
PC1 (ADC1/PCINT9) 1 6  PC2 (ADC2/PCINT10)
  1 PB3 (MOSI)
              GND 2 5  GND
  2 PB4 (MISO)
              +12V 3  4 +12V
3 PB5 (SCK)
 
  4 PD7 (shared with 7-seg segment 'a')
== Programming ==
5 PD6 (shared with 'f')
 
I am using '''Atmel Studio 6''' and its built in GCC tool chain to program the board in C.
 
=== The learning curve ===


Relay is on C0
Atmel Studio is similar to Microsoft Visual Studio.
They have a configuration called a "solution" containing "projects".
Each project contains source files.


Sensor #1 is on port B1
The key to getting going with Atmel Studio is to use ASF.
optional sensor #2 is on port B2
ASF = Atmel Software Framework = a big library of code for Atmel micros.


There is a programming port 1x6
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.


1 RST
"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.
2 GND
3 MOSI
4 MISO
5 SCK
6 +5V


There is a 2x3 port, undocumented. These could be used to connect
=== Hello FK951: First, blink an LED ===
potentiometers or some other analog sensor (light sensor? PIR?)


PC1 (ADC1/PCINT9) 1  6  PC2 (ADC2/PCINT10)
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.
              GND  2  5  GND
 
              +12V 3  4  +12V
# 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.

  1. System Clock Control (service), had to add this first
  2. GPIO service, which added IOPORT driver as a dependency