Author Topic: Sending button presses down a power supply wire  (Read 7652 times)

0 Members and 1 Guest are viewing this topic.

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Sending button presses down a power supply wire
« on: October 20, 2014, 03:48:03 pm »
I'm making a project which involves powering three high power LEDs in a bike light with a constant current boost converter (mounted elsewhere on the bike). I can either have a two or three pin connector going to the bike light. I'd prefer two pins, because it means less wiring, and I'm already doing a custom driver PCB and a custom PCB that goes in the bike light itself. The LED driver changes current with a button press input.

How could I send a button press over the power cables for the bike light? So far, I was thinking of a 555 in the bike light with an AC coupled output, going to the high side cable and adding a 50khz square wave to it when the button is pressed. On the other side, I could sense it with an AC coupled peak detector and a comparator going to the MCU. Since the LED driver is constant current, I'd put a 500ohm or so resistor so the 555 gets power when the light is off.

Is this going to work?
 

Offline JVR

  • Regular Contributor
  • *
  • Posts: 201
  • Country: be
Re: Sending button presses down a power supply wire
« Reply #1 on: October 20, 2014, 08:27:57 pm »
Depends on the impedance of the circuit how much signal you are going to get. It also needs to be way above the boosters ripple control freq. Its a simple circuit, breadboard it.
 

Offline hamdi.tn

  • Frequent Contributor
  • **
  • Posts: 623
  • Country: tn
Re: Sending button presses down a power supply wire
« Reply #2 on: October 20, 2014, 08:46:50 pm »
i used a TDA5051A as a PLC modem once, it can send serial data over DC power line too. It use a UART interface, for your case, you using a simple button , you wire it to data-in with a pull up resistor, on the other side you will get the button position out of data_out pin ,as simple as that  ;).
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #3 on: October 20, 2014, 09:14:56 pm »
Thanks, @hamdi.tn and @JVR.

The circuit is pretty low impedance – it travels over around a metre of wire, but the wire is very thick (so that it copes with 3A without a big drop). The boost controller is an LED6001. It doesn't specify ripple, but I'll put an LC filter (maybe second order) on the output so it should be acceptable.

The TDA5051 looks great - thanks!
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Sending button presses down a power supply wire
« Reply #4 on: October 20, 2014, 09:35:09 pm »
Bridge rectifier and capacitor at the light end.
Reverse polarity with button press - and detect it before the bridge.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Sending button presses down a power supply wire
« Reply #5 on: October 20, 2014, 10:46:46 pm »
Could you use a momentary break in power to change the setting, much like the stepped dimming light switches do?
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: Sending button presses down a power supply wire
« Reply #6 on: October 21, 2014, 12:21:40 am »
I'd have the button activate a CMOS inverter oscillator at say 1 kHz, put a C-R differentiator behind it which switches on a transistor for a couple 10s of ns to pull down the voltage across the LEDs through a couple Ohm resistor. Add a couple uH of inductance on the positive lead of the cable with some beads at the control box.

Pretty sure you'll get enough signal to detect that way ... and next to no idle current consumption thanks to the CMOS inverter.

ps. not FCC legal :p
« Last Edit: October 21, 2014, 12:27:57 am by Marco »
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Sending button presses down a power supply wire
« Reply #7 on: October 21, 2014, 01:01:30 am »
Bridge rectifier and capacitor at the light end.

Reverse polarity with button press at the supply end,
and detect it before the bridge with a resistor and diode!

-- No extra wires or installation, $2 done.  :P
Don't ask a question if you aren't willing to listen to the answer.
 

Offline sacherjj

  • Frequent Contributor
  • **
  • Posts: 993
  • Country: us
Re: Sending button presses down a power supply wire
« Reply #8 on: October 21, 2014, 01:49:13 am »
Bridge rectifier and capacitor at the light end.
Reverse polarity with button press - and detect it before the bridge.

Quite a bit of losses through two diodes at 3A.
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Sending button presses down a power supply wire
« Reply #9 on: October 21, 2014, 01:50:35 am »
Current going through bridge - not the detector diode
Don't ask a question if you aren't willing to listen to the answer.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: Sending button presses down a power supply wire
« Reply #10 on: October 21, 2014, 04:41:18 am »
He wants to detect a continuously depressed button as well (only mentioned in another thread).
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Sending button presses down a power supply wire
« Reply #11 on: October 21, 2014, 04:44:00 am »
A little more complicated - but shouldn't be much.
The bridge & capacitor do the 'dirty work'
He just has to sense when the the reverse biased diode is upside down.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #12 on: October 21, 2014, 06:18:51 am »
You're right @Marco! I should have mentioned that. The TDA5051 will do that fine, though.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: Sending button presses down a power supply wire
« Reply #13 on: October 21, 2014, 11:37:14 am »
Thanks, @hamdi.tn and @JVR.

The circuit is pretty low impedance – it travels over around a metre of wire, but the wire is very thick (so that it copes with 3A without a big drop).

To be able to inject an AC signal the power circuit will need to have a reasonable amount of impedance at the signalling frequency.  To achieve this you may need to add a suitably rated inductor to the output of the driver.  You'd need to make sure that any inductance doesn't cause instability (constant current+inductive loads can be very tricky). 

I think I'd be looking at a three core cable to be honest...
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #14 on: October 21, 2014, 02:40:28 pm »
Thanks, @hamdi.tn and @JVR.

The circuit is pretty low impedance – it travels over around a metre of wire, but the wire is very thick (so that it copes with 3A without a big drop).

