Question: battery or power supply

Mejlby

Member
Question: battery or power supply

I try to make some different projects with PICAXE 18M2, but has a lot of problems with noise when I use my profesional labaratorie power supply. nothing works as it should.

If I use a 9 Vdc battery and a regulator LM7805 so I have no problems and everything works perfectly

My question:
Is it only possible to use a battery - or is there a possibility to use a power supply and what can I do to avoid noise with my profesional labaratorie power supply.

I hope someone can give me some good advice and if someone has a diagram to solve the problem, I would be grateful

Yours sincerely
Tonny - Denmark
 

nick12ab

Senior Member
The professional power supply shouldn't be noisy. What is it?

Do you use decoupling capacitors in your circuit?
 

nick12ab

Senior Member
where do i need decoupling capacitors ?
Decoupling capacitors go close to the power pins of the PICAXE and usually are 100nF ceramic.

On your circuit which has already been made, the best place would be under the PICAXE chips, on the solder side. The image here shows a through hole capacitor under the left PICAXE and a surface mount capacitor under the right PICAXE.

decoupling.png

In addition to that, the 7805 regulator also requires some capacitors, which you can see in the datasheet.
 

Mejlby

Member
super - I'll try to mount these and see if this helps
thanks for the help

do you have any comments to your codes?
 

nick12ab

Senior Member
do you have any comments to your codes?
Yes. You have lots of subroutines for time delays where all that changes between them is the number used to define the length of the delay. You can do this with just one subroutine, where a spare variable is set to the delay you want before it is called.

So instead of having for b0 = 1 to 40, b0 = 1 to 50, b0 = 1 to 60 etc. you could have for b0 = 1 to b6. Before calling the subroutine min, set b6 to 40, 50, 60, etc. according to what you want.
 

Mejlby

Member
Hello nick12ab

Now I try to put capacitors where you showed it and also put them before and after the current regulator 7805. But I still have noise or static Electricity. As soon as I use a battery I have no problems - but if I use a power supply so it does not work - only if I keep a finger on a wire to ground

please try to see my video: https://www.youtube.com/watch?v=l0Uv1PuE71M

I have also tried to use a power supply for a PC - but the problem is the same

do you have any suggestions for a solution

Best regards
Tonny
 

JimPerry

Senior Member
Sounds like your electrical wiring is faulty - with no common ground to your outlets - get it checked ASAP :confused:
 

Mejlby

Member
Hello JimPerry

I do not understand what you mean with "no common ground to your outlets" or " electrical wiring is faulty " ?

I started doing the circuit and then I made a print board and soldered all the components on.

see the board: View attachment Board.pdf

Try to see my circuit that I have previously attached. Can you based on this see where I do not have "common ground".

I've tried several different board - with different projects, but has ALWAYS problems with noise or static electricity as soon I use a power supply - never if i use a battery !!

Now I soon give up !!

it may be possible to use a power supply - and not a battery .... BUT what is the solution.

does anyone have a circuit that shows what I'm doing wrong ?????

sincerely,
Tonny
Denmark
 
Last edited:

nick12ab

Senior Member
it may be possible to use a power supply - and not a battery .... BUT what is the solution.
The obvious has been missed by everyone! (including me)

There is no download circuit on the PICAXEs, not on the breadboard and not on the PCB. As a result, the Serial In pin floats and if the PICAXE senses it go high, it will stop running your program.

To fix it, just solder a 10k resistor between the Serial In pin and 0V on the PCB.

Even if this alone fixes it, you should still add the decoupling capacitors to the PCB anyway.
 
D

Deleted member 67719

Guest
This was my recent solution to cut down on battery usage. Those motors and servos drained my 9 volt pretty quickly...

IMG_0761_test.JPG
 

JimPerry

Senior Member
Try to see my circuit that I have previously attached. Can you based on this see where I do not have "common ground".

I've tried several different board - with different projects, but has ALWAYS problems with noise or static electricity as soon I use a power supply - never if i use a battery !!
If you always have problems with a mains powered PSU - it points to something wrong with the Earthing/Grounding of the PSU or socket you are using :confused:
 

Mejlby

Member
Hello Nick12ab

It was a really good advice you gave me. immediately when I soldered a 10K resistor on pin 3 (serial in) to 0V - the problem was solved

For about 5 years ago I started to explore the PICAXE. Right from the start I have had the problem of noise when I use a power supply.

I have previously asked here in the forum for a solution - but without result

super super - now I'm really happy - you've made my day

many many thanks - I hope others can use your advice

you are fantastic - thank you

best regards
Tonny
Denmark
 
Last edited:

Mejlby

Member
Hello

what exactly did you do - I see no 240V power supply in your picture ???

(In denmark we have the 240V AC) I think that in England and the United States use 110V AC)

best regards
Tonny
Denmark
 

Circuit

Senior Member
In England we also use 240V AC. The "plug" in the picture IS the power supply; he is using what is commonly called in slang a "wall-wart" power unit. The step-down is accomplished in the slightly oversized plug itself - usually using a "switch-mode power supply". The device is of the type that is often used to charge mobile telephones etc. Quite ubiquitous as far as supplies are concerned.
 

AllyCat

Senior Member
Hi,

when I soldered a 10K resistor on pin 3 (serial in) to 0V - the problem was solved
You're not the first (and won't be the last) to discover this; It's mentioned so often on the forum and in the PICaxe documentation that we tend to "forget" to offer it as a solution. For example Manual 1 on page 8 says:

Serial download pin:
The serial download pin must never be left floating. This will give unreliable operation. Always use the 10k/22k resistors as shown below, even if the chip was programmed on a different board.


But IMHO anyone who leaves the download pin floating has made TWO serious mistakes. The first is obvious (unreliability), but the second is that the "download" circuit is SO USEFUL for program development and debugging. The SERTXD command can report all types of "status" information to the (or a) terminal emulator program. More advanced users can use SERRXD to modify how the program runs (but try to include a RECONNECT to avoid the need for a Hard Reset before reprogramming), and of course updating the chip software can become a trivial task.

If space is critical then just include 3 pins (like the "old" PICaxe boards) or even just three solder-pads. But my advice is to ALWAYS INCLUDE THE PROGRAMMING RESISTORS ON ALL PICAXE BOARDS.

Cheers, Alan.
 

Mejlby

Member
hi all

thanks to everyone who has helped to solve the problem as I always had with PICAXE when I have time to enjoy myself in my hobby room. I have made many things - but always had problems with PICAXE projects. Now - after I've got a solution of the problem, I have more interest in doing fun projects with PICAXE.

Usually I work with analog circuitry - just for fun - I am an "old man on 61 years" but still very active in the business. (Building constructions)

My last project is a go-kart for my little 5 years daughter ... (yes ...... I have a 5 year daughter and I enjoy the life - ha ha ha ha - it keeps me young)

I made the go-kart and the motor controller. It is a PWM motor controller and can handle 50amp without heatsink on the 4 pieces mosfet. If anyone is intrested - then see the go-Kart on this link https://www.youtube.com/watch?v=iZFRlGNEJqw

(in the end of the video I have shown the circuit.)

have a nice day and take care

Best regard

Tonny
Denmark
 
Last edited:
Top