Parallelling a switch..

Go To Last Post
72 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Strange title perhaps, but bear with me and I think you will get it. I am comfortable boasting when it comes to software, but with eletronics it's the other way around. I can not understand how Jim et al can move their way around such stuff with the ease they do... Here goes:

I have a remote control that I want to operate from an AVR instead of with the thumb [*]. The remote has those pushbuttons where there are two "contact islands" on the PCB and a dome of conductive rubber (I suppose) above which connects the two islands when pressed against the PCB.

I would like not to need to understand the circuit on the PCB, so I'm hoping that I can just connect some BJTs or FETs or something to the islands and control them from an AVR. (There are either exisiting vias or ample place to drill holes so that I can solder in the wires).

Not knowing anything about the chip on the remote PCB, or the mess of discrete SMT components, or the meandering track which I suppose are antennas or maybe resistors:

Is this doable? How? Good advice?

[*] Happy I'm not asking about doing this with an ARM. "operate it with an ARM in thumb mode instead of the thumb of my hand" might be confusing. Moving the remote to the other hand might imply "thumb-2" etc... :D

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Johan,

I think that the safest way to activate (meaning, to short) those remote control contacts without having to do any further research analyzing the possible scan scheme of the contact matrix would be using the good-old '4066 type of MOS analog switches. The CD4066 or the 74HC(T)4066 should be more than suitable for that task. The CD-series family has a wider operating voltage range (3..15V) but a higher ON-state resistance (300..1300 Ohm) and the 74-series family are much faster devices, with narrower operating voltage range (2V..5V, typically) and a significantly lower ON-state resistance (30 Ohm, typically).

You will only have to make sure that the remote control's Vcc (== Batt(+)) and Vee (== Batt(-)) should be within the 4066's Vdd (== V+) and Vss (== GND) voltage range, meaning that Vss<=Vee and Vdd>=Vcc. The ON-state resistance requirements of the remote control input logic should be easily covered the CD-series analog switches, because the ON-state resistance of the activated rubber-button contacts are in the range of 100Ω (when pressed hard) to 10KΩ.

-George

I hope for nothing; I fear nothing; I am free. (Nikos Kazantzakis)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The rubber pads are just cushions usually. The switch is a metallic dome over a "dot". When you push on the button, the cushion presses down on the metallic dome and makes contact with the dot under it. When released the rubber retakes its form, and so does the dome.

The specifics of how the switches are connected are unknown to me, but you should be able to just cut both traces to each button and re-route to some transistors. Maybe even rip the rubber + dome off and solder SOT23 transistors straight on there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

re-route to some transistors

Specifically how? I told you I am a half idiot when it comes to these things.. :blush: Collector and emitter to the "islands" and the base to the AVR pin. Nothing else needed? I'm sure you can talk for hours about potential differences, leak currents, hfe and whatnot. I just don't know enough to feel that I just can wire this up. Gimme digital logic gates, or preferably software. That will make me fell secure. This is in the analogue world, and there I can't tell my nose from my bum..

I'd rather not wire up 10 DIL relays for this, but that would make me feel safer as I then have two more or less islated systems. No, rather not opto-couplers either..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Wed. Nov 11, 2009 - 03:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A single regular push button normally makes to GND. It will normally have a weak pull-up, so that it reads 1 when idle, 0 when pushed.

Your remote control almost certainly has many keys in a matrix arrangement. So a key 'makes' to a 'column' rather than GND. The software just attaches one column at a time to GND.

So you will not really be able to use a regular port pin to GND. You could connect an analogue switch in parallel with the existing key.

Do you want to operate one key or the whole keypad?

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are adventurous you can just connect the gnd and a port pin of the AVR over the switch of the remote. You'll have to pay attention to polarity. To push the switch from the AVR you set the pin to output and low (0). To release the switch you set the pin to input (Hi-Z).

If you want to be careful you can use a optocoupler. The output goes over the pushbutton of the remote and the input via current limiting resistor to the AVR pin. Here you need a high on the pin to 'push' the button (light the led in the optocoupler).

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David!

The remote is one for those remote-cotrolled wall outlets. Three "wharts" controlled. On and off for each "whart". Four different channels selectable. 3*2 + 4 = 10 switches.

