Still having power issues

Steve2381

Senior Member
Hi all
I had a thread a short while back regarding my circuit that was suffering from the HC-06 bluetooth module messing up the I2c comms to a 14m2. I temp fixed it by using multiple 7805's.
I designed a proper PCB and put plenty of smoothing caps across basically everything.
Also, a 10R resistor in line with each IC on the board and the HC-06.
The whole unit runs off a 230v to 5v - 1A PSU.

It doesn't work.. the 08m2 takes the information from the HC-06 and transfers it to a 14m2. If I remove the HC-06 from the circuit and run it on its own 5v supply, it works again.

How can I get over this? Something in that HC-06 module is messing up my circuit.
I have no way of adding another 5v supply anywhere, as the whole module has to run off the 230v - 5v PSU.

Any other ideas what might be causing the power supply issues and any remedies?

Someone did suggest a choke. Never used one. What does it achieve and what one to use?
Any help would be great.
 

premelec

Senior Member
A picture of your actual layout might help since the fault is obscure - maybe a long wire somewhere ... a choke inductor could help reducing any fast transients... maybe a common mode choke & capacitor in the 230v lines [like you'll see in every switching power supply]... etc...
 

Steve2381

Senior Member
Key connection? I have the RX and TX pulled high if that is what you mean. There are only 4 pins..... 0v,5v,TX and RX.

Something in the HC-06 is disrupting the 5v line. The minute I feed a separate 5v to the HC-06, the problem goes away.
I don't think its a power level issue. I seem to have a steady 4.95v at all points on the PCB

I don't have the option of adding a new 5v supply, as I only have a single 230v to 5v converter in the project. I thought with 0.1uf caps across basically everything, 100uf on the supply and 100uf across the HC-06 + 10R inline resistors.... that would be enough.

The circuit diagram is all on scraps of paper. I will try and get a complete one sketched up

Oh - and its on a pcb, so no long wires
 

hippy

Ex-Staff (retired)
Something in the HC-06 is disrupting the 5v line. The minute I feed a separate 5v to the HC-06, the problem goes away.
Isn't the HC-06 a 3V3 device ? Even if it's on a carrier board with a regulator on that the signal levels may still be 3V3 rated. Injecting 5V signals may cause problems.

We really need a full circuit diagram of what you actually have.
 

Steve2381

Senior Member
No, the HC-06 is a 5v board. The whole circuit worked for weeks on the breadboard. Its only when I transferred it to a pcb and combined the 5v supplies that the problem has returned.
Worked ok when the Picaxe didn't share a 5v supply with the HC-06
 

Steve2381

Senior Member
Well... after a little poking around. The HC-06 has failed anyway. No idea why. I must have done something, but I don't know what

I have another here, so I can keep going until I knacker that one.

I tried a diode inline with the supply to the HC-06, but its not that simple.

Something is amiss. Running the HC-06 on its own 5v rail still gives me intermittent comms issues. It just doesn't always operate as it should.
Its SO annoying to have a fully working circuit for weeks, and the minute you make an effort and transfer it to a pcb... it goes belly up.
I have spent hours checking the pcb and circuit through, and I am sure I have no errors.

I would sit now and draw out the circuit, but I have had enough of it for now
 

Steve2381

Senior Member
Well it more than likely that I have made a couple of mistakes transferring this to a drawing, but it gives a rough idea.

The power supply is a Vigortronix VTX module from Farnell.

Can you have too many smoothing caps? I have removed a couple of the 100uf caps at the IC's as it seemed a bit overkill.
The 10r resistors inline with each IC also did not really achieve anything.

Be gentle.. this is basically made up of various circuits that I have hashed together to get what I need. I am sure there are mistakes in the design. BUT.... This circuit did work fine on the breadboard.

View attachment 19616
 

rq3

Senior Member
Well it more than likely that I have made a couple of mistakes transferring this to a drawing, but it gives a rough idea.

The power supply is a Vigortronix VTX module from Farnell.

Can you have too many smoothing caps? I have removed a couple of the 100uf caps at the IC's as it seemed a bit overkill.
The 10r resistors inline with each IC also did not really achieve anything.

Be gentle.. this is basically made up of various circuits that I have hashed together to get what I need. I am sure there are mistakes in the design. BUT.... This circuit did work fine on the breadboard.

View attachment 19616
Generally, the 10 ohm resistors are not required at all, but if you were to use them, they should be inserted as low pass impedance in conjunction with your decoupling capacitors (i.e., the resistor would be inserted before the caps, not after).

Also, I'd take a good hard look at the details of your VTX module. They often have a minimum load requirement before they will go into regulation, often many amps on the +5 volt output.
 

SAborn

Senior Member
I would try removing the transistor on the Gnd input to the HC-06 and connect it direct to Gnd.
Also try replacing the 100uf cap on the output of the 5v supply to a much larger one like 470 - 1000uf, as there might be a lot of ripple from the power supply you don't see, also it will help to buffer and current surge from the HC-06 when it transmits.
What is the current rating of the Vreg you are using for 5v.
 

eggdweather

Senior Member
I agree with SABorn the ground impedance is likely to be too high with the transistor in series, try linking it out. It's unusual to switch the ground and not Supply +
I note the HC-06 is a 3.3volt device and its input/output levels are 3.3volts for Tx and Rx. Your Rx input voltage is 5x1/(1+1.8)=1.8volts which is out of spec. The HC-06 has an onboard 3 to 5 volt input regulator.
 

Steve2381

Senior Member
Mmm. Well, it still isn't working with the transistor removed (I needed that to be able to reboot the HC-06 after altering the pin or name via software).
I will try a larger cap on the power pcb.
The Vreg is 1000mA. I did do extensive testing before hand and it never pulled anywhere near an amp. At the moment, I have the HC-06 out of circuit on its own supply.

The regulator is providing a very steady 4.97v at no load and with load (tested it).

The HC-06 is a 5v supply, but yes... the RX/TX are probably 3.3v. All of the diagrams I have seen show it connected as I have (rightly or wrongly). I did also try a 10k + 22k resistor voltage divider).
Again... rightly or wrongly... it did work fine - for months.

