Heating coil based on bluetooth input

Thread Starter

Siddharth Mehrotra

Joined Jul 15, 2019
11
Hi,

I want to heat coil based on the input value received by bluetooth device.

I made a small circuit also for this. I am using Kanthal wire for heating, it's 22g wire which is 1.31Ω per foot. The wire needs current of 2.5 amp with 3.7 V battery to heat.

I am transferring ASCII values to bluetooth device with my phone.

Here is the code I am using:

Code:
char c;
int state = 0;
uint32_t period = 1 * 60000L;//  1 min
   void setup() {
    while (!Serial);
     Serial.begin(9600);
     Serial1.begin(9600);
     }
   void loop() {
    if(Serial1.available()){
    c = Serial1.read();
    Serial.println(c);
    if(c=='7'){
      for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
   digitalWrite(A7, HIGH); 
}
    }
    }   
delay(1000);
    }
The bluetooth is working fine! Example: When I send a ASCII value 5, I can see on Arduino serial monitor 5.

The problem is the circuit! I am not able to understand where I am making the mistake as based on the bluetooth input, fire is not heating up. Please help.
 

Attachments

BobTPH

Joined Jun 5, 2013
8,813
Multiple things wrong with that code.

You say you are sending a '5' and the code is only doing anything if it sees a '7'.

What the code does is wrong. It keeps setting the output high in a loop. No line ever sets if off, so, if it worked, the wire would stay heating forever.

Line up the { and } in the code so we can more easily see what code is contained within each structured statement.

Bob
 

Thread Starter

Siddharth Mehrotra

Joined Jul 15, 2019
11
Multiple things wrong with that code.

You say you are sending a '5' and the code is only doing anything if it sees a '7'.

What the code does is wrong. It keeps setting the output high in a loop. No line ever sets if off, so, if it worked, the wire would stay heating forever.

Line up the { and } in the code so we can more easily see what code is contained within each structured statement.

Bob
Actually 5 is just example of value I am sending! Even if I send 7 nothing happens according to my circuit. Also, I understand that I didn't turned off the heating, but that's not the issue. The problem is with the circuit design I have the above code doesn't heat the coil. (See the Fritzig Diagram)
 

dendad

Joined Feb 20, 2016
4,452
Your breadboard layout leaves a lot to be desired. But that aside, where is the power to the boards?

Have you written a test to just pulse the output on and off, not using the bluetooth?
Test that you can drive the heater first. Add an LED with resistor so you can see it switching.
 

oz93666

Joined Sep 7, 2010
739
The problem is with the circuit design I have the above code doesn't heat the coil. (See the Fritzig Diagram)
At a guess you have too much resistance in the (heating) circuit ...

You have very low voltage and want high current so you cannot have even modest resistance in connecting wires , contacts , and resistance in components ..

Stepping up the voltage must be the answer , within the limits of the circuit.
 

Thread Starter

Siddharth Mehrotra

Joined Jul 15, 2019
11
Your breadboard layout leaves a lot to be desired. But that aside, where is the power to the boards?

Have you written a test to just pulse the output on and off, not using the bluetooth?
Test that you can drive the heater first. Add an LED with resistor so you can see it switching.
The FLORA is powered by USB from computer & coil by battery as it requires high current to heat up.

I will test with LED and update you! Thanks.
 

Thread Starter

Siddharth Mehrotra

Joined Jul 15, 2019
11
At a guess you have too much resistance in the (heating) circuit ...

You have very low voltage and want high current so you cannot have even modest resistance in connecting wires , contacts , and resistance in components ..

Stepping up the voltage must be the answer , within the limits of the circuit.
I am using a separate battery to power the coil as it requires high current. I will reduce the resistance and will update on that. Thanks.
 

djsfantasi

Joined Apr 11, 2010
9,156
Doesn’t the Bluetooth TX pin need to be connected to the Arduino/Flora RX pin?

As shown, nothing will ever received by the μp, and hence the digitalWrite() will never be executed. Hence, no current will flow to the wire; no heating will occur.

Plus, if the μp is a 5V device, it’s TX pin must be reduced so that the Bluetooth module isn’t damaged.
 

Picbuster

Joined Dec 2, 2013
1,047
Hi,

I want to heat coil based on the input value received by bluetooth device.

I made a small circuit also for this. I am using Kanthal wire for heating, it's 22g wire which is 1.31Ω per foot. The wire needs current of 2.5 amp with 3.7 V battery to heat.

I am transferring ASCII values to bluetooth device with my phone.

Here is the code I am using:

Code:
char c;
int state = 0;
uint32_t period = 1 * 60000L;//  1 min
   void setup() {
    while (!Serial);
     Serial.begin(9600);
     Serial1.begin(9600);
     }
   void loop() {
    if(Serial1.available()){
    c = Serial1.read();
    Serial.println(c);
    if(c=='7'){
      for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
   digitalWrite(A7, HIGH);
}
    }
    }  
delay(1000);
    }
The bluetooth is working fine! Example: When I send a ASCII value 5, I can see on Arduino serial monitor 5.

The problem is the circuit! I am not able to understand where I am making the mistake as based on the bluetooth input, fire is not heating up. Please help.
I am missing parts of program like millis()
and the vars named tStart and period;

Advice:
use pwm assuming 0-9 input producing 0-100% pwm signal.
It will help if you put components in your schematics in a more logical position (+ connections up and inputs one side outputs at the other). Doing so makes schematics easy to read.
Please don't see this as a negative remark but to help you.

Picbuster
 
Top