I want to operate them all from an AVR.

As I have said, I would rather just find a way to close a circuit just like the existing rubber switches do, and not care about how the remote circuit actually is built up.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Don't have either the stuff in fron of me, or the things to do a decent illustration. Below is what I'm thinking, expressed through MS Paint. Now, do you understand what level I'm on...

Attachment(s): 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan:

Since you are software oriented I an curious why you are taking the hardware approach. It may be easier to use an AVR to decode the signals from your existing remote. With that knowledge in hand it should be easy to then use the AVR to generate similar signals.

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The transistor, as "drawn" in the previous message, could really upset the scanning of the switch array, IF that is what it is. An analog switch such as 4066 would be a far safer route. There are two caveats:

1) The on resistance of a standard 4066 may be a bit high. The device being hacked may not reliably be able to tell that the faked switch is "closed".

2) You will want to find a "ground" (that is, "common" or "negative rail") point in the device being hacked and also connect that to the ground of the AVR circuit.

Hmmm, just noticed that there are multiple switches in "wall wharts". This is more of a challenge and may be a safety issue. It does not give me the warm fuzzies!

Have fun and be safe!
Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan.

How many buttons should be operated ?

If not too many so ABSOLUTELY the safest way is to use relays.

You live so near to me that I could easily post You a tube full of these. I have these in thousands.

Since You only need to make a contact You should be fin with a so called "line sense relay" which will pull at 20mA current. The coil resistance is 9 ohms and the contacts are in vacuum. The only doubt here is the size of the thing - it will get bigger than using sot23 transistors.

But

You do not need to bother about polarities or such.

The price is VERY negotiable. I bet that the posting fee would make the major expense here.

The relays I am talkin about can be seen at my site

http://furpile.com/stock/Varasto...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would like to point out that first of all you do not know how the existing switches are connected (matrix or 10x single ended?), so with that in mind, start by posting a picture of the remote control PCB. If at all possible try to identify the main lines (VCC/GND) and work from there. This will tell you how to connect your transistors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan,

If you have 10 physical switches then they are very likely in a matrix. So you need 10 opto-couplers or 10 analog switches of the 4066 type.

But if your wall-warts respond to a remote control, just wire a IR-diode to your AVR and send the commands remotely. You should find the commands that your device uses via google.

Or ask your dog to press the buttons for you.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

just wire a IR-diode

Won't do a thing for me. It's not IR. It's radio, 433 MHz or some such.

Quote:

How many buttons should be operated ?

At least six - at the most ten.

Quote:

the safest way is to use relays.

You live so near to me that I could easily post You a tube full of these. I have these in thousands.


I have a tube of DIL relays tucked away somewhere. (The ones you have seem to be rather bulky.) As the relays will put an inductive load on the AVR pin I suppose that I have to go for freewheeling diodes also...

Quote:

The transistor, as "drawn" in the previous message, could really upset the scanning of the switch array

It's because of things like this I'm asking. Thank you, Jim, oh master of the analogue kingdom!

Quote:

You will want to find a "ground"

That I have. The remote work from a CR coin cell battery, and my plan was to desolder the battery holder and supply 3 Volts to the thing from the same supply that goes to the AVR, and of-course they will share ground.

Quote:

This is more of a challenge and may be a safety issue.

