Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 2 of 3 < 1 2 3 >
Topic Options
#356083 - 02/11/2012 00:41 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: mlord
... my multi-meter claims 1VAC is present at the input to the Buck (along with 34.8VDC). If that means what I think it means, then I've got about 3% ripple at that point.

My DSO claims 833mV of ripple, which works out to about 2.4%, at frequencies varying between 60Hz and 120Hz. The Buck switches at 150KHz, so I suppose the short bursts from it are confusing my easily befuddled DSO. smile

Cheers

Top
#356085 - 02/11/2012 06:13 Re: 24VAC to 5VDC ? [Re: mlord]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Your DSO is probably trying to look for a sine wave so perhaps that's where the 60/120Hz is coming from (rectified 60Hz really becomes a 120Hz repeating signal).

You can just view it yourself and measure the high low points. AC couple the input (which removes the DC) and zoom in the vertical axis to see the ripple. Do this on the 5V and 3.3V lines likewise if you want to check. At the end of the day they are the most important. I would expect to see something of the order of tens of mV on the 5V line but the 3V should be fairly smooth.

A couple of percent ripple should be OK. Main thing it will affect is the lifetime of that frontend filter cap.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#356093 - 02/11/2012 12:07 Re: 24VAC to 5VDC ? [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
The 5V and 3.3V lines didn't show any measurable ripple at all.. whatever there may have been was lost in the noise floor of the scope. I'm happy. Case closed on that one. smile

Top
#356112 - 05/11/2012 20:32 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: mlord
.. somehow I've managed to fry three (3!!) of my FTDI USB/serial breakout boards.. must have a wire crossed somewhere there.

This has proven to be a rather sticky problem.
I sorted out a minor wiring error, replaced all of the FTDI SMD chips on the breakout boards, and.. over the weekend managed to fry all three of them AGAIN, and even fried one a third time after replacing the replaced chip again.

They work, sometimes, then die mysteriously. One thing they definitely don't like is sharing the ethernet cable with ethernet (2 pairs for serial, 2 for ethernet). Instant death doing that. The last one fried while operating on a dedicated run of cat5e not shared with anything.

So.. more FTDI replacement chips are on the way from digikey again .. the FedEx dude ought to be here around 11am Tuesday with them. And this time I'm putting a dedicated serial adapter inside the thermostat itself, and running the USB back to my PC over cat5 with a pair of DX.COM USB extenders.

That ought to put an end to frying the serial adapters.
Next up after that is taking over the HRV air-exchanger controls.

Top
#356113 - 05/11/2012 20:54 Re: 24VAC to 5VDC ? [Re: mlord]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Sharing cable (well running cables in closely in parallel) shouldn't be killing anything. Something else isn't right. And they shouldn't be just dieing for no apparent reason.

Without knowing the exact wiring, it's a bit hard to say what might be wrong but I'd guess more likely on the power supply side of things than anything

Wrong supply voltage?
Supply voltage connected somewhere it shouldn't be?
Missing power supply?
Correct voltage levels on the TX/RX?
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#356114 - 05/11/2012 21:00 Re: 24VAC to 5VDC ? [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
That stuff is all good.
And it all works with a really short cable.

But I've fried too many chips now to continue the experiment, so we may never know for sure what all of the causes were.

Cheers

Top
#356115 - 05/11/2012 21:52 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Mmm.. actually, I just had a thought. I wonder if circuit "ground" is the cause. The TTL serial signals from the thermostat are relative to it's own "ground/earth" wiring, derived from one leg off the bridge rectifier.

Thinking about it now, I don't believe I've fried anything when the serial is connected a battery powered notebook computer, and I know for sure I've fried a ton of components when the notebook is on AC wall power.. with a house ground/earth.

I don't know much at all about how the AC supply from the furnace is wired, but it might have one leg hooked to house ground/earth, or at least have some hefty potential from earth.

Undoubtedly something to do with that.

Ethernet is fine of course, because it uses transformer couplings for the cat5e connections at both ends. But serial has a DC ground..

I'm putting an opto-isolator chip on the board now for the three serial signals. That should keep me from frying anything new.

Top
#356761 - 11/12/2012 12:36 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
It's been a while since I posted an update here. The optocoupler circuit is in place and working well, so I now have remote serial port access to the thermostat, as well as ethernet / web access.

Next step is taking over control of the HVAC (air exchanger) unit. This one is by Venmar, and apparently the controls don't work like many/most other units on the market. I've googled it, and there are lots of reports of people scratching their heads when trying to hook it up to fancy store-bought home controls.

