CHI030A Issues

Pat13

Senior Member
Hi all, I am using a CHI030A to control some pneumatic solenoids for a Halloween project. Solenoid 1 was wired to B.0, solenoid 2 to B.1. I was getting no response from B.0 (checked for voltage across darlington and +12VDC and nothing). I swtiched solenoid 1 to B.2 and all was running fine, however, the last line of my code tells B.2 to go low and it isn't. the rest of the code seems to be running fine. Could I have a bad module and/or a bad darlington?
here is the code.

Code:
'#18M2 Flying witch 
symbol Up_Away = B.2
symbol Side2Side = B.1


Start0:
		Flying:
                	High Up_Away
                	pause 3500
                	Low Up_Away
		    	pause 2000
		     	High Up_Away
                	pause 3500
                	Low Up_Away
		    	pause 2000
		    	High Up_Away
               	pause 4000
                	Low Up_Away
                
                	
			
			
Start1:
		 Swoop:
		      pause 1000
                	High Side2Side
                	pause 2500
                	Low Side2Side
                  pause 2500
			High Side2Side
                	pause 2500
                	Low Side2Side
		    	pause 2500
		    	High Side2Side
             	pause 2500
                	Low Side2Side
Solenoids are 400 milliamps each and I have a 1N4007 diode across each of the darlington pins and +V.
 
Last edited:

SAborn

Senior Member
What current is the rating on the solenoids, as they too might be overloading the darlington.
Some solenoids can draw lots of amps.

Your display appears to have a good design for lots of magic smoke but little magic, if you dont learn to work within the current ratings of components.
 

Pat13

Senior Member
What current is the rating on the solenoids, as they too might be overloading the darlington.
Some solenoids can draw lots of amps.

Your display appears to have a good design for lots of magic smoke but little magic, if you dont learn to work within the current ratings of components.
LOL Saborn, no magic blue smoke yet! The current rating of the solenoids is 400 milliamps, According to the CHI030 data sheet, each output is rated for 800 milliamps. I also have a 1N4007 diode across the output and +V.
 

Pat13

Senior Member
So, given that the solenoids are well within the current ratings of the board, and that the board is protected from EMF by a diode (wired in the correct direction), it still doesn't explain why B.2 doesn't go low, when the code is telling it to go low. I tried putting a pause after the low command but still nothing.
 

nick12ab

Senior Member
So, given that the solenoids are well within the current ratings of the board, and that the board is protected from EMF by a diode (wired in the correct direction), it still doesn't explain why B.2 doesn't go low, when the code is telling it to go low. I tried putting a pause after the low command but still nothing.
Your code doesn't have any labels to go back to the start of each task. Try this:
Code:
'#18M2 Flying witch 
symbol Up_Away = B.2
symbol Side2Side = B.1


Start0:
		Flying:
                	High Up_Away
                	pause 3500
                	Low Up_Away
		    	pause 2000
		     	High Up_Away
                	pause 3500
                	Low Up_Away
		    	pause 2000
		    	High Up_Away
               	pause 4000
                	Low Up_Away
                  goto start0
                	
			
			
Start1:
		 Swoop:
		      pause 1000
                	High Side2Side
                	pause 2500
                	Low Side2Side
                  pause 2500
			High Side2Side
                	pause 2500
                	Low Side2Side
		    	pause 2500
		    	High Side2Side
             	pause 2500
                	Low Side2Side
                	goto start1
 

jedynakiewicz