It's not the wall-wart I want to break into - it's the remote. And it is exactly because of safety reasons. I figured that a safe way to control mains voltage from an AVR would be to be galvanically isolated from it, and not have to build the mains device myself. Enter these remotely controlled wart in-out'lets. (At least for Scandinavian readers, you might be familar with eg the Nexa stuff that sells on eg Kjell&co). So I hack the remote, do what I like with it. Don't build myself teh mains device, but get a "certified" device (that I don't hack) and I should be on the safe side. The remote costs something like USD 12, and has all the stuff I want in terms of radio etc (which I am not the least interested in doing myself - life is just too short). All I need to be able to do is to close the circuit involving a certain switch, ie make contact between the two "islands", controlled by my AVR by some simple means, rather than putting my finger on the rubber nipple :wink:. I want to do this because my finger is too short - I saw this as a better plan than to grow a 100 kilometer nail. I was hoping that some small discrete components, eg a transistor and maybe some resistors or stuff would suffice, but as I get you this won't do.
I could get a 433 MHz transmitter module, learn how to interface to that, Google for information on the "Nexa protocol", implement it, test it etc etc, but I'm really not interested in the innards of all those things. I was hoping to use the hacked remote as a black box with as little work as possible. I want to focus on the application.

Oh well, time to dig for those relays then!

Photo of the opened remote coming soon..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Forget about relays and RF modules and whatnot. It's counter-productive. I am almost certain you will be able to simply add 10x cheap surface mounted analog switches/transistors and a low-power AVR and be done with it. Post that picture and we will know more... A part number for the remote might also let you dig up a schematic for it.

Matrix is very common but also more complicated than using 10x single ended active low switches into a shift register. I have seen a lot of remotes made that way, including the one to my Pioneer VSX-9000 and 2 old TV remotes by Samsung and Hitachi.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Forget about relays and RF modules and whatnot. It's counter-productive. I am almost certain you will be able to simply add 10x cheap surface mounted analog switches/transistors and a low-power AVR and be done with it.

I'm missing something here (or you are). If I dont want to open the whart, but control it as it is how can I then get rid of the RF stuff?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. Exchange infra-red diode to 433MHz transmitter module. So your remote can be "heard" in a different room.

I would guess that opto couplers would be smaller and easier than relays. But if we see your photo, it could be that the switches are not in a matrix. In which case you need no interface at all.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Exchange infra-red diode to 433MHz transmitter module.

My ambition is exactly to avoid this. I do not care about the specifics of the radio link. I do not care about the specifics of the radio protocol. I was hoping to do the hack of the remote in a few hours, whereas exploring and learning about the specifics of the radio, protocol and stuff seems to easily cost me a month worth of free evenings. Hacking the remote seemed like the easy way to get a black box that talks to the whart.

The monetary cost for a remote to hack is on the same magnitude as the cost of the 433 MHz transmitter module.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Images:

First, the top of the PCB from the remote with the switch "islands" visible, and the battery "connector".

Notice the vias in between the "islands" which seem perfect for the "break out".

As you can see all the top row switches (the "On" switches for three individual wharts) share one PCB net for one of their islands. Likewise for the bottom row of switches (the "off" switches). The other islands are shared between the on- and off-switch for the specific whart. Yes a matrix, of sorts. It sums up to five leads exiting "the switch area" and all of them go to the IC on the bottom side of the PCB.

Next, the bottom side of the PCB with the IC and discrete components. And the meandering tracks (antennas?). Visible are also the channel selector - this is a slide switch so only one is closed at a time. The upper four contact surfaces are all ground if I traced them correctly. All those SMT discretes are just a mess to me. In some places it is impossible to see if contact is made between a trace and a component. Uh!

Lastly a photo of the whart, not to be opened at all. Only controlled from the hacked remote.

Attachment(s): 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan, there is another way to do this, and it is more elegant because it does not use any additional chips with analog switches or, even worse, a handful of relays with their drivers! Explaining myself:

If:
1. The power supply of the unknown IC connected to the push-buttons matrix of the remote control transmitter is suitable to also supply with power an AVR too, and,
2. There is some time to spare to figure out the scanning method of the push-buttons matrix and the scanning timings (this shouldn't be a tough challenge, even for someone with no oscilloscope in their possession; just connect an AVR to all the column and the row lines of the push-button matrix, log the activity of those lines while pressing one button at a time, and, finally, build the truth table of those I/Os of the unknown IC),

Then:
Connect the AVR straight to the unknown IC power supply and the I/Os that drive and sense the rubber push-buttons. Those I/O lines should probably form a matrix of 3 column-lines by 4 row-lines, or something similar. Let's call these lines driving-lines and sensing-lines).

To transmit a certain code:
1. Initiate the scanning procedure by pulling an input-line low (or high, according to the truth table) to wake the unknown IC up,
2. Wait for the certain driving-line to go LOW (or high, according to the truth table) in order to pull down (or up, according to the truth table) the specific input-line that produces the desired TX code to be transmitted,
3. The very moment the driving-line tristates, release the sensing-line previously pulled low (or high, according to the truth table), before gettimg the unknown IC confused when it will engage the next driving-line to scan the rest of the rubber buttons.
4. Loop into this sense-and-drive sequence of the steps (2) and (3) for as long as it will be needed the specific command to be transmitted.
5. When done with the transmission of the command (or the sequence of commands), just put the AVR to sleep to preserve the battery, or whatever...

By the way, I have to correct a couple of typos I made in my previous message, by adding a missing word and fixing the plural I mistakenly used in the last sentence of the second paragraph. It should read:
"The ON-state resistance requirements of the remote control input logic should be easily covered by the CD-series analog switches, because the ON-state resistance of the activated rubber-button contacts is in the range of 100Ω (when pressed hard) to 10KΩ."

-George

I hope for nothing; I fear nothing; I am free. (Nikos Kazantzakis)

Last Edited: Wed. Nov 11, 2009 - 08:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll come over your place and give you a hand, just send return tickets and booking into 5 star accomodation...not your back yard preferably. (infinite stars...)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

All you have to do is operate your remote with a piece of wire. It looks like you have independent switches.

So connect one end of your wire to battery -ve and apply the other end (with 470R resistor) to each switch pad. If every "key" appears to work ok, then you connect your AVR directly to the appropriate via.

Remember to operate the AVR in "common collector" mode. i.e. PORT.# = 0 and switch on with DDR.# = 1 and off with DDR.# = 0

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for your ambitious post, George. ("Efcharistos" or something similar IIRC :wink:). Still, and again, this is an elaborate procedure, which will take me quite some time. If I get you correctly first use an AVR to build an ad hoc analysis instrument, and then use that to implement something relatively complicate that pulls pins on the in cognito IC on the remote. Lets say a couple of evenings for the ad hoc analysis intrument, and double that for the implementation of the "piggyback AVR". The very least of problems multiplies those times. As a software type of person, I am painfully out of botrh good analysis equipment like oscilloscopes and stuff, and the knowledge to use them[*]. It is my absolute ambition to hack the remote without finesse, and hopefully as much as possible as "a black box". I can se the inspiring challenge in revealing the scanning schema, the radio protocol and stuff. But again, time is a scarse resource, and I'd rather spend as much as possible on things other than these issues - the application proper, or a beer, walking the dog, ARM Cortex-M3's, or just sleeping. I am very thankful for your post, but try to avoid the "guts" of the remote and its function like the plague.

[*] I have worked with people who connected a USD 50000 LeCroy oscilloscope to a DVD reference players quadrature decoder, and by a twist of a few knobs and the pressing of a few buttons had the setup to measure the "non-concentricity" of the track (technically we are talking about things called "Radial Run-Out" and "Excentricity"). I understood perfectly what he did (in terms of what he was looking at, and how he processed the raw signals to get what we wanted), but for the life I could never even get close to telling the scope to do that. In my world it would be easier to get a woman to take out the garbage herself :D. Sometimes I wonder if you analogue people are from a different planet.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Wed. Nov 11, 2009 - 09:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UNiXWHoRe wrote:
The rubber pads are just cushions usually. The switch is a metallic dome over a "dot". When you push on the button, the cushion presses down on the metallic dome and makes contact with the dot under it. When released the rubber retakes its form, and so does the dome.

The specifics of how the switches are connected are unknown to me, but you should be able to just cut both traces to each button and re-route to some transistors. Maybe even rip the rubber + dome off and solder SOT23 transistors straight on there.

i would not relay on that explain.
Thees days, there are not a SW at all. yhe "SW" are in fact a capasitor conducting a HF burst at the rigkt time.

HM

HM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David!

Funny, that stuff with the wires, but if that would do then the switches would too...

I realise that I have missed giving you the whole picture. My bad. I've behaved like a noob. Starting a the whart:

The whart sits between a wall outlet and an electric radiator in the summer house (yes, there are wharts that can take that kind of load). The whart is controlled by the hacked remote. It does this just as if the rubber push-buttons where still there. But it is hacked, the rubber push-buttons are no longer there - one of my AVRs is. Specifically it is the AVR on, say, an EtherNut board. It exposes a web server that generates dynamic HTML.

I am in town, 100 kilometers away, on a friday afternoon in December and decide to go to the summer houe in the winter. I start FireFox and surf to johanekdahl.summerhouse.se :D, and get a login page and after that a page with a few check boxes. I click
[X] Radiator for 90 minutes
and click the OK button. I pack the bags, stuff'em in the car, drive the first 15 kilometres to pick up the dog where he stays daytime, and then do the remaining 85 kilometres. I unlock the door and enter into a room which is at 15 degrees C (rather than 5 degrees C). I like that.

(On days when I decide to stay in town, I can of-course surf to the summer house to check temperatures so that the water lines don't freeze, if there has been a power outage and if so when and for how long, tell the control central at the summer house to run a seqence of lignts on and off to make the house look more inhabited etc etc.)

Either I'm missing something (or you where): I can't run your wires for 100 km's.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

yhe "SW" are in fact a capasitor conducting a HF burst at the rigkt time.

Just did a simple check. Supplying power to the remote, and connecting the two "islands" worked just fine (just "strapped" it with a fine screw-driver), so these does not seem to be capacitive switches.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan, since you don't have access to a scope, and it does seem like a scanning matrix, so the relays or the 74HC4066 analog switch is not a bad idea.

Also, since scanning matrices mostly have positive and negative side, you might be able to use optocouplers over the button pins too as long as you put the C and E are the correct way around. You can easily check this, put a diode (schottky or normal) over the pins and see if you can simulate button presses with the diode. Replace diode with optocoupler or phototransistor. Repeat experiment by lighting the optocoupler LED or LED near a phototransistor.

You could also take a 1Mohm potentiometre and see what resistance values cause a button press and what resistance values won't. Put CdS photodetectors with suitable dark/light resistance range over the buttons. Light them somehow.

But what would I do? I'd use a oscilloscope to solve if it really is a matrix and which pins are outputs and which pins are inputs, and are they normally high or low when outputs and do they have pull-ups or pull-downs when input. Then an AVR could drive a certain input pin only when certain pattern is present on output. Heck, too hard, I'd just figure which pin drives the RF transmitter and record the waveform of each button and replace the original chip with AVR that can replicate the waveform to the RF transmitter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok from those pictures Johan there is no matrix. All three switches on one side have a common connection, same on other side, and I bet both sides are connected from underneath.

SO. Figure out if the common side of the switches is GND or pulled-up. Once you have identified the GND side of the switches, connect your NPN's emitter pin to it. Connect the collector to the other side. Now all you have to do is toggle the base of the transistor from your AVR for a reasonnable amount of time to "push" that button. If some of those buttons determine which wart is being addressed, that is all the extent of the modifications you need to do. From there just program the AVR to switch each wart the way you want.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just pulled out the DMM, and measured over the top right switch (as seen in the first picture above). I see a steady 3.28 Volts. Measuring the coin cell on its own I see a steady 3.29 Volts.

I do not think its a matrix.

Now.. Any new bids on the transistor route? I'm holding in my hand two bags with BC547B's and BC557B's respectively.. [Fingers crossed]

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would choose a NPN equivalent to the common 2N3904 or a logic level MOSFET and connect it similarly to the picture attached. Advantage of this is you can leave the rubber buttons alone, and put in your new circuitry too, so buttons will still work when you need them. ;)

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW 3.3v in the above picture refers to the pulled up 3.3v that is already present on the mechanical switch.

I would also recommend you drill a little hole somewhere in the casing to put a connector where you can feed the remote 3.3v from a wall wart for the extended periods you need it functional with no one around, and power your AVR exclusively from it. This will save the little coin battery the trouble of powering your AVR and supplying enough current to drive the transistor's base, as well as keeping the remote portable for when you are actually over there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, that'll be it for tonight. Gotta hit the sack.

Thank you all for the inputs so far! 'Freaks is a fantastic place, with great contributors!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think, if you use a 2N3904, you should have a series resistor from the AVR pin to the base. Perhaps 1K. If you use a FET, say 2N7000 or 2N7002, then you do not need the series gate resistor. (Although a 10K pull down might be indicated, for start up transients).

If your system is tied to the internet then perhaps you have a UPS power supply for short power outtages? The point being that if power outtages are a concern then you need to look at start up conditions for the AVR, and also, perhaps, auto program it to send all off commands to each device on power up, just to be sure they are not accidentally turned on.

PS: If you send me a key to your Summer house I'll be glad to bring my scope.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have the same equipment anf just found the three receivers, but not the remote. I have not used them as I found them to be unreliable in the presence of Wifi networks.

You can just take a small wire with a 100 Ohm resistor and try to connect the negative (or positive) terminal of the battery to the contact area of the switches. I there is no multiplex you should be able to activate each of the contacts. If this is the case you can just connect your six switches to six AVR ports to pull them down (or up) as required.

If you can not activate all switches that way then you'll need a CMOS switch like the mentioned 4066 with one gate per switch.

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm actually scrap the schematic from before. I opened up the picture you posted to full size and now see that this does look indeed like a 2x3 matrix.

The top 3 and bottom 3 are connected as two trios and into 3 pins on the remote. It's just a matter of tracing where these go on the underside and connect the collector of each NPN transistor (use MOSFETS instead, look below) to its appropriate reference. My guess is the 3 connection points are normally weakly pulled up at say 1.5v and pulled either high or low by the top or bottom buttons respectively. I'm sure your DMM can tell you more on this.

Last Edited: Wed. Nov 11, 2009 - 11:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahh, it is alright, Johan! Do not worry! I should be the one to thank you for the time you took to read my messages.

By the way, it does never cease to impress me when I see non-Greek speakers trying to use this powerful (but difficult also language) with the very nasty grammar! The verb «(Σας) Ευχαριστώ» (Efcharisto!) means "Thank (you)!" in Greek; the adjective "Efcharistos" (ευχάριστος) literally means "good-humored", pleasant and congenial :-)
This was a very nice attempt, anyway!

Well, now I saw the pictures of that mystery remote control, I will definitely go for the solution with the relays! I am kidding! I still support the '4066 solution, directly connected to the mystery IC lines (which I bet my /// is a PIC!) after finding out where the buttons are connected to, in order to send those two commands you intend to use: START and STOP!

By the way, if you focus on the "IMG_1430m.jpg" you will see that the six split-buttons do not share one only common line (even though if they did the PCB routing would be more simple than it currently is), but they are multiplexed in a 3x2 matrix, as it can easily be seen. So, single transistors as switches will not do. After all, while the AVR pulls the Base of the transistors high, the B-E current will be inevitably flowing through their Emmiters into the input-lines of the unknown IC continuously, no matter which one of the driving-lines will be active, finally resulting in totally confusing the IC scanning procedure.

Another thing: Your DMM measured a static near-Vcc voltage because the IC was probably in sleep mode, waiting to be awaken. Try sampling the voltage of the same exactly point after pushing some of the buttons and you will see that when the IC wakes up your DMM will "see" Vcc/4 or 3Vcc/4 for example if there are 4 scanning lines (or, Vcc/5 or 4Vcc/5 for a 5 scanning lines configuration, etc). The best way to determine if the voltage you are measuring is static DC or a pulse train without using a scope, is to try the DMM in AC mode: An absolutely static voltage will charge the DMM's input decoupling capacitor once, and the reading will gradually fall to zero! A pulse train will force the reading to be anything but zero.

In my opinion, it would be better to skip the whole TX & RX route plus the remote control hacking twist, by simply driving directly the power section of the receiver end: Just add an AVR-driven optocoupler to control directly the power stage, either if it is a mechanical or a solid-state relay or a simple triac. It is also safe because, practically, you only set an LED on. This is what I would do if I did not have the time or the desire to build the power stage, myself.

-George

I hope for nothing; I fear nothing; I am free. (Nikos Kazantzakis)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice save, I realized my mistake 2 minutes before you posted George. ;)

