Author Topic: An easy to build android/bluetooth reflow controller  (Read 9789 times)

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
An easy to build android/bluetooth reflow controller
« on: July 12, 2015, 03:53:12 am »
I've just posted a new article in which I document the build process for a new reflow controller that uses an android app to communicate using bluetooth with the controller. The board is designed to be simple to build using (nearly) all through-hole components.



As usual all the gerbers and firmware source are made available for people that want to build their own and there's a lengthy how-to-build video that accompanies it.
It's worse than that, it's physics Jim!

Alan Carvalho de Assis

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #1 on: July 19, 2015, 07:10:18 am »
Hi Andy,
How are you, I hope fine.

I finished my project, but I decided to use TI DP83848 RMII instead instead of Micrel KSZ8081, see here:
https://farm8.staticflickr.com/7719/17107178730_346e67d0f7_b.jpg

You Oven Reflow project is very interesting.
I will try to replicate your reflow project and will let you know if it worked at 110V.

BR,

Alan

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #2 on: July 19, 2015, 09:31:46 am »
Hi Andy,
How are you, I hope fine.

I finished my project, but I decided to use TI DP83848 RMII instead instead of Micrel KSZ8081, see here:
https://farm8.staticflickr.com/7719/17107178730_346e67d0f7_b.jpg

You Oven Reflow project is very interesting.
I will try to replicate your reflow project and will let you know if it worked at 110V.

BR,

Alan

Hi Alan, congrats on finishing your project. The board looks well laid out, neat and tidy, and you've got the MCU and some other peripherals on there too so I'm guessing this is a complete project and not just a breakout board?
It's worse than that, it's physics Jim!

Alan Carvalho de Assis

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #3 on: July 19, 2015, 07:57:43 pm »
Hi Andy,

Yes, this is a board for a dog feeder project I was doing.

I got this board running NuttX with webserver an CGI support.

BR,

Alan

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #4 on: July 26, 2015, 10:54:19 am »
If you haven't already seen the updates in the blog article then please do take a look. I resolved all the issues I was having with oven insulation, fixed a few bugs and tuned my PID parameters. My oven now tracks the reflow profile very accurately indeed.
It's worse than that, it's physics Jim!

D.J.

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #5 on: September 27, 2015, 04:35:36 pm »
Hi all,
I have just populated one of Andys boards - nice and easy :)
I haven't yet coupled up the 240V, but do have the board running at 6V and communicating with my tablet.

I have had some issues, which I would like to document here - so that other builders can be aware and see my solutions.
Most of these issues are outwith Andys control.

1) The HC-06 module that I bought did not name itself "HC-06" but "IDTech\r". This causes the Android app to fail to link.
The solution I used was to change the string"HC-06" to "IDTech\r" in the java source code and to rebuild the app.
ReFlowApplication.java
 protected static final String OVEN_DEVICE_NAME = "IDTech\r";


2) The Nokia display that I purchased had a different arrangement for the LED backlight. Mine had the LEDs wired to Gnd, so required current to be injected into the "LED" pin (pin 7).
Solution I used was to remove Q3, R12 and R13. Fit a 100R resistor between PWM and P8.7 ( the pads for R12 and R13 can be used)

3) I suspect that the values documented for the AVR fuses are incorrect.
avrdude -c usbasp -p m8 -e -U lfuse:w:0xD2:m -U lfuse:w:0xff:m -U hfuse:w:0xd9:m
My analysis of 0xD2 for the low byte decodes as an 2MHz RC oscillator, whereas we have an 8MHz crystal fitted.
Solution I used was to use 0xFF for the low fuses.

4) The layout of P6 is not the same as the 6 way ISP connector on the ATMEL dragon, or the ATMEL AVRISP mkII so do not use a ribbon cable with 6 way headers with these programmers.
Solution I used was ribbon cable with 6way header at one end but individual headers at the other.

5) Be aware that there is no solder resist between the pads for the transistors, It is much easier to get solder bridges on these devices, Inspect carefully after soldering.

All I need to do now is persuade the Financial controller that we NEED a new toaster :) Then I can start cooking.


Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #6 on: September 28, 2015, 01:24:23 pm »
1) The HC-06 module that I bought did not name itself "HC-06" but "IDTech\r". This causes the Android app to fail to link.
The solution I used was to change the string"HC-06" to "IDTech\r" in the java source code and to rebuild the app.
ReFlowApplication.java
 protected static final String OVEN_DEVICE_NAME = "IDTech\r";

Ah, I mistakenly assumed that all those clones out there would be using the same firmware as each other. I guess not. It's an easy change for me to add the bluetooth device name to the app settings and I will do that because not everyone will be comfortable setting up an Android development environment.

Quote
2) The Nokia display that I purchased had a different arrangement for the LED backlight. Mine had the LEDs wired to Gnd, so required current to be injected into the "LED" pin (pin 7).
Solution I used was to remove Q3, R12 and R13. Fit a 100R resistor between PWM and P8.7 ( the pads for R12 and R13 can be used)

Thanks for documenting this workaround. It'd be slightly more complicated to add a high-side PNP switching circuit to control this arrangement but I could probably fit the component footprints on the board so people could choose whichever one suits their LCD.

Quote
3) I suspect that the values documented for the AVR fuses are incorrect.
avrdude -c usbasp -p m8 -e -U lfuse:w:0xD2:m -U lfuse:w:0xff:m -U hfuse:w:0xd9:m
My analysis of 0xD2 for the low byte decodes as an 2MHz RC oscillator, whereas we have an 8MHz crystal fitted.
Solution I used was to use 0xFF for the low fuses.

You're right. There's a bug in my programming script:

Code: [Select]
fuse_cmd="avrdude -c usbasp -p m8 -e -U lfuse:w:0xD2:m -U lfuse:w:0xff:m -U hfuse:w:0xd9:m"

As you can see I'm mistakenly repeating the value for lfuse but luckily the second value takes precedence and so the value I actually program is correct.

Quote
4) The layout of P6 is not the same as the 6 way ISP connector on the ATMEL dragon, or the ATMEL AVRISP mkII so do not use a ribbon cable with 6 way headers with these programmers.
Solution I used was ribbon cable with 6way header at one end but individual headers at the other.

There's always one thing you wish you'd done differently after you've submitted the PCB design for manufacturing and this was the one. If I do a rev.2 of the board then I will certainly be re-arranging those pins.

Quote
5) Be aware that there is no solder resist between the pads for the transistors, It is much easier to get solder bridges on these devices, Inspect carefully after soldering.
I mentioned this in the video. The pads are surprisingly close together considering this is a standard TO-92 footprint in Altium Designer. It's OK though as long as you're careful with the iron.

Quote
All I need to do now is persuade the Financial controller that we NEED a new toaster :) Then I can start cooking.

I highly recommend the halogen ovens that you can get for £30 on ebay. I can't believe that a traditional toaster oven would get anywhere close to the performance of the halogen ovens.
It's worse than that, it's physics Jim!

bazc

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #7 on: February 11, 2016, 03:48:36 am »
Quote
I now have a working power output that seems to follow and track a profile, the output is now nudging up correctly – so it seems to be a Bluetooth or android problem.

Good that it's following a profile, but there's something not right (see below code excerpt).

Quote
A few points noted when using display and switch operation:
1]   The oven will now reflow without manually preventing large overshoots; however the profile    seems to be different. I have no separate temp logging so cannot show you results but here    are so figures from display:

   0    to    90  secs   ramps up to 115c
   90    to    180 secs    holds at 115c
   180    to    216 secs    ramps to 195c
   216    to    240 secs   reflow with 220c max.

2]   Is the manual profile same as android use?
Yes, the same as the linear profile.

Quote
3]   Does the manual use default to Linear?
Linear is the only option for the embedded profile due to available space on the ATMega8. From ReflowRegion.cpp, values are { time, temperature }:

Code: [Select]
  const ReflowRegion LeadReflowRegions[6] PROGMEM = {
    { 90,150  },      // preheat
    { 180,180 },      // soak
    { 200,210 },      // ramp up
    { 220,210 },      // reflow
    { 240,180 },      // ramp down
    { 270,25  }       // cool down
  };

It seems clear that either the display is not updating correctly or the algorithm isn't tracking the embedded profile. I will investigate this.

Quote
4]   There is no spline / linear selection using enc swich.
Correct (see above)

