topbanner.gif
Login
Username

Password




Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Shoutbox
You must login to post a message.

JackH
OfflineAdmin
· 06/05/2020 5:38 PM
peveleth, It is better if you start a post in the forum with your question. These shouts go away in time.

peveleth
Offline
· 06/05/2020 3:10 PM
For Gene Cafe Roasters I have an older Gene Cafe Roaster. Temp fluctuates probably showing age. Question: For recent owners of the newer Gene Cafe Roaster, your opinions?

her63
Offline
· 06/02/2020 9:10 AM
keep healthy bro, love roaster form home

pisanoal
Offline
· 05/27/2020 10:14 AM
Anyone else have issues seeing the whole window of a thread when accessing from a mobile phone? Any fixes?

allenb
OfflineAdmin
· 04/02/2020 4:50 AM
Morning Ed, I haven't done any green coffee hoarding yet but am hoping the supplies don't end up like the toilet paper isles!

Users Online
Guests Online: 4

Members Online: 0

Total Members: 6,595
Newest Member: peveleth
In Memory Of Ginny
Donations

Latest Donations
Anonymous - 5.00
Anonymous - 5.00
renatoa - 2.00
JitterzZ - 2.01
renatoa - 2.00

View Thread

Who is here? 1 guest(s)
 Print Thread
TC4 with aArtisanQ_PID
ChrisR
Indeed, I measured the voltage as you suggested and I read the correct voltage at DIO9. i do have an older TC4C.
Edited by ChrisR on 06/01/2018 8:16 AM
 
chaff
There's a transistor inverter shown for IO3's output on the circuit diagram. 100% PWM will result in the transistor 'on' all the time and the output will be low ( the load would be connected between +5v and the IO3 output ). Unless you put a pull-up resistor between 5v and the output pin your meter won't see the IO3 pin float to +5v when PWM is 0% output.
 
ChrisR

Quote

chaff wrote:

There's a transistor inverter shown for IO3's output on the circuit diagram. 100% PWM will result in the transistor 'on' all the time and the output will be low ( the load would be connected between +5v and the IO3 output ). Unless you put a pull-up resistor between 5v and the output pin your meter won't see the IO3 pin float to +5v when PWM is 0% output.


Did you mean OT1?
 
chaff
Yes, sorry. Section E-2, lower left, sheet 2/2 on the circuit diagram.
 
ChrisR
Looks like I need to connect to DI09 instead of OT1. I just checked the voltage at DI09 and the lowest voltages I get when I write a 1 to OT1 is .7V. This seems to be the drop between base and emittter on the Q1 transistor.
 
greencardigan
I think there is actually an issue with the faster frequencies on OT1 when using the PWM mode. The frequency is correct but the output is changing in large steps instead of smoothly. Eg. the voltage measured on DIO9 doesn't change between OT1,29 and OT1,42.

Not sure what is going on. This is occurring with all the faster PWM options (977Hz to 3.9kHz). There is a note in user.h from Jim saying these need testing. Also, it's doing the same thing using Jim's aArtisan sketch.
 
ChrisR
I think I'll switch to "CONFIG_PAC2_IO3HTR" config and use IO3 for the gas valve. I removed the L1 inductor and the resistor that connects DI09 to the Q1 transistor. However, I cannot linearly step through the voltages on Di09. IO3 seems to work very well in regards to linearly stepping through voltage from 0 to 5 V.
Edited by ChrisR on 06/02/2018 1:54 PM
 
chaff
greencardigan, I think the lumpy resolution is an unavoidable side effect of adjusting frequency to anything other than 'prescaled', when the counter registers only count to partway-full before resetting. They increment at fclkIO / prescale but since they reset before full count the frequency is higher. The values in the compare registers are scaled accordingly so 100% compare value corresponds to the les-than-full value in ICR1.
See: PWM16.cpp #
Using a logic analyser I see the PWM change once in about seven increments of Ot1,n which corresponds to the resolution for a selected frequency scale of 15 ( 100 / ( 15 + 1 ))
 
greencardigan
Thank Chaff for the info. That does appear to be what is happening. I was trying to understand the pwm16 library code but couldn't fully understand it.

