ZX-328n resets?

Discussion specific to the DIP and TQFP packaged ZX devices like the ZX-40, ZX-44, ZX-32 and ZX-328 series. The differences between these devices is primarily the packaging and pinout so most issues will apply to all devices.
Post Reply
cadillackid
Posts: 35
Joined: 22 August 2009, 16:34 PM

ZX-328n resets?

Post by cadillackid »

in my project.. I am powering my ZX-328n board from the 5 volt power supply of the HVAC unit it is connected to...

no worries on current as the original config of this unit is that it's 5 volt supply powers a backlit LCD based thermostat.. im puilling roughly 1/3 the current that the T-stat pulled....

I notice my ZX is resetting itself (I'll see the banner screen in my debug output)..

it seems the only time these resets occur is when the HVAC unit itself is in-use... so my guess is when it's relays open or close and such that it's putting some dips in the 5 volt line causing the ZX to reset...

right now im just running the 5 volts directly from the unit to the ZX and also the DS-1267 chips and to the ZX interface I/O circuits....

should I have some sort of capacitor and diode on my board to help with the power dips? how do I know how big of cap to put in?

sorry for the lame question.. im relatively new to the idea of completely designing a board from scratch....

since I used the ZX interface I/O I have all of the included support electronics connected that came with that board.. but nothing ahead of it on the power supply..
-Christopher
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

There are two possibilities. You might be seeing voltage dips or you might be seeing inductive spikes.

A large capacitor stores charge and acts like a battery during dips. How large a cap depends on the depth and duration of the dips - I'd start with 10µF.

A transient voltage suppressor (Transorb) can help with spikes.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

You might consider adding a diode, too, to isolate your filter capacitor from others on the supply line. The downside of this is that it lowers the supply voltage to the ZX slightly (0.2V to 0.7V or so depending on the type of diode). This small decrease won't matter for most things but if you're using the Vcc supply as the reference for ADC readings (as is usually the case) the difference will affect the conversion values.

Are you controlling relays (or other inductive loads) with ZX outputs? If so, do you have transient suppression diodes installed?

Another alternative is to derive your own independent +5V supply from the 24VAC that is commonly available in HVAC systems. It may be useful, too, to optically isolate your controller from the other parts of the system to minimize the effect of transients elsewhere in the system.
- Don Kinzer
cadillackid
Posts: 35
Joined: 22 August 2009, 16:34 PM

Post by cadillackid »

right now the unit controllers are not controlling any relays....

the only thing it does now is communicate with the HVAC unit itself via the comms line which is a couple pins off of the ZX at TTL levels...

and then to the PC via the interface I/O board serial port at RS232 levels..

I do use the 5 volts to power the Micro and for DAC of sorts.. the digital Pot produces a 0-5 volt output that I use to "fake out" the unit's internal temperature sensor. that way the room thermostat's temp sensor is what is used to control the unit.. its a simple thermistor so i wrote a routine that calibrates and stores the values for temperatures from 45 all the way up to 99.. and it works good...

there is no 24 volts present at this unit.. it's board is powered by 110 or 220 from the line (depending on unit size).. im trying to avoid a plug-in power supply as there is usually no outlets near a unit...

there is 12 volts present on the unit's board however that would mean modding the unit's board to get it and could void a customer warranty.. so i am trying to power from the 5 volts that is provided by it... i will try putting a filter cap on and see how that goes...

the resets arent a Huge issue in operation as I have code built-in to recover from a reset without the unit being affected, however i dont like them nevertheless...

also is it normal to get a reset when you drop and re-enable DTR on the com1 port?
-Christopher
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

cadillackid wrote:also is it normal to get a reset when you drop and re-enable DTR on the com1 port?
Yes. Any positive-going transition on the DTR line will generate a reset pulse to the ZX. Note that it is common for the DTR line to toggle one or more times during the boot-up sequence of the PC. I don't think that there is any way to prevent this. I've seen it happen on XP and Win2K systems. I suspect that it also occurs with earlier versions of Windows and Linux boxes, too.

It may be a good idea to design in a jumper to allow your application to be disconnected from the DTR/ATN resets. Our ZX-1281 and ZX-1280 Development Boards have such a jumper. Consult the schematic in the manual to see how it is implemented.

http://www.zbasic.net/doc/ZX-1281_DevBoard
- Don Kinzer
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

This is an interesting question!

I have used a TVS in many applications, but I have always used it in the power to the voltage regulator, not afterward. It will not clamp the voltage to 5.000V, so you would still get some sort of excess voltage to the ZX.

A capacitor is OK, but it is averaging out the voltage. This is fine for ripple, but not as fine for transients. It will act as a "peak and hold" to some extent. The size of the spike is lessened, but its duration is extended.

I have also used inductors on the voltage supplyto a regulator also, but not as a filter on the actual 5v, except when filtering the AVCC for the uC.

An RC low pass filter will have some sort of a voltage drop across the resistor, and this can have an influence of ADC as was pointed out earlier.

All in all, I am not positive what would be the best way to get a well filtered 5V source when you need the full 5V. If you needed 3.3V, it would be a little easier.

Maybe use a boost regulator on the 5V to make something greater, like 9V, then filter it and feed that to another 5V regulator?

-Tony
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

If you have a 'scope you can check whether the problem is dips or spikes. Without a 'scope, if it resets when the unit starts, it's likely to be a dip; if it resets when the unit shuts off, it's likely to be a spike.
cadillackid
Posts: 35
Joined: 22 August 2009, 16:34 PM

Post by cadillackid »

I actually Like the DTR transition reset... being that in the event my controller locks up it might be a way to "unlock" it.. granted I dont plan on lock-ups, however the host PC has some control over it that way..... in the completed final plan only the 1280 will be connected to a PC... for right now each zone controller will be.. and I did disable the DTR to see if this was the source of my resets and it is not...

a PC will go through a couple transitions of DTR on bootup... however in my case if the PC is down these HVAC units will not operate.. the system will switch over to the failsafe high efficiency Gas Heat at a set blower speed and all dampers open in the event of PC failure....

I consider A/C non mission critical. and heatpumps are same way as long as there is aux heat... since the testing is going on in my own house I can get things to run if needbe... I also save all the settings in non volatile so in the event of a reset the controllers start back up to their previous running config....

it appears the source is an ever so slight dip in the 5 volts related to when the reversing valve on the unit energizes to go from cool into heat mode... or idle into heat mode...

these units have soft start as they are inverters so there is no surge on startup... as does the main air handler blower it is also soft start as well...

im going to try a cap and see how that does..

its a pretty big project so I go one step at a time... I started this with the idea of using it in my own home. however it seems to have gained some interest so who knows where it will go in the future... if it goes far im sure I'll end up hiring someone to design the electronics and circuit boards "right".....

I've installed lots of HVAC control systems and written lots of controls code for such systems however this is first time i have ever designed and built and programmed one from the ground up... I am having fun with it..
-Christopher
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

cadillackid wrote:[...]in the event my controller locks up it might be a way to "unlock" it.
Of course you can add a momentary switch to ground the reset line to get the same result. The ATN jumper prevents inadvertent resets.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

It's when the blower shuts off that you may see an inductive spike.
cadillackid
Posts: 35
Joined: 22 August 2009, 16:34 PM

Post by cadillackid »

inductive spike even with a soft start soft shut off?

-Christopher
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

What is soft start soft shut off?

You still see a dip with soft start, don't you?

If you are seeing spikes, a ferrite bead might help.
cadillackid
Posts: 35
Joined: 22 August 2009, 16:34 PM

Post by cadillackid »

it appears that the 10 uF CAP fixed the issue... the reversing solenoid on the unit was causing a little dip in the power... not much but enough to reboot the ZX...

the furnace blower itself is soft start soft shut off.. meaning it is on a variable speed controller.. and the speed controller slowly ramps up the blower to whatever the set speed called by the computer is..

the blower speed controller is NOT connected to the ZX.. it is currently connected via MODBUS to the PC...

I also have the blower controller programmed to ramp Off the blower as well... these are functions of the speed control itself

-Christopher
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

cadillackid wrote:the blower speed controller is NOT connected to the ZX.. it is currently connected via MODBUS to the PC...
That doesn't matter much with inductive spikes which occur when an inductive load is interrupted - the spikes can arc across switch contacts and propagate throughout the household wiring. Your ramp-up/ramp-down controller probably eliminates them.
Post Reply