> Has anyone designed a digital combination lock with 6 or 7 digits that > can operate a solenoid, that the combo is user programable? I have not myself built such a thing, though they are fairly common. If you don't mind my asking, what is the application? There are a number of things to consider when designing such locks: [1] The possibility of an adversary trying out lots of combinations; you should design the lock with some sort of temportary lockout for bad entry attempts, but... [2] The lock should be reasonably immune to denial-of-service attacks, and might possibly include an alert of such attacks. This could be esp. critical in something like an exterior entry lock; an assailant who knew when his victim was expected could enter many bogus codes to make the lock "shut down", and then jump the victim while she tried to enter. Electrical denial-of-service attacks can also be an issue; be sure that all PIC inputs are well-protected (large resistors combined with caps and/or zeners to ground should do fine for this). [3] If your device is to be battery-powered, you should consider that sol- enoids are very power-hungry. If it's wall-powered, you may want to plan contingencies in case the power fails. You may instead be better- served by a couple of alternative design methods: (1) A motor to lock/unlock the door may require much less current than a solenoid, though it may not actuate quite as fast. (2) You might want to consider using a lock/unlock pair of solenoids like those found in a model train "switch". These require a fair amount of current, but only for a brief fraction of a second; you could probably use a switched coil to charge a cap and then have that cap feed through an SCR or somesuch into the coil. I don't know offhand what size cap you'd need, though. (3) Electromagnets which are in contact with something can be much less power-hungry than solenoids. You might consider a design where the door handle tries to move an electromagnet away from a striker; when the handle is in "resting" position, the magnet will be against the striker, so energizing the magnet while the handle is pulled will pull the striker. (4) If the device will be manually locked, and will not be subject to jarring or other such abuse, you might want to have the striker spring-loaded to open, but have it held closed by a permanent mag- net which was trying to grab an electromagnet. Energizing that electromagnet with the right polarity would repel the permanent magnet with less current than would be required to "draw" it in.