So do you know if there is a possibility to have 100 steps of resolution at around 3.9kHz? I was looking at this page but haven't tried anything yet. https://arduino-info.wikispaces.com/A...-Frequency

That still leaves the issue of having an open collector output for OT1.
I was trying a new CONFIG option with fast pwm output on digital pin 11. This pin uses the same timer as IO3 and is directly connected to a header pin on both the TC4C (on the ICSP port) and TC4 (on the digital pins header or the ICSP port on the arduino uno).

Any thoughts on this?
 
chaff
A hasty answer is, 31250 I/O clock with a prescale of 8 ( instead of 64 ) seems to yield 3.9KHz with full resolution. I'll see if I can make it work in the sketch.

I don't understand the problem with the open collector output, as far as I can see one can either tie the load between +5v and the output or, if an output voltage is needed then a resistor between +5 and output ( or an RC filter ) would work wouldn't it ?

Edit, Too hasty, I forgot to factor in the compare reg value, it looks as if the prescale is already set to 8. I'll look to se what happens with prescale set to 1
Edited by chaff on 06/03/2018 7:23 AM
 
greencardigan
OK that sounds good. I was thinking it didn't suit ChrisR for some reason. An RC filter on the output would give a smoother DC output to connect to a gas valve driver.
 
allenb
I'm thrilled that this is being scrutinized and hopefully a best practice determined for anyone wanting to control a proportional solenoid gas valve (kelly or clippard) or proportional analog input SSR as this one:

https://www.mouser.com/ProductDetail/...egMA%3D%3D

The SSR would most likely require the RC filter on the PWM output.

The valves would most likely need a buffer circuit to not draw excessive current from the TC4 but can be easily done.

Keep the momentum!

Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
ChrisR

Quote

greencardigan wrote:

OK that sounds good. I was thinking it didn't suit ChrisR for some reason. An RC filter on the output would give a smoother DC output to connect to a gas valve driver.


I agree, I need a pure PWM with 0V when the duty cycle is 0 and 5V when duty cycle is 100. Therefore the open collector config does not work for a gas valve, but connection to the Atmega pin would. Both the Clippard and Kelly valves have designated valve drivers and the valve drivers input impedance are high. The current draw from the Atmega pin would be minimal.
 
chaff
(

PWM16..cpp # 60: change to

// TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS11) | _BV(CS10);
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS11) ; // prescale was 64 is now 8

user.h # 157 add new line ( comment all other selections ) :

#define TIME_BASE 514 // approx. 3.9kHz for prescale 8

Those two changes give you 3.89KHz pwm with at least 1% resolution by the looks but, of course, the other SSR is output; is that a problem ?

allenb, The 3904 transistor is a 200mW, 1/2amp device, I'll look at the relay's datasheet.
 
chaff
PWM16.cpp # 57 Change from :

// non inverting, fast PWM, TOP is in ICR1
//TCCR1A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM11);

to:
// inverting, fast PWM, TOP is in ICR1
TCCR1A = _BV(COM1A0) | _BV(COM1B0) | _BV(COM1A1) | _BV(COM1B1) |

To cause OT1 to have the right polarity; then a 10K resistor between the OT1 terminals would satisfy clippard's need wouldn't it ?

( Edit) PS for ACKS_ON:

cmndreader.cpp # 596:
#ifdef ACKS_ON
Serial.print(F("# PID setpoint = ")); Serial.println(SV); // SV was Setpoint
#endif

Chris_R, It looks like I've gone off on a tangent looking to alter OT1's Frequency and polarity. Was there a reason to move the gas valve from IO3 ? It seems like the gas should be on IO3: no open-collector inverter and a separate Timer/PWM control from OT1, OT2.
What's missing with CONFIG_PWM, Gas valve on IO3 ? Tks
Edited by chaff on 06/03/2018 1:38 PM
 
ChrisR

Quote

chaff wrote:

(

PWM16..cpp # 60: change to

// TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS11) | _BV(CS10);
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS11) ; // prescale was 64 is now 8

user.h # 157 add new line ( comment all other selections ) :

#define TIME_BASE 514 // approx. 3.9kHz for prescale 8

Those two changes give you 3.89KHz pwm with at least 1% resolution by the looks but, of course, the other SSR is output; is that a problem ?

