Shop OBEX P1 Docs P2 Docs Learn Events
Automated barbeque temperature control — Parallax Forums

Automated barbeque temperature control

chino angelochino angelo Posts: 20
edited 2008-01-28 15:46 in General Discussion
Has anyone here tried to do the "Automated Barbeque Temperature Control" written by Barry Press from the book Geek House?

I really need help regarding this especially on the temperature probe... an error shows: error link 0002 No suitable main method found. (i attached the source code)

I hope someone could help me.. thanks
- Chino Magcalas
Philippines

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-27 06:08
    The project has more java classes, at least one for the actuator (=fan) also.
    There must be one java file that has a static void main() routine.
    That is your application program and that you can download to
    the javelin. All other files used by the application program are
    automatically linked.

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-27 07:02
    What should i do? do i have to run both the fan and the probe program in order for it to work?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-27 08:33
    What would you like to do?
    That class only has methods to read and convert temperature values.
    You can add a main() to the class but then you need to know
    what you like to do with the temperature values.

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-27 08:41
    once the javelin detects the temperature (in digital) it will ocntrol the speed of the fan.. this is going to be used in the barbeque temperature control.

    I can send to you the whole procedure if its ok with you... I'm sorry for bothering you but i really need your help...
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-27 09:23
    The file BBQController.java is the application program. It has the main() method in it.
    If you have all the hardware mentioned in the Geek article and have connected
    all the hardware in the correct way, then you can program the javelin.

    But first it is wise to create a folder c:\program files\parallax inc\javelin stamp ide\lib\stamp\BBQController
    (and spell BBQController exactly as here) and put all the files into that folder.
    Then place the line
    package stamp.BBQController;
    at the start of each·file and don't forget the ;
    Close all files so they are saved.
    Finally open file BBQController.java and you can download to the javelin.

    regards peter

    Post Edited (Peter Verkaik) : 1/27/2008 9:28:45 AM GMT
  • chino angelochino angelo Posts: 20
    edited 2008-01-27 09:41
    where will i put "package stamp.BBQController" on the first line of each of the program? I'm sorry i'm not good in programming that's why i dont understand it much.· Can you pls send me the whole package? Of course if you're not busy... [noparse]:)[/noparse]
  • chino angelochino angelo Posts: 20
    edited 2008-01-27 10:05
    Thank you... About the actuator.. do i need to have a separate 12v supply for the fan or i just have to connect it to Vdd?

    If i connect it to vdd the fan rotates slower bec it is regulated 5v... how am i supposed to maximize its speed if for example the temperature is lower

    and it needs to warm up? I connected the gate of the transistor to the PWM (pin 8) is that correct?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-27 10:25
    If you use a 12V fan, connect it to 12V, as explained in the article.
    The javelin pin that drives the fan with PWM goes indeed to the base of the transistor.
    You don't need to regulate the fan speed, the program does that for you based
    on temperature readings.

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-27 14:23
    Where will i connect the base of the transistor to the javelin board? (PWM)

    i'm not familiar with the PWM so i dont know if its a pin or should i create a circuit for a PWM?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-27 19:53
    Pin8 is used for the PWM, so connect the transistor base to javelin I/O pin P8.

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-28 05:11
    Thanks peter, that would help us..

    About the temperature probe, do i need to remove the end part of it to reveal the wires and connect it to the circuit?

    Thank you.

    - Chino
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-28 05:35
    I checked the sources and these are the javelin pin assignments

    P0 = uart output to write to lcd (see BBQLCD.java)
    P1 = pwm output to control fan (see FAN.java) (not P8 as I mentioned before)
    P8 = adc output for·temperature probe (see TemperatureProbe.java)
    P9 = adc input to read temperature probe

    Also, make sure all GND's from all devices are tied together.
    You can see how the temperature probe is connected in figure 8-9.

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-28 05:49
    thanks peter smile.gif

    will the default program work even if i dont use the BPI 216 serial lcd as what the book recommends? I just bought a Hitachi hd44780 compatible lcd...

    And also about the circuit of the actuator, what kind of diode(model) should i use?

    I hope you dont mind my asking, its just that i'm having a hard time with the project...

    thanks a lot i really appreciate it [noparse]:)[/noparse]
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-28 06:12
    The hd44780 lcd has a parallel bus, whereas the BPI216 uses a serial connection.
    You can use attached class (you may need to change some method names).
    The hd44780 uses pins 0-6 I believe, so they do not interfere with the adc,
    but you may need to reassign the pwm output.

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-28 06:20
    I dont know anything about java... that's why i dont know how to program the lcd if i need to change something...

    since the com port of the javelin is 9pin, does it mean that i have to connect pins 0 to 6 for data then 1 for vss and vdd and contrast? a total of nine?

    Now i'm starting to panic... if i wont be able to get this thing work, i'm going to repeat the subject...... I'm a graduating student of a University in the Philipiines...

    please help me.... [noparse]:([/noparse]
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-28 10:34
    If you don't know anything about java, then at least start studying the javelin
    manual, from start to end, before proceeding with this project.
    Otherwise you will never get this project completed because I am sure you need
    to tweak the ADC and possibly the PWM.
    You can download the javelin user manual for free from here:
    http://www.parallax.com/ProductInfo/Microcontrollers/JavelinDownlads/tabid/443/Default.aspx

    regards peter
  • chino angelochino angelo Posts: 20
    edited 2008-01-28 13:00
    okay I will... thank you peter... [noparse]:)[/noparse]

    I'll still ask some questions when i dont understand something if you dont mind..

    take care

    chino
  • Ryan C. PayneRyan C. Payne Posts: 38
    edited 2008-01-28 15:30
    A few images of the controller in action: http://forums.parallax.com/forums/default.aspx?f=8&m=84378
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-01-28 15:46
    Thanks Ryan for posting that link.

    regards peter
Sign In or Register to comment.