Quote
5]   When time display reaches 3 figures, demand temp display is over written.
Definitely a display bug. I'll take a look at that. The embedded profile hasn't seen nearly as much work as the Android interface as it's only really a fallback in the case of problems like those you are seeing with Android.

Quote
Using PID setting 10,1,0  the controller now tracks the displayed demand temp within a deg or so.
Sounds good. The best values for your setup will depend on your oven, insulation etc.

Quote
Many thanks for a great design, any comments would be great.

Aside from the issues you've found in the embedded profile, I'd like to continue to try to help get to the bottom of the Android problems that you're seeing. One thing that I can do is to slow down the update rate in case what I'm using is too fast for you. Currently the app will poll for the last temperature reading and/or set a new target temperature every 300ms and the firmware will poll the sensor for a new reading every 200ms. I will relax those two settings and produce a test build for you to try at the weekend.
« Last Edit: February 11, 2016, 02:23:08 pm by Andy Brown »

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #8 on: February 13, 2016, 04:31:58 am »
Quote
A few points noted when using display and switch operation:
1]   The oven will now reflow without manually preventing large overshoots; however the profile    seems to be different. I have no separate temp logging so cannot show you results but here    are so figures from display:

   0    to    90  secs   ramps up to 115c
   90    to    180 secs    holds at 115c
   180    to    216 secs    ramps to 195c
   216    to    240 secs   reflow with 220c max.

This is now fixed and pushed to github (see issue #1)

Quote
5]   When time display reaches 3 figures, demand temp display is over written.

I cannot reproduce this. When I tested it while fixing the tracking issue the status line at the bottom of the display was always correctly formatted.
It's worse than that, it's physics Jim!

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #9 on: February 13, 2016, 04:41:20 am »
Quote
One thing that I can do is to slow down the update rate in case what I'm using is too fast for you. Currently the app will poll for the last temperature reading and/or set a new target temperature every 300ms and the firmware will poll the sensor for a new reading every 200ms. I will relax those two settings and produce a test build for you to try at the weekend.

I've generated an android app with the polling rate reduced to 1000ms. You can download it here. It can be side-loaded on to an android device. I'd be interested to know if this helps you.
It's worse than that, it's physics Jim!

bazc

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #10 on: February 14, 2016, 10:10:22 am »
amended HEX file loaded and now works great ! also formatted bottom line temp no longer overlapping.
I will try the android app next
many thanks Barry

bazc

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #11 on: February 14, 2016, 11:56:48 am »
awreflow2-1s-update.apk side loaded into my android which is a IRULU x7.
not much different Andy, so maybe next I will get a replacement HC06 to make sure its not faulty.
I have attached photo of best run.
regards Barry

bazc

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: An easy to build android/bluetooth reflow controller
« Reply #12 on: February 17, 2016, 10:52:58 am »
I have fitted another Bluetooth HC06 from a different supplier.
Android control is the same, so not the Bluetooth unit.
I will try a android phone but cant do that until my girlfriend arrives next week.
in the meantime I will tyry to video operation so you can see what happens.

Barry

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #13 on: February 17, 2016, 02:29:38 pm »
Let's wait and see if it's OK with the Android phone. I've used it with the Irulu X1s (that's the cheap one in the photograph in the article), a Nexus 10, a Samsung S4 and an HTC One M8.
It's worse than that, it's physics Jim!

Andy Brown

  • Administrator
  • Hero Member
  • *****
  • Posts: 256
    • View Profile
    • Andy's Workshop
Re: An easy to build android/bluetooth reflow controller
« Reply #14 on: February 20, 2016, 03:39:15 am »
Barry, I've created a new release of both the app and the ATMega8L firmware. You should get an update notification from Google shortly that will prompt you to upgrade. A few minor bugs are fixed that may not be relevant to your specific issue but you should take the update anyway. If you can't wait for google then the .apk in github is the new version.

The ATMega8L firmware is pushed to github and available now. The major change is that the firmware will now continually display the oven duty cycle whilst the android app is connected. This means that you can run a reflow from the app and compare the duty cycle displayed in the app with that displayed by the firmware. The values should be almost in sync with the firmware lagging by about half a second.
It's worse than that, it's physics Jim!