I also have a HC-06 in my pickup truck controlling the lights from a phone app. That is wired the same way and has worked for 18 months.

The HC-06 works.... just not when it shares a supply with the Picaxe. I had this issue on the breadboard and simply cured it by giving the HC-06 its own 7805. But, I was hoping with enough decoupling, the single supply would be fine.
I have linked out all the 10R resistors anyway, as they didn't achieve anything.

The online voltage divider calculator I use online showed 1.8k and 1k to equal 3.2v? I must be wrong

http://www.ohmslawcalculator.com/voltage-divider-calculator
 

rossko57

Senior Member
The HC-06 is a 5v supply, but yes... the RX/TX are probably 3.3v
So with a ground-switching transistor giving you an elevated ground voltage, external devices would be seeing the RX/TX lines at a higher than expected value, more like 3.8V ?
 

SAborn

Senior Member
why do you have a voltage divider on the RX line, I see no reason for this (1.8k/1k).

Where is the HC-06 module mounted, could that be transmitting interference into the circuit, after all it is a radio transmitter.

Have you tried extending the module away from the circuit, as on your bread board it was likely mounted off circuit.

I have had little luck with the HC-06 and found them hit and miss to get them to work reliable with picaxe.
 

Steve2381

Senior Member
The transistor has been removed - its connected directly to ground at the moment and still doesn't like the shared supply.

The comms at 3.3v are not the issue. Its receiving commands and working. Its the combined supply that is creating the problem.

Something in the HC-06 is disrupting the 14m2 when they share a supply.

The HC-06 is now away from circuit anyway. I have moved it back to the breadboard for diagnostics.