The main unit has two terminals specifically designed for use with simple switches/relays, but behaviour is worse than dumb: closing the contacts triggers a 20-minute timer cycle in the main unit, which cannot be stopped once triggered. Duh.

The wall controller for the unit has a 4-wire interface. Some probing revealed 12VDC power and ground as two of the wires, and +5VDC on the other too. Oh oh.. Logic Analyzer time. It turns out that those two wires are a custom serial interface between the main unit and the wall controller. One wire for each direction, 300 bits/sec.

Then it gets weird. Pressing a button on the controller sends a 24-bit sequence (with a single start bit, and one stop bit). I'm not sure what the purpose of those transmissions is, because they just inform the main unit what "mode" the controller is in. The main unit responds with a 7-bit (or 6-bit?) reply.

Whenever the controller actually turns the fans "on", it sends a 6/7 bit request to the main unit, and gets another 6/7 bit reply. I think the "reply" packets are just to tell the controller to turn status LEDs on/off. One arrives whenever the fan starts up, and another when it shuts off, including when triggered by the simple "timer" contacts discussed earlier.

Anyway, it all looks messy but doable. But during the course of playing with it, I discovered that if I disconnect the main controller, and then just short the transmit line to ground via a 1K resistor, the fan turns on. Remove the short, and the fan turns off. More or less exactly what I need! The main unit seems to have a pull-up on the line, so it floats back to +5V when not connected or shorted to anything. Current through my resistor is about half a milliamp.

So, I'll just ignore the fancy protocol and hook it up to one of the relays in the thermostat. The only slight downside, is this method only operates the fan at HIGH speed. There's also a LOW speed that would have been nice to access, but this would require the fancy digital protocol.

Cheers

Top
#356762 - 11/12/2012 12:54 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Oh, the thermostat also now has a proximity sensor wired in, which turns off the LCD display when nobody is in front of the unit. Much better at night time now. smile

The photo shows the current state of things, with my probe wires still hooked up to the HVAC controller above the thermostat. Lots of reflections from the clear Lexan cover plate on the stat itself.


Attachments
stat1.jpg

Description: Current state of the thermostat, with HVAC controller above.




Edited by mlord (11/12/2012 13:17)
Edit Reason: Much better photo

Top
#356764 - 11/12/2012 15:30 Re: 24VAC to 5VDC ? [Re: mlord]
sein
old hand

Registered: 07/01/2005
Posts: 893
Loc: Sector ZZ9pZa
Good job Mark!
_________________________
Hussein

Top
#356765 - 11/12/2012 19:48 Re: 24VAC to 5VDC ? [Re: sein]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
It does look a bit "raw" with the clear cover plate.

Being a geek, I'll probably leave it like that for a while. Eventually I can insert a photo or just a solid colour of paper between the clear cover and the innards, with cut-outs for the LCD and buttons, and get it to match the décor a bit better. smile

Top
#356767 - 12/12/2012 09:14 Re: 24VAC to 5VDC ? [Re: mlord]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Awesome Mark smile

Where's theres a will, there's a way! I keep meaning to do something to control our heating here, but I never get the time....

Adrian

Top
#356769 - 12/12/2012 12:22 Re: 24VAC to 5VDC ? [Re: sn00p]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
I'm a bit embarrassed by all of the "store bought modules", rather than having rolled it entirely on my own from bare chips. But they're so incredibly cheap to buy that way! Cheaper than the bare parts (by a long way). Eg. about $4 for the SPI-to-ethernet bridge module, DELIVERED! Or less than $2 for the DC-to-DC converter board.

Unbelievable.

Cheers!

Top
#356770 - 13/12/2012 05:34 Re: 24VAC to 5VDC ? [Re: mlord]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Originally Posted By: mlord
I'm a bit embarrassed by all of the "store bought modules", rather than having rolled it entirely on my own from bare chips. But they're so incredibly cheap to buy that way! Cheaper than the bare parts (by a long way). Eg. about $4 for the SPI-to-ethernet bridge module, DELIVERED! Or less than $2 for the DC-to-DC converter board.

Unbelievable.

Cheers!


Hah, yeah....the problem with that for me is that I'm lazy when it comes to wiring stuff together or using veroboard, I get bored after about 2 minutes!

For this reason most of the stuff we design has i2c+power broken out to a header (even if not populated) just incase we need to try something out or add some extra functionality at a later date - or just want to have a play with some other bit of circuit.

To me this (embedded) is where computing becomes fun again, it's like the (g)olden days of computing for me, the BBC micro, Sinclair Spectum, Archimedes where everything was bare metal.

I find it very hard to get enthused about writing desktop software anymore.

Top
#356777 - 13/12/2012 12:15 Re: 24VAC to 5VDC ? [Re: sn00p]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
Originally Posted By: sn00p

I find it very hard to get enthused about writing desktop software anymore.


Yeah - make your own OS - much more fun smile
_________________________
LittleBlueThing Running twin 30's

Top
#356780 - 13/12/2012 15:25 Re: 24VAC to 5VDC ? [Re: mlord]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
(Admin note, finally forked this thread out of the old one. Kinda odd to have a self built thermostat thread in one titled "Attention Hugo".)

Top
#359603 - 05/09/2013 20:16 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: mlord
The buck regulator is a standard circuit from the LM2695S-ADJ datasheet. The datasheet says "45V absolute maximum; but only up to 40V for the operating range".

So we're under 40V, I'd just like a little more margin, or some protection against the odd spike


Well, at some point during our holiday last week, the regulator stopped passing current. Warm (but not hot) to the touch when I inspected it today. Probably had a line surge from an electrical storm last week, and killed the buck regulator.

So I've installed my "spare" module, and the thermostat is working fine again for now.

At some point in the past year, the LM2576HV chip has made it onto commodity regulator boards such as these. This chip ought to be considerably more robust, with a max operating input voltage of 60V compared to 40V for the LM2695S. So I've ordered one (plus a spare) to replace the current module. $5.24 from HK via eBay.

Top
#359605 - 05/09/2013 22:20 Re: 24VAC to 5VDC ? [Re: mlord]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Higher input voltage doesn't not equate to better surge (really impulse if lightning) immunity.

What protection is on the frontend of this? Actually I'm not sure what the final design was in the end.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#359609 - 06/09/2013 10:39 Re: 24VAC to 5VDC ? [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
The thermostat takes "24VAC" from the furnace, which is really more like 28VAC. This goes through a bridge rectifier with a largish filter cap afterwords, giving around 38-39VDC as input to the (40V max) DC-to-DC converter board. The board then spits out 5.000VDC for use by the thermostat.

With a lightning strike in the neighbourhood, our house lights sometimes go brighter for 2-4 seconds, indicating a small voltage surge from the mains. I suspect this is what may have happened, just a few volts higher than normal for a few seconds, maybe a few occurrences during a storm.

Still, I wouldn't mind adding some surge protection in front of all of that. I wonder if perhaps I could just dismantle a normal AC surge suppressor and steal the relevant components for use on the 24(28)VAC input lines?

-ml

Top
#359611 - 06/09/2013 11:03 Re: 24VAC to 5VDC ? [Re: mlord]
larry818
old hand

Registered: 01/10/2002
Posts: 1039
Loc: Fullerton, Calif.
I would think you would have to put those components upstream of the furnace supply transformer. Typically a line surge suppressor caps the voltage at 150v to 250v, which is a significant surge at 24v.

Use a SA28A Transient Voltage Suppressor (TVS) on the 24v line, it'll cap at 28v and is all of 15 cents.

Alternately, you can install a couple of these on the incoming mains and protect the whole house:

http://www.alliedelec.com/search/productdetail.aspx?SKU=70025984#tab=specs

Top
#359612 - 06/09/2013 11:17 Re: 24VAC to 5VDC ? [Re: mlord]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Ok if you are running that close to the max input voltage then maybe a slight over voltage at the mains might damage things but I probably would expect it run a bit beyond absolute max before really dieing.

If you take something designed to protect something expecting 110-240VAC and use it at the 24VAC nominal output it won't do much/anything. Is that what you mean? Typically they will be quite primitive - often just a MOV and inductor.

You're best to have some "headroom" between normal output (38-39VDC) and maximum input (40VDC) and try to clamp the voltage there to have some margin. If you increase the max input to 60VDC though then you get that already but that won't do much for an impulse which can easily be multiple kV at the 110-240V side (but for a very short time)

It depends a bit on the actual failure mode. A surge or impulse is different to a few seconds of over voltage (typically called a swell) and they require different protection. If just a simple swell, then more margin will do it with the 60V input. Not sure how a lightning strike might cause a swell other than maybe causing breakers to open reducing the load and thus the voltage will rise a bit. Then the breakers automatically reclose and the load increases/voltage reduces.

If a surge or impulse due to say a lightning strike, these are much shorter events of the order of milli/microseconds. Then you need to start looking at transorbs/MOVs. An MOV is the cheap and simple protection method for most things. Look to clamp it well above the normal output though since the 24(28)VAC will vary as you've seen. The MOV should not be conducting in normal use ever or it will just die even quicker.

I'm a believer in protecting as early as possible e.g. at the 24VAC line where I'd look to put something like a 33V or 39V MOV. Not 100% on values available in that range but something like that.

_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#359614 - 06/09/2013 13:29 Re: 24VAC to 5VDC ? [Re: Shonky]
K447
old hand

Registered: 29/05/2002
Posts: 798
Loc: near Toronto, Ontario, Canada
I did not read back to see if this was mentioned or even possible in terms of mounting space;

If you connect a 24 VAC step down transformer (typically it would have a 120V AC mains input and 24VAC output), but use one with a center tap output, you can use it as a step down auto-transformer.

Cap off the 120VAC leads, no connection. Connect the two 24VAC leads to your power source. Use the center-tap output wire and ONE of the 24VAC end wires as your power feed to the bridge rectifier.

This will delver 12VAC (roughly) into your DC rectifier and filter, which would be half of the previous arrangement.

It requires finding room for the transformer, of course.

Top
#359617 - 06/09/2013 19:38 Re: 24VAC to 5VDC ? [Re: K447]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Mmm.. the transformer idea is clever, and thanks guys for the MOV tutorials. I'll hunt for a suitable MOV.

For whole-house surge protection, I'd need to have two free spots in the breaker panel -- only have one, so no go on that front.

Cheers

Top
#359618 - 06/09/2013 19:51 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Mmm.. 18V MOV varistors are readily available (and cheap!) on eBay -- any problem with putting two of those in series, across the 28VAC input? (two 18V in series == 36V protection??)

Nevermind .. the ones I saw were for 18VDC, not 18VAC. Not high enough for the DC part.


Edited by mlord (06/09/2013 19:54)

Top
#359619 - 07/09/2013 01:04 Re: 24VAC to 5VDC ? [Re: mlord]
K447
old hand

Registered: 29/05/2002
Posts: 798
Loc: near Toronto, Ontario, Canada
Originally Posted By: mlord
... For whole-house surge protection, I'd need to have two free spots in the breaker panel -- only have one, so no go on that front....
I often solve that problem by replacing four regular breakers with a quad breaker. Quad breakers use two slots but provide four breakers. Typically the center pair are linked to feed a split circuit at 20, 30 or 40 Amps.

I normally select one that has the outer breakers as 15 Amps each. Pull out the stove or clothes dryer breaker, install the Quad. Then move over two 15 Amp single circuits from whatever, and free up the slots.

http://www.homedepot.ca/product/quad-typ...ker-1000/941163

Top
#359620 - 07/09/2013 01:44 Re: 24VAC to 5VDC ? [Re: K447]
larry818
old hand

Registered: 01/10/2002
Posts: 1039
Loc: Fullerton, Calif.
The suppressors that I linked to for the whole house don't use a breaker spot. They would just need to be mounted inside the load center somewhere.

Top
#359621 - 07/09/2013 02:08 Re: 24VAC to 5VDC ? [Re: larry818]
K447
old hand

Registered: 29/05/2002
Posts: 798
Loc: near Toronto, Ontario, Canada
Rather than adapting a DIN type module, there are panel mount suppressor products that fit into a standard wiring hole in the panel and wire into existing breakers.

http://www.amazon.com/Panamax-Whole-Home-Service-Entrance-Protector/dp/B00271MIV4

Top
#359622 - 07/09/2013 10:56 Re: 24VAC to 5VDC ? [Re: K447]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Our panel here is already fully populated with "quad" breakers, so it really is "full" at present.

Here in Canada, I believe the Electrical Code requires dedicated breaker protection for whole house surge suppressors -- all of the cUL approved ones sold here suggest this in the installation instructions.

K447: do you know what Code says for this here?

Cheers

Top
#359623 - 07/09/2013 11:13 Re: 24VAC to 5VDC ? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
I still find it amazing that a small house like ours manages to fill 39 spots in a 40 breaker panel. That's a consequence of modern kitchen wiring, and a large basement workshop with two 240V circuits and lots of 120V circuits. Plus the Code requirement of no more than 12 devices per 15A circuit.

Top
#359625 - 07/09/2013 16:44 Re: 24VAC to 5VDC ? [Re: mlord]
K447
old hand

Registered: 29/05/2002
Posts: 798
Loc: near Toronto, Ontario, Canada
Originally Posted By: mlord
I still find it amazing that a small house like ours manages to fill 39 spots in a 40 breaker panel. That's a consequence of modern kitchen wiring, and a large basement workshop with two 240V circuits and lots of 120V circuits. Plus the Code requirement of no more than 12 devices per 15A circuit.
I hope it is not one of these;

Federal Pacific Electric (FPE Stab-Lok)

Top
Page 2 of 3 < 1 2 3 >