Senior Member
...according to the CHI030 data sheet, each output is rated for 800 milliamps.
Not quite so... the later version of CHI030A gives 500mA - but you need to look up the ULN2803A datasheet to get the whole picture.
There is a graph showing peak current as a function of duty. Only one output at a time is allowed at 500mA. The graph also has a recommended maximum for ALL outputs as 400mA; therefore you don't have quite the latitude that you are indicating. The graph shows the maximum permitted current for 1,2, 3 etc. outputs at 0 to 100% duty cycle. 500mA is available for each output, but not all at once by any means. For example, all outputs working at 50% duty cycle only have 300mA available to them. All outputs working at 100% duty have a peak collector current of only 150mA.
To quote from one datasheet "Typical power loads totaling over 260 W (350 mA x 8, 95 V)can be controlled at an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously" But the keywords are "appropriate duty cycle" and "ambient temperature". - and the 95v does not apply to the 2803a but to the 2823 and 2824 versions (the 2803A maxes out 50V)
I think that you should have 400mA available at 100% duty cycle on two outputs at the same time however, so I doubt that this is your problem; nevertheless I thought that I should just clarify that you appear to be at the top end of the scale without the latitude that you think that you have.
 
Last edited:

Pat13

Senior Member
Yes that works, nick12ab. The confusion I am having is that in the "Swoop" section of the code, when the low command is given, the pin goes low. In the "Flying" section, when the final low command is given, the pin stays high. It should go low but it isn't. Incidently, this will be part of a larger code that will also be running a 12VDC motor, a relay to turn on a smoke machine and (hopefully) some RGB LED eyes. I had isolated this code to get the correct air pressure for the cylinders and to tweak the movement of the animatronic.
 

Pat13

Senior Member
Not quite so... the later version of CHI030A gives 500mA - but you need to look up the ULN2803A datasheet to get the whole picture.
There is a graph showing peak current as a function of duty. Only one output at a time is allowed at 500mA. The graph also has a recommended maximum for ALL outputs as 400mA; therefore you don't have quite the latitude that you are indicating. The graph shows the maximum permitted current for 1,2, 3 etc. outputs at 0 to 100% duty cycle. 500mA is available for each output, but not all at once by any means. For example, all outputs working at 50% duty cycle only have 300mA available to them. All outputs working at 100% duty have a peak collector current of only 150mA.
I think that you should have 400mA available at 100% duty cycle on two outputs at the same time however, so I doubt that this is your problem; nevertheless I thought that I should just clarify that you appear to be at the top end of the scale without the latitude that you think that you have.
Thanks jedy, this could be a game changer as I am hoping to run quite a lot off of the CHI030A (the two solenoids, a 12VDC vent motor [no data sheet available], and a couple of LEDs). I guess i could add a couple of relays for the solenoids.
 

Pat13

Senior Member
I have been running this program for fifteen minutes using the two 400 milliamp solenoids and the 12VDC vent motor and have not had any issues. Considering that the finished program will only run for 13 seconds and will not be able to be re triggered for two minutes, I think the CHI030A will do just fine. Still not sure why the pin wasn't going low.

Code:
'#18M2 Flying witch 
symbol Up_Away = B.0
symbol Side2Side = B.1
symbol Head = B.2



Start0:

		Flying:
		do
			High Head 'turn head on and leave it on until "goto Waiting"
                	High Up_Away
                	pause 3500
                	Low Up_Away
		    	pause 2000
		     	High Up_Away
                	pause 3500
                	Low Up_Away
		    	pause 2000
		    	High Up_Away
               	pause 3500
                	Low Up_Away
                	Low Head
		loop
			
Start1:
		

            Swoop:
            do
                	High Side2Side
                	random w3
                	w4=w3//1000 + 5000 'random ON time between 1 and 5 seconds
                	pause w4
                	Low Side2Side
                	random w3
                	w4=w3//1000 + 3000 'random OFF time between 1 and 5 seconds
		    	pause w4
			High Side2Side
                	random w3
                	w4=w3//1000 + 5000 'random ON time between 1 and 5 seconds
                	pause w4
                	Low Side2Side
                	random w3
                	w4=w3//1000 + 3000 'random OFF time between 1 and 5 seconds
		    	pause w4
		    	High Side2Side
                	random w3
                	w4=w3//1000 + 3000 'random ON time between 1 and 5 seconds
                	pause w4
                	Low Side2Side
		loop
 

SAborn

Senior Member
The ULN2803 driver has built in diodes so you dont need the diode across the solenoids, the extra diode you added might be causing the problem and holding the solenoid latched.

Try removing the external diodes.
 
Top