As for the voltage divider on the RX line, its how they seem to be connected. If you google HC-06 connections, nearly all the diagrams show this divider in place.
I have no reason to change that advice, especially as it has always worked. I assumed it was to drop the RX line to around 3.3v.

People are getting hung up on the voltage divider and the RX/TX pins. It receives commands and carries them out fine.... just not on a shared supply with the 14m2.
Give it its own 5v supply and it works again.
 

Steve2381

Senior Member
Ok. All 10r resistors removed, a local 1000uf cap across the supply to the HC-06 and the transistor re-instated and it works again.
My only concern is the discharge of the 1000uf cap... will that cause any issues upon power off? It certainly holds the circuit on for a few seconds after power down
 

SAborn

Senior Member
There is no problem with power discharge to the circuit with the cap, the 1000uf cap acts as a tank reserve for instant high current demand, as I suspected the HC-06 may require.
I use a 470-1000, cap as standard across the power rails because anything lower I see ripple on the cro across the power rails.
You could try reducing the cap value to 470uf although for little gain other than if space is a problem.

Glade it works for you..
 

Steve2381

Senior Member
Thanks for the advice... on to the next part of the circuit now. I am about to put the Biss0001 PIR IC in place and I am sure that will have issues too!
 

SAborn

Senior Member
When you get the basics sorted like power supply then the rest gets easy, im sure the next stage will work as designed.
As you have found 1 simple component can make a huge difference to a circuit.

Good luck.
 

Steve2381

Senior Member
Well as expected, the PIR part of the circuit does not work either! Excellent.

Can someone confirm from my circuit diagram which pin is drain and which is source on the RE200B PIR detector module? (pins 1 and 2) I am wondering if I have these reversed.
 

Steve2381

Senior Member
Thanks eclectic

I have checked and I think I am OK. Pin 1 is drain and pin 2 is source.

Doesn't make it work however! The bluetooth all works fine and I can control the relay from my phone using the app I wrote.
However, plug in the Biss0001 IC and it all crashes to a halt.

I have checked the circuit through several times and I am sure I have it wired correctly.
The bluetooth starts to become intermittent again with the Biss0001 in place, and there is an odd random delay between sending a command and it acting upon it. That says to me that something is messing up the comms again (insert head banging on desk here).

Supply seems fine to all IC's, so I think we are down to the following possibilities:

1) The Biss0001 IC has died (that's a pain... no spares and a month from China)
2) The power supply to the Biss0001 is not smooth enough (I would be surprised, its pretty well smoothed)
3) Component failure
4) When I wired the Biss0001 up originally on my breadboard, I accidentally wired the drain incorrectly (compared to the diagram). When I stripped the circuit down again and noted the connections, I noticed the error.
However it worked on the breadboard. I have now transferred it to the pcb as the circuit diagram shows it, not as I had it. Did I accidentally get it right?
In the circuit on the PIR sensor drain (pin 1), what are the 18k and 10k resistors achieving? When I wired it incorrectly (and it worked), I had the 10k directly from 5v to the drain pin, and the 18k was in series with the 47uf from the drain to 0v.

One day, I will build something that works first time!
 
Last edited:

Steve2381

Senior Member
Thought it better to continue the original thread, rather than explain it all again.

Well after extensive messing around.... I am beaten. I have not been able to get the circuit working as it was on the breadboard.
The only differences between the breadboard and the pcb are that on the prototype, there were 3x 7805 regulators and this pcb uses a single 1000mA supply (smoothed almost to death)
And the components were obviously further apart on the breadboard.

The 08m2 receives the bluetooth command from the HC-06 fine. It does as it should, when it should. It transmits its received command to the main 14m2 and there is an instant reaction to the command set from the phone app.

However, add the Biss0001 PIR IC and the whole thing throws a wobbly. The bluetooth becomes either delayed or non existent. Its not a coding issue, I think there is an interference issue on the I2C or power line that is messing up the comms.

I have yet to get the Biss0001 Pir IC to actually work properly. I have ordered some more from abroad.

Any ideas what else to try? Are there any methods of cleaning up the I2C lines (assuming they are the issue).

Would be a shame to bin the project, now that its nearly completed.
 

PhilHornby

Senior Member
Did you ever try a different HC-06? (Based on my experiences with multiple HC-05, yours seems to behave very strangely)

Would something as simple as this, help with the I2C (assuming something's crowbarring your supply rail) ? ...
SmoothedI2CSupply.png
 
Last edited:

Steve2381

Senior Member
Yes, Tried all new components and a new HC-06. No change. I could try your circuit above Phil (nothing to lose!). Its just difficult to play around with the circuit, now that its on the PCB. But, it doesn't work so might as well have a go.

I cannot think of any other way of smoothing/isolating the I2C signal. I can't add a cap, as I assume that will smooth off the nice squarewave signal you need for the comms.
 

hippy

Ex-Staff (retired)
I cannot think of any other way of smoothing/isolating the I2C signal.
What is convincing you it is an I2C problem ?

It appears to me this BISS0001 is not on the I2C bus, and the only thing on the I2C bus is a digital potentiometer.

You could perhaps take the digital pot out of the circuit, replace with a physical pot, remove the I2C commands and see if that improves things.

My suspicion is it's a power supply issue again. I would suggest replacing the supply with a decent regulated bench supply.
 

Steve2381

Senior Member
The DS1307 is also on the I2C bus. That seems to be working fine.
If I replace the PSU with a regulated supply, then I have not corrected the fault I am having. I have already removed the digital pot and replaced it with a standard one.

My suspicion is the power supply as well. However, I cannot think of anything else I can do to regulate the supply. 1000uf across the HC-06, 100uf across all IC's, 0.1uf across everything, 10r in line with the IC's (which did nothing).

If I lose the 1000mA Vigortronix regulator, the whole pcb and project goes back to day 1
 

hippy

Ex-Staff (retired)
1000uF isn't that large. I don't know what would be necessary but I have often thrown as 'large as possible' at smoothing from the off - 47,000 uF and the like - when I have had no means to assess how much is actually required. Perhaps try the same, at least increasing the smoothing caps.

If it turns out it is the power supply that's simply how it is. Part of the development process is turning theory into practice which isn't always as smooth going as anticipated. There is nothing fundamentally wrong with the circuit that I can see so something is keeping it from working. Gut feeling is the power supply seeing as you had to jump through hoops to make it work on breadboard.
 

Steve2381

Senior Member
One problem I have identified is the 5v relay creating noise and upsetting the Biss0001. I have increased the PSU capacitor to 1000uf, put a IN4001 inline with the relay switch line (it has a diode already across the coil), added a 0.1uf across the relay coil and a 470uf directly across the Biss0001 supply (it was 100uf).
Still suffers from noise. If I remove the relay and simply switch a led, it works fine. Not sure what else I can try. I think this PCB/Project is nearly dead in the water

Its this Vigortronix PSU. Its obviously struggling. If you measure the voltage across the 14m2, it shows 4.7v when the relay is off, and 5v when the relay is on (why higher when the relay is on?).
Its only 0.3v variation, but that is not a stable supply.

I don't have any huge capacitors to try.
 
Last edited:

premelec

Senior Member
Try iron shield near relay coil... piece of pipe perhaps... get lower power coil relay... you are creeping up on a solution... :-0 - and add external power boost to see if fault quits...
 
Last edited:

PhilHornby

Senior Member
It's this Vigortronix PSU. Its obviously struggling. If you measure the voltage across the 14m2, it shows 4.7v when the relay is off, and 5v when the relay is on (why higher when the relay is on?).
Its only 0.3v variation, but that is not a stable supply.
I have a VTX-214-005-105 here, so I just did an experiment...

No load voltage 4.97V according to my multimeter.

Then connected it to a breadboard containing 3xESP8266 - powered via LD33 reg. The output voltage dropped to 4.88V under this load (don't know precisely what the load is, but could potentially have been as high as 750mA (because of the onboard WiFi of the ESP8266) - though I bet it was probably quite a bit lower)
 

Steve2381

Senior Member
Mmm. I am out of ideas at the moment.
I can't just stick a huge capacitor on the supply. I don't think that will cure the issue, and I certainly don't have room for a massive cap anyway. I have already wedged twice the amount of capacitors on the PCB anyway.

I don't understand the slight rise in voltage while the relay is on.

I measured all the load to be around 650mA max on my breadboard layout.
If the relay is connected to the Biss0001 Pir controller IC, it simply switches on and off constantly. Its self triggering itself. If I remove the relay and use just a led on the output, the issue goes away.
The actual circuit is working, so its the load of the relay causing the problem.

Trouble is, I am limited by what I can do on this pcb now. I certainly cannot afford to redesign and have another one made.

In hindsight (what a wonderful thing), maybe two 5v regulators would have bee a better option with the relay using one of them, controlled by an opto-isolator. But, that isn't possible now and I don't have the room.
The iron shield isn't really possible due to the layout. Anyway, it is only a 5v coil relay, I am amazed its causing such issues.

Answers on a postcard......
 

premelec

Senior Member
There are mu metal foils that could be tried for magnetic shielding- the point I make is to determine the physical mechanism of the trouble... as you note it's not much of a relay yet you are getting a lot of trouble... try a resistor in series with the relay - so it still works but lower current. I'd still be interested in an actual picture of the unit wiring and circuit board... I hope it all looks silly when you find the solution... :-0 BTW rise in voltage when load is on could indicate high resistance in a feedback point to the regulator - sometimes intentionally done to compensate for lead resistance... sometime inadvertently caused by PCB layout or instabilities [oscillations]. If you have an oscilloscope take a look.
 

Steve2381

Senior Member
I don't have an oscilloscope (wish I did). I will run a lead back from the main pcb to the Ov of the regulator (bypassing a lot of pcb track) and see if that helps settle the supply.
The diode across the relay is a IN4001. Would an IN4148 be better?

What size resistor in line with the relay? That will be awkward to install now!
 

PhilHornby

Senior Member
I measured all the load to be around 650mA max on my breadboard layout.
I don't know if it would reveal anything, but you could measure the voltage across each of your cunningly placed 10Ω resistors, as a means of spotting any anomalies in the current drawn by the different sections of your circuit?
 

premelec

Senior Member
@Steve... 1N4001 is good, I'd try 1/4 the DC resistance of the relay coil in series [e.g if the coil is 100 ohms put 25 ohms in series and see if it still actuates ok]. Without pictures of your set up it's hard to guess what you've got - relay coils in general have pretty large external magnetic fields which can bother adjacent electronic stuff.
 

Steve2381

Senior Member
Thanks for all the suggestions chaps.

Yes... my relay is a little too near my PSU. Bad PCB design on my part.

I did play around last night and 'may' have discovered a few high resistance tracks on the pcb that could be giving me supply problems. I am going to bypass them with cable later and see what happens.
 

Steve2381

Senior Member
I think I am beaten here.

I removed the relay and made it remote from the PSU board - no change.
Added cable links to ensure no high resistance PCB tracks on the supply lines - no change
Altered a few different ways of connecting the PIR sensor to the Biss0001 IC - no change
Added a 30 ohm resistor in line with the relay coil - no change

Even if I had a scope, I am not experienced enough to know what I am doing with it
As a side question, what is the Picaxe scope kit like? Good enough for projects like this?

I am sure this 0.3v fluctuation in the PSU is part of the problem. But, I do not know what I can do to alleviate that. I cannot add any more caps or larger ones.
 
Top