I still think this can be done with MOSFETs though. Just the bottom ones will need to be backwards. I agree the leakage from normal BJT's disqualifies them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's alright, Unix! Neither I studied carefully the pictures when I first saw them posted.

I hope for nothing; I fear nothing; I am free. (Nikos Kazantzakis)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using solid state relays would be a good idea,take a look at Clare,has some very small SMD devices,HEF 4066 could be a good idea also.Optocoupler having a transistor inside is not a good idea in the case of a multiplexing array of switches because optocoupler is not a bilateral switch.The best approach i think is that the two circuits to be fully isolated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here this should do it, if that is indeed how it is connected in the first place.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Funny digiket didn't have a 433 transmitter in that house. So that is telling me that there is a chance that to find out what chip it is!
From the photo it looks like a 2 by 3 matrix so the chip probaly flip with two pins (the two long "wires") can you find out if they flip level all the time (has a tone on them) or the chip has to wakeup some way.

Jens

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did something I think is similar to what you're trying a few months ago except is was the keyboard of an electric typewriter. It had similar style contacts for the keys. Originally I thought I would be able to just overpower some pullups to send keys that I wanted to ground, but it turned out the keyboard was hooked up to an Intel 8052 or something that used some kind of key scanning to be able to detect multiple key presses.

What I ended up doing was using an avr as a kind of pseudo switch. I hooked up all of the rows of the keyboard matrix up to pins on my avr set as inputs, and all the columns to the avr pins set as outputs. when I wanted a particular key to be pressed I would read the input pin of the row I wanted and output whatever it read to column that I wanted. That way whatever scanning signal was being used was just copied over and made it look like a contact had been closed. It worked ok, though in my case it was pretty timing sensitive. If there was much lag between the input on the pin and what I output it wouldn't work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan, you had the answer way back at the top of this thread, IMO, CD4066 analogue switches is the only way to go, based on your philosophy of not wanting to understand the operation of the circuitry. Maybe you should set up a poll?

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UNiXWHoRe wrote:
Here this should do it, if that is indeed how it is connected in the first place.

If this schematic is an accurate guess, then you only need three AVR pins connected to points SNS1, SNS2 SNS3.

Your AVR has 3-state o/p so PORT.# = 0, DDR.# = 0 gives no-key. PORT.# = 0, DDR.# = 1 gives bottom key, PORT.# = 1 gives upper key press.

You have no problems with drivers or matrix scans. You do not even need any extra resistors or diodes. However the remote circuit works, the AVR will not upset it.

You power both the remote and the AVR at 3V3. You have no safety isolation issues because there is no physical connection to the mains. You just need your summerhouse webserver to run 24 hours to obey all your instructions. If you publish its URL then we can possibly have a nice cup of tea waiting before you arrive. (and a warm bone for the dog)

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've drawn the schematics from the circuit board. There is no direct connection from the switches to either power rail (Gnd or Vcc). It looks very much like a matrix.

This leaves two possibilities to interface:
1) AVR actuated switch in parallel, the switches can be a 4066 chip, relay or whatever is convenient and available.

2) Direct connection of the AVR to the five pins and reverse-engineering and exploitation of the matrix scan of the existing chip. Something along the lines of what alancarr describes. The connected AVR should be powered at 3V to be compatible with the chip of the remote.

Attachment(s): 

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
The remote has those pushbuttons where there are two "contact islands" on the PCB and a dome of conductive rubber (I suppose) above which connects the two islands when pressed against the PCB.

My old Siemens mobile had the rubber buttons you desribe. It was conductive rubber that connected to the PCB islands.
I have reused those buttons in another project making my own "pads" on a strip board.
What I eventually found out was that the conductive rubber have a pretty large and differing resistance. IIRC somewhere between 20-50KOhm.
This might be different on your buttons, but it took some time for me to figure out why AVR pins never got a GND potential when buttons where pressed. At that time I solved it by laminating copper strips to the rubber. Today I would have used a weaker pull-up on AVR pins.

Anyway, if you want to use the shorted pad array to triggger a relay or connected to base of bjt this resistance on rubber buttons might complicate things.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
UNiXWHoRe wrote:
Here this should do it, if that is indeed how it is connected in the first place.

If this schematic is an accurate guess, then you only need three AVR pins connected to points SNS1, SNS2 SNS3.

Your AVR has 3-state o/p so PORT.# = 0, DDR.# = 0 gives no-key. PORT.# = 0, DDR.# = 1 gives bottom key, PORT.# = 1 gives upper key press.

You have no problems with drivers or matrix scans. You do not even need any extra resistors or diodes. However the remote circuit works, the AVR will not upset it.

You power both the remote and the AVR at 3V3. You have no safety isolation issues because there is no physical connection to the mains. You just need your summerhouse webserver to run 24 hours to obey all your instructions. If you publish its URL then we can possibly have a nice cup of tea waiting before you arrive. (and a warm bone for the dog)

David.

Indeed, what he said. :)

So all you need is an AVR and couple pieces of wire.

IF what I drew earlier is right on.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that Markus's schematic looks more reasonable. In which case, I can see several solutions:

1. AVR drives relays whose contacts duplicate the push-buttons
2. ditto with opto-isolators
3. use a pair of LS7401's with outputs connected to IC-11, 12, 13. The inverted column enables supply "enable" to each NAND. The LS7401 being open-collector will only be active when the respective column is low.
4. do everything in software (assuming Markus's schematic):
connect IC-2 to INT0, IC-3 to INT1 (column enable)
ISR's detect the columns falling edge and activate the AVR port DDRx for output and return to 3-state on the rising edge.
The ISR is so simple that the AVR has effectively gated the AVR outputs only during "column enable".

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Johan

I don't want to be a "fun spoiler" but if you dont have internet in the summerhouse , have a look here

http://www.telldus.se/

The usb stick (433mhz) can control nexus.
Combined with the dovado router & eiter an adsl , or an USB GSM DONGLE.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan.

Although the relays are bulky and not sexy at all - they would guarantee the desired result without other hassle than the size.

Having said that.

The next best solution is to use P channel J-fets. With those You can isolate the scanning logic from the drive. Junction fets are like switchable resistors. When the gate is more positive than the source (pinch off voltage) the fet is off. When the gate voltage is same (or less than the pinch off voltage) or lower that the source then the fet is on.

So, it does not really matter which way You connect the fet source and drain on each switch - it always works.

But

The drive voltage of the FET must be higher than the highest voltage on the switch plus the pinch off voltage.

So.

If You are using a J177 which has the pinch off voltage specified between 0.8 and 2.5 volts and if the remote works at 3V then You should set the gate voltage to 5.5V to switch the fet off. However, the chance that You get a fet with the maximum specified pinch off voltage is quite slim. Just buy a few extra samples and measure them. You will need a potentiometer to adjust the gate voltage, battery for the gate voltage and a multimeter to measure the resistance between source and drain.

After this if You want to "push" a button You just bring the corresponding FET gate to ground. When You want to "release" it You bring the FET gate to 5 volts.

The FET I was talking about is available on TO92 and SOT23 packages. The SOT23 is no more bulky ;)

Data sheet: http://furpile.com/Literature/Fe...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, I just might thicken the plot. This afternoon I sufed to the dealer-with-a-somewhat-close-shop (25 km's) just to find that they had 25 74LS01 in stock locally, and that they closed 17:30, and weren't open saturday. Time was 16:55, and in friday afternoon traffic there was no way I was going to make it.

Just around the corcer from home is the local gadget-accessory-and-other-fun-stuff-shop, and they have both a trasmitter and a receiver module, circa $12 each, so I'm probably going to give up anf get one of each (I'm going there anyway to pick up my two half-bargain Logitech Squeezebox'es anyway and $25 won't even show alongside the $600...).

I'm hoping I can get the receiver to show me what the remote feeds into it's transmitter, see some sense in that, and then feed it into the transmitter I got.

The "data sheet" for both receiver and transmitter are rather cryptic, and in half-chinese, but are mentioning two ICs: HT-12E and HT-12D respectively. They seem to be ecoders and decoders - I'll be reading their sheets tonight.

But notice in the transmitters sheet (appended) the similarity with the circuit in my remote! getting the hang of using a transmitter module might not be quite the struggle I feared. Worth a try. It might even be that the anonymous IC in my remote is a HT-12E and if I can get hold od a few of those...

[I'm just a little fearful though: I'll dig deeper and deeper, learn more and more, but won't quite finish it off into a working unit. The thing that got me started with AVRs was the urge to get a decent motor drive for the telescope. Nine years and counting - still no telescope drive..]

EDIT: Actually added the attachements ... err.. no.. Pissant software for the forum will only accept three attachements. Oh well, transmitter in this post - receiver in next.

Attachment(s): 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Pages