Solenoid

kidagain

New Member
First of all I have to thank you for the picaxe idea, I'm 42 and I hadn't have that fun since I found Visual Basic. I'm a chemist and I'm completely new to electronics, so forgive me if I don't use the appropriate terminology or have to say What !!! to your answer.

I made my firsts bread boards and I successfully connected my 28X to my computer for both programming and picaxe-computer communication and interaction (what a rush, believe me: The thing did what I requested to) . I connect a couple of LEDs and LDRs and there it was, a light sensor speaking to a computer (by then I was near to a hart attack).

Then came the sorrow: I took the Solenoid project from David Lincon's book, It wasn't that satisfactory but it seems (key word) to work. however I decided to connect all together and I "ironed" my connections project to a copper plate (even that sticker process work nice), but I started to have problems with the program download (part of the 28X software "burned" but it still worked if I reset it as the software says when no connection is found), then the solenoid still seems to work but without the same strength that showed when I connected directly to the 12 v source. Then catastrophe happened with a program, 20000 ms cycle (on/off) of the solenoid. after a while, everything stopped and the 28X was gone. I wonder if the solenoid ground shared with the 28x power ground were the cause, so I intend to complete separate both grounds but nothing happened with the solenoid, not a spark of magnetism. I read some of the solenoid advice request in the forum and it seems to this old fella that probably solenoids weren't that simple to control, please take a look on my schematics and remember I only catch soft balls

The solenoid showed 0.19 Amperes when connected directly to the 12v source

I forgot, the idea is to detect the plunger upper and lower position with the light barriers

The diagram is on
http://tinypic.com/4c094xe.jpg
 

moxhamj

New Member
Lots of possibilities - need to work through them all...
I presume the picaxe supply and the 12V supply have a common earth point rather than a looped earth run (just thinking of current flow from the solenoid return changing the picaxe earth).
Strange that the solenoid had less power through the transistor. Suggests the transistor wasn't fully on. Try connecting the drive to 5V (via the 1k) then measure the solenoid current and compare with the current with no transistor.
The picaxe ought to have a 0.1uF and a 33uF at the very least across its power supply. These might be there but they are not on the schematic.
Picaxes often need the hard reset when downloading, especially if there is a serin or long pauses in the last downloaded code.
High currents from solenoids can couple into unusued input pins. Ground all unused inputs with 10k resistors.
Thats a few ideas to start, and I'm sure others will have some as well. Having cooked a few 28's myself and never worked out why, I use 08M's for almost everything now. Cheaper if they get zapped, and can do as much as 28s in dual/triple core configurations.
 

SD2100

New Member
A couple of things,

Pin numbers on right side of chip are back to front.

All pins are connected together on the right side on the chip.

LDR's should be going to the ADC inputs otherwise gradually changing light on the ldr could cause the digital input to flicker on and off.

Unused inputs need to be grounded using 10k resistors.

Solenoid 0v should be connected to 0v on 28x supply.

Put filter capacitors on 28x supply.

Stay with building the circuit on the breadboard until all the bugs have been ironed out then make the printed circuit board.

Post your program as well, there might be something in there someone could help you with also.


Edited by - Phil75 on 07/12/2006 05:04:48
 

kidagain

New Member
Dr_ Acula:

- I connected both supplies to a common earth when I burned the 28x. In the schematics I posted I connected each supply with their one ground with a connection between 12 v ground and the transistor E leg (is that looped?)

- Connecting the drive to 5v : Do you mean get riddle of the transistor, connect 5+ to the output pin trough the 1 K and grounded together picaxe and solenoid?

- It seems that I took the picaxe power supply from a very schematic example on the pg 19 on the Picaxe Manual (I know my lousy fault) Do you have an easy example that I can get from the net. What I found on the Lincoln's book was confusing for me, and the manual show connections for wall adapters (not getting there yet, only AAA batteries), or just simple as, two no polarized capacitors in any order right after the supply connectors

- Believe me get my precious 28x in Colombia - South America, is slightly not that easy, so when i started I went right to the 28's instead of the 8's, but when I feel more comfortable I´ll try chain the 8's (be prepared ).


Phil75

- Right, I thought I had the numbers fixed

-Probably pins seem connected (they are not) but that is because I made the graph on Excel to match with the bread board and left the cells lines

-In my LDR bread board I connected them right. Don't know what I was thinking.

-Silly question: If I have the Solenoid 0 v connected to the picaxe 0v, what should I do with the 0 v cable from the 12 v power supply?

-I don't really have a program yet I just want to have all together and make sure each element work when connected on the same board, once I have them right my next estep will be to try to witte a program for them to sing along

Thank you both for your time and pacient answer

great thing those chips that still work after that mess

I was also wondering, when my bread boards worked OK they were connected to computer (so grounded through the pc), either for control or program connections or both, and when I burned my 28 out the board was alone, cycling the solenoid (turning on and off. Is there any need for additional ground connections when the circuit is not connected to a computer?

I modified the circuit according to your suggestions, except for the 10 K ground for free pins to have a cleaner graph and the supply capacitor (not quite sure how to connect)


http://i13.tinypic.com/4fttl75.jpg
 

moxhamj

New Member
Re driving the transistor, you still need the 1k resistor to limit drive current. This is to see if the problem is the picaxe or the transistor.

Re the power supply, the common earth point ought to be the -ve of the solenoid power supply at the supply/battery. If the common earth, say, were the transistor E at the transistor AND the wire from the transistor to the solenoid power supply were thin, then even though it would look the same on the schematic, the earth of the picaxe would not stay at 0V when the solenoid was turned off.

Re the power supply, 3 batteries is fine but still put a 33uF and a 0.1uf across the power supply pins of the chip. The caps smooth any transients. If you use a plugpack (any volts DC from 7 to 20), use a 78L05 reg, and still put the 33uF/0.1uf at the chip.

Re distance from shops, precious chips = much angst when they go kaput. http://www.microzed.com.au/ ship internationally from Australia and I'm sure lots of other companies ship internationally as well. I'd buy 10 08M's - you will end up using them!

I've had problems with picaxes resetting if there are high currents near them -eg 10A DC within about 5cm, and 240V/5A within about 30cm. Solution is to modularise the circuits. Eg, the solenoid/solenoid power supply/transistor/1k resistor is one module. Touch the 1k to 12V to test it works. This module has two wires to control it - an earth wire connected to the 12V negative, and a control wire connected to the 1k resistor. These wires can be thin. This module can sit on one side of the bench, and the picaxe can sit on the other side. Less chance of things being zapped.

Edited by - Dr_Acula on 08/12/2006 23:07:40

Edited by - Dr_Acula on 08/12/2006 23:27:13
 

Mycroft2152

Senior Member
A couple of notes on the 78L05 regulator:

The 78X05 series does require a couple of volts as overhead, so a 7 volt wall wart is a minimum. Higher voltage will converted to heat. There are other "low drop out" regulators that need less voltage overhead.

The "L" version is only good for 100 milliamps. More than enough for the picaxe and a few LEDs. For anythng more go to the regular 7805 which can provide up to 1 amp.

Don't forget the capacitors on the input and outputs! Some DC wall warts have a very bad AC ripple. The caps make a huge differencve.

Myc
 

kidagain

New Member
It took me a while to complete digest your suggestions, rather they were not very complex (for you not for me I mean), I went to other advice requests related to, went back to the book and manual, and I think I pretty much did what I was suppose to correct.

-I grounded all inputs with 10 K 's
-Connect the 100 micro F electrolytic condenser as close as possible to the Picaxe power source. the minus leg to the 0 v and the other to + 5
-Connect the 0.1 micro F polyester condenser between 0 V and +5 just ahead the 19 and 20 legs of the picaxe
-Connect Transistor E leg to 0 v right between the pic power and the 100 micro F electrolytic condenser

And the solenoid worked !!!!

For people like me that believe in God this is a very appreciated Christmas gift, and I thanks him for people like you and open an generous ideas like Picaxe

one last question, any ground connection should better go between the power and the electrolytic condenser ?

Happy new year !

Thank you very much for your support
 
Top