To be able to inject an AC signal the power circuit will need to have a reasonable amount of impedance at the signalling frequency.  To achieve this you may need to add a suitably rated inductor to the output of the driver.  You'd need to make sure that any inductance doesn't cause instability (constant current+inductive loads can be very tricky). 

I think I'd be looking at a three core cable to be honest...

OK. If it's not possible, I will just go with a 2-core power cable + auxiliary (thin) button cable.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Sending button presses down a power supply wire
« Reply #15 on: October 21, 2014, 05:08:15 pm »
Put a diode or two in your supply line to the lamp, and a MOSFET across the diodes.  Keep the MOSFET turned on until you want to send data - just use a UART in your micro to send a byte or two.

Your receiver can be a comparator that uses a pair of potential dividers - say set to 3v0 (-input) and 3v2 (+input).  Then just slug the -input with a decent size electrolytic.  Use something like 1200bps data rate.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #16 on: October 21, 2014, 07:32:04 pm »
Put a diode or two in your supply line to the lamp, and a MOSFET across the diodes.  Keep the MOSFET turned on until you want to send data - just use a UART in your micro to send a byte or two.

Your receiver can be a comparator that uses a pair of potential dividers - say set to 3v0 (-input) and 3v2 (+input).  Then just slug the -input with a decent size electrolytic.  Use something like 1200bps data rate.

I assume you mean a MOSFET in series with the diodes? That should work; I'd have to protect the input of the transmitter with a zener as the LED driver is constant current.

EDIT: There is OVP on the LED driver, which will be set to around 15V. I could probably drive a 555 directly with that. I will probably power it from an electrolytic cap (charged through a diode). I'll use a 555 since I'm only sending the button state.

EDIT 2: Oh! I see what you mean (or at least, I see a better way). To minimise the down time on the light, a small MCU (powered with a zener & cap) can sense button presses and then transmit the relevant data for a very short period. This way the flicker might not even be visible (as you said, there's only a byte (max) to send).

EDIT 3: The OVP of the LED6001 is latching as well, so the MCU could restart it after the DAC has been set.
« Last Edit: October 21, 2014, 09:11:47 pm by microbug »
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Sending button presses down a power supply wire
« Reply #17 on: October 21, 2014, 09:11:19 pm »
I'm guessing there's a filter on my suggestion for Bridge + Cap
Oh well.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #18 on: October 21, 2014, 09:12:58 pm »
Quote
A relentless optimist - or too dumb to be a pessimist!
I'd go with the former, if it makes you feel better! ;)
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Sending button presses down a power supply wire
« Reply #19 on: October 21, 2014, 10:55:08 pm »
sighs.
Thanks - but it's probably too late!
Don't ask a question if you aren't willing to listen to the answer.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: Sending button presses down a power supply wire
« Reply #20 on: October 21, 2014, 10:58:02 pm »
Put a diode or two in your supply line to the lamp, and a MOSFET across the diodes.

Or a high current off-mom switch.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Sending button presses down a power supply wire
« Reply #21 on: October 22, 2014, 06:55:09 am »
The two diodes in series create an approx. 1.2v drop on the supply line when the bypass MOSFET is off, and virtually no drop when the MOSFET is on. No need to interrupt the supply at all.
Just send data when you need to signal an event.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #22 on: October 22, 2014, 05:41:15 pm »
@fcb – ah, I see what you mean. That is a very elegant solution! There won't be any noticeable flicker or dip in light output at all that way. It should work, since the front light's button is illuminated so when the light is off it still draws current. I think I understand what you mean for the receiver: two voltage dividers set to slightly different voltages on a comparator, and one with a fairly large cap so that when the button is pressed the other is pulled lower and the comparator triggers.

Another way to do the negative comparator input for the receiver would be a sample and hold circuit (MCU triggers resample every 10 seconds to account for thermal derating, but not if a button press is detected).
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Sending button presses down a power supply wire
« Reply #23 on: October 22, 2014, 06:19:24 pm »
@fcb – ah, I see what you mean. That is a very elegant solution! There won't be any noticeable flicker or dip in light output at all that way. It should work, since the front light's button is illuminated so when the light is off it still draws current. I think I understand what you mean for the receiver: two voltage dividers set to slightly different voltages on a comparator, and one with a fairly large cap so that when the button is pressed the other is pulled lower and the comparator triggers.

Another way to do the negative comparator input for the receiver would be a sample and hold circuit (MCU triggers resample every 10 seconds to account for thermal derating, but not if a button press is detected).

As you don't need big diodes (1N4001's will be OK, as the average current drawn through them will be small), so the current draw from the micro/comparator/potential dividers should be enough to create a decent drop.

Yup, sample and hold would work fine, but probably over-egging it. Set the time-constant using the potential divider & slugging capacitor. Probably also worth adding a hysteresis resistor from the output of the comparator to one of the inputs. LM393 would work fine.
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
Re: Sending button presses down a power supply wire
« Reply #24 on: October 22, 2014, 07:09:47 pm »
I'm sceptical about using a potential divider & cap. Since I want to detect a held button, the time needed for recovery between button presses would have to be a few seconds. This could make cycling through different modes tedious. TL082 JFET op-amps (high input impedance is ideal for a sample and hold circuit) are £0.15 in one off quantities, and there's already a micro in the receiver end which can control the sampling.

EDIT: I just realised this: there are two ways of doing it.
– MCU in the transmitter which sends data to the receiver by pulsing the MOSFET across the diodes after a button press (short transmit time)
– No MCU in the transmitter; sample and hold in the receiver; send button presses by turning off the MOSFETs while the button is held.
I'm not sure which to go with – I need to think whether I might want an MCU in the transmitter anyway for other purposes.
« Last Edit: October 22, 2014, 07:13:23 pm by microbug »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf