Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Changing flashing LED on module to stay on - use a capacitor? Any help please?

Status
Not open for further replies.

jago2

New Member
I'm coming from a programming background and although I'm doing more electronics recently I'm still very much learning.

I'm using a bluetooth module (this one **broken link removed**)

It has an LED function but it's really annoying. It blinks quickly when bluetooth is not connected, and blinks slowly when it is.

I don't want it to do that!

What are the options for changing it?

Say if I wanted to use a multicoloured LED and have one colour when off (currently flashing fast), and another when connected (currently flashing slowly).

Or if I wanted the LED off when currently flashing fast, and lit solidly when currently flashing slowly?

My first thought was to use a capacitor to store the charge so when it is in the off state of the blink, it will remain on. But am I right in thinking if I got the right value capacitor, with the way this module works, it would mean the fast flashing would stay on all the time, and the slow blinking would blink faster? That's not ideal .

The opposite wouldn't be too bad.

If I put the signal to the LED through an inverting op-amp first would I end up with the fast flashing being permanently off, and the slow flashing flashing but faster than it does now? If I did this and it works, could I fine-tune the capacitor value (or some other way) to make it off and on only?

And could anything like this be used to control a multi-coloured led? So it is always on, but just a different colour depending on the state?

If none of this makes sense, I'd love to know why as I really am trying to learn (as well as do). Thanks

ps. yes, my instinct is just to hack it and test things but that's my programming background kicking in and while this example is low-power and unlikely to damage anything, I'd rather try to get my head around the theory too.
 
Just putting a capacitor would slow how fast the light turns on and off, which would make the flashing less obvious, but the capacitor wouldn't change the flash rate.

The only way that I can see to change the flash strategy would be have a processor. You could have one input of the processor connected to the module output that currently drives the LED. Then you connect whatever LEDs you want to the output of the processor.

Something like this:- https://www.microchip.com/wwwproducts/en/PIC10F322

It would need programming. You will need to write code for it, and have a programmer, such as a PICkit2 or similar.
 
Thanks Diver300. I've got a fair bit of experience programming arduinos and some RPi too. In fact, this project has an RPi in it with an ADC module so I guess that's a possibility (I'm getting tempted to stick an arduino nano in too actually).

I was just wondering if there was a hardware/component only option rather than resorting to programming. Not a problem if not, just trying to avoid always resorting to programming and trying to learn more about the electronics side.

As an example, I needed to read a voltage into the RPi so I got an ADC. Except it doesn't read negative voltage - and it seems not many do - and the voltage is negative. So I learned how to use an op amp to invert (reverse?) it. Like programming, but with components only. Great fun!

ps. actually, just realised this particular part of the project is going to be made for a friend too and his won't have the RPi. So I either remove the led totally (and let's face it, it's not really needed anyway) or use a nano.

Thanks again.
 
The simplest approach is remove the LED or paint over it.
It's likely on a controller output pin, so adding a cap is probably not a good idea.

ps. The simplest way of measuring a negative voltage is a resistor divider from a positive reference supply, and negate the ADC result for that channel.
 
The simplest approach is remove the LED or paint over it.
It's likely on a controller output pin, so adding a cap is probably not a good idea.

ps. The simplest way of measuring a negative voltage is a resistor divider from a positive reference supply, and negate the ADC result for that channel.

Yes, I don't need the LED, I can simply leave it off the module without any effect at all. I was just wondering if it was possible the way I was thinking. I'm so used to hacking programming (and nearly everything has an API you can hook in to) that it's frustrating not knowing how to hack electronics the same way but I'm enjoying learning.

I read about using a resistor divider but it seems to lose some resolution from what I read?

Thanks
 
Do you have a link to the datasheet of the modules - preferably in English.

Mike.
 
No, there is a link to the documentation but ...


I'm currently also struggling with separating the grounds to prevent a loop.

I've got 12vdc coming in to power an op-amp amplifier (needed for the input it is going in to).

I'm splitting that off and lowering it to 5v with an MP1584EN module.

The I'm putting that 5v through a TMA0505 dc-dc isolator.

But the bluetooth module only puts out left and right, there is no audio ground.

So to get a signal, I'm having to connect the ground of the isolated 5v for the bluetooth to the ground of the isolated 12v amp, and - it appears - this is causing some background noise.

This is still on a breadboard though, so lots of wires and that could be the problem. But I'm reluctant to build it properly only to find out there is something else wrong.

I have followed their documentation and used the two include caps on the positive/negative pins of the module, as well as on 2 of the holes on the body of the module (presumably another +5 and gnd?)

I've also tried adding a inductor on the isolated +5vdc and another cap across the isolated +5 and gnd.

I'm still getting some background noise though.

It would seem - to me - that the issue is the need to connect the two grounds together. Perhaps on a PCB if they were much closer together it would be minimal or simply go, but on the breadboard that's not the case.

I know some bluetooth modules have +5v/gnd and also left/right/audio ground, but the two different types I've tried so far don't. They only have one ground.

Thanks
 
The buck converter produces lots of noise and is good for a very high output current that you do not need. Replace it with a linear 5V regulator IC.
The manual for the Bluetooth receiver shows the +5V ground, the +12V ground and the Bluetooth grounds all connected together. It must be your wires all over the place on your breadboard that is causing your loop. Get rid of the noisy DC to DC converter that you also do not need.

Of course the bluetooth receiver has a ground for its outputs. It is its single ground connection that is also used for its power supply ground.

You do not say which 12V amplifier you are using but its inputs might need coupling capacitors from the Bluetooth audio outputs that probably have DC on them. Do you know the amplifier's inputs impedances and the formula for calculating the value of the coupling capacitors for good bass?
 
Thanks for the reply.

I did originally have a 7805 in there but something I read convinced me to use the MP1584EN instead (I already had some) - I forget what now. I know heat was one issue. But I have some suitable heatsinks.

I have some TO222 7805s (1A) and some TO92 MC78L05CP's that are rated for 100mA. The bluetooth module side averages about 81mA but peaks at 99.5mA (actually, once I thought it went just over 100mA very briefly but I didn't have the DMM recording and can't be 100% sure - I've unplugged it and re-tested it a few times and 99.5mA is the highest I've seen).

This is during start-up only and is very brief, then settles down to 81mA. Is there any headroom on the 100mA limit? Could the MC78L05CP work or should I stick to the TO222 1A package? And if I did use the TO92 would I need a heatsink? Caps? Sorry for all the questions, hope you don't mind.

I've actually managed to reduce the noise a lot since last posting by changing the ground on the volume pot from the amp side (12v) to the bluetooth side. I think now the remaining noise (which isn't much) is probably just the wires on the breadboard, so I'm going to start building a pcb prototype (which, if it works, will be as far as it goes - I need two so just using two-layer pcb prototype boards).

The amp is a mixer circuit as I have to take a stereo input but have a mono output. Using this over a resistor summing circruit because gives some gain too as it's going into an old ceramic phono input on a vintage radio and needs a bit of a boost (but not too much, ceramic inputs are fairly close to line-level).

I'm basing that stage on this (https://www.muzique.com/schem/mixer.gif - details at https://www.muzique.com/schem/projects.htm)
 
Using this over a resistor summing circruit because gives some gain too as it's going into an old ceramic phono input on a vintage radio and needs a bit of a boost (but not too much, ceramic inputs are fairly close to line-level).

A ceramic input is considerably higher gain than a line input, do you mean a crystal pickup input? - those were much lower gain than ceramic.

I wouldn't expect a radio to have an input for a higher quality ceramic pickup, only for the cheapest crystal ones (some of which output a couple of volts, designed to feed single pentode amplifiers).
 
No, it's a ceramic phono input. And yes, I thought it shouldn't need gain but it does.

The radio is from 1955 and cost a months wages then.
 
No, it's a ceramic phono input. And yes, I thought it shouldn't need gain but it does.

I suspect it's mis-labelled then - I replaced a LOT of crystal and ceramic pickups over the years, and repaired a LOT of valve radios - I've never seen a radio that didn't only provide for a crystal pickup.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top