allenb, The 3904 transistor is a 200mW, 1/2amp device, I'll look at the relay's datasheet.


This works. I can step through the various voltages on DI09 and read the voltage on my voltmeter. I don't use SSRs, thus the other outputs are not an issue for my setting.
I already removed the resistor and the inductor connected to Q1, thus I connected directly to DI09.
Awesome.
Edited by ChrisR on 06/03/2018 5:01 PM
 
ChrisR

Quote

chaff wrote:

PWM16.cpp # 57 Change from :

// non inverting, fast PWM, TOP is in ICR1
//TCCR1A = _BV(COM1A1) | _BV(COM1B1) | _BV(WGM11);

to:
// inverting, fast PWM, TOP is in ICR1
TCCR1A = _BV(COM1A0) | _BV(COM1B0) | _BV(COM1A1) | _BV(COM1B1) |

To cause OT1 to have the right polarity; then a 10K resistor between the OT1 terminals would satisfy clippard's need wouldn't it ?

( Edit) PS for ACKS_ON:

cmndreader.cpp # 596:
#ifdef ACKS_ON
Serial.print(F("# PID setpoint = ")); Serial.println(SV); // SV was Setpoint
#endif

Chris_R, It looks like I've gone off on a tangent looking to alter OT1's Frequency and polarity. Was there a reason to move the gas valve from IO3 ? It seems like the gas should be on IO3: no open-collector inverter and a separate Timer/PWM control from OT1, OT2.
What's missing with CONFIG_PWM, Gas valve on IO3 ? Tks


To drive the gas valve with DI09 and use IO3 for the DC fan.
 
allenb

Quote


allenb, The 3904 transistor is a 200mW, 1/2amp device, I'll look at the relay's datasheet.


The Crydom proportional SSR I linked to earlier that includes 0-5, 0-10 VDC and 4-20 mA analog input options shows a 28.8 Kohm input impedance so no problem driving it.

The Kelly proportional valve I used with my roaster has a maximum input current of 180 mA at full open. Would be best to utilize either Kelly's or Clippards driver which provides a buffer plus the ability to set min/max settings .

Allen
1/2 lb and 1 lb drum, Siemens Sirocco fluidbed, presspot, chemex, cajun biggin brewer from the backwoods of Louisiana
 
greencardigan
Some others use a gas valve on IO3 with the CONFIG_PAC2_IO3HTR mode. This is good for those using an AC fan. I understand ChrisR wants to drive a gas valve and a DC fan thus requiring two fast pwm outputs. None of the existing modes can do this.

Thanks heaps Chaff for the code changes. I'll have a play and see if if I can get it working. I'm mindful of the fact that many use OT1 for slow 1Hz pwm and I'll have to keep both options working with compile directives maybe.
 
greencardigan
Also Chaff, can you point me to the part of the code that actually switches the OT1 Output? I cant see any digital write or analog write associated with OT1. Maybe it's happening in PWM16.OUT but I'm not seeing it.
Edit: Ahh, I see it's to do with the compare registers.
Edited by greencardigan on 06/03/2018 11:51 PM
 
Jump to Forum:

Similar Threads

Thread Forum Replies Last Post
Loading aArtisanQ_PID in Arduino Dataloggers/Controllers/Rate of Rise Meters 14 05/28/2018 8:32 PM
Help with aArtisanQ_PID Specifying Temps Dataloggers/Controllers/Rate of Rise Meters 7 08/03/2017 7:05 PM
TC4 aArtisanQ_PID or Standard Library Dataloggers/Controllers/Rate of Rise Meters 45 01/24/2016 12:17 PM
aArtisanQ_PID 5,3 with TC4 display problem Dataloggers/Controllers/Rate of Rise Meters 14 01/23/2016 11:15 AM
AartisanQ_PID 5.3 with TC4 and RoastLogger Dataloggers/Controllers/Rate of Rise Meters 6 12/14/2015 10:52 AM
Homeroasters Association Logo, and all Content, Images, and Icons © 2005-2016 Homeroasters Association - Logos are the property of their respective owners.
Powered by PHP-Fusion copyright © 2002 - 2020 by Nick Jones.
Released as free software without warranties under GNU Affero GPL v3.
Designed with by NetriX