Is there any indication that Charles Peirce was aware of Babbage and his work on mechanical computing?
Not only was Peirce aware of the difference engine, he was also aware of the analytic engine, that was never built, of Jevons's 1870 machine, and was later personally involved with designing its improved version by his student Marquand in 1880-s at Johns Hopkins (a diagram of an electrical 'logical machine' possibly drawn by him was found among Marquand's papers by Church). It was at that time that Peirce invented relational calculus with quantifiers independently of Frege.
Peirce wrote Babbage's obituary published in The Nation on November 9, 1871 that shows uncanny familiarity with the details of Babbage's project and gives a glowing appraisal of it ("beyond question, the most stupendous work of human invention"). At the same time, Peirce saw severe limitations to what such machines can do, and did not subscribe to the "computational theory of mind", see Ketner, Peirce and Turing for details. In 1894 Peirce wrote (some see it as an anticipation of Turing's limiting result concerning the halting problem):
"Some mathematical results, doubtless could have been worked out with Babbage's analytical engine; but did anyone ever suppose that the subject could at all really be advanced by such a machine?... Even syllogistic reasoning in its higher varieties as they appear in the logic of relatives, requires a living act of choice based on discernment, beyond the powers of any conceivable machine; and this sufficiently refutes the idea that man is a mere mechanical automaton endowed with an idle consciousness."
Peirce's other thoughts on such machines are expressed in a 1886 letter to Marquand that suggested the use of relays to implement AND and OR, 1887 paper Logical Machines, 1900 manuscript Our Senses as Reasoning Machines, and in 1902 notes. Further references on Peirce's involvement with "reasoning machines" and his possible influence on the development of digital computers are collected in this Narkive thread.
The original source of Charles's familiarity was likely his father Benjamin, a well-known mathematician with a keen interest in logical machines that Charles shared. Benjamin was a leader of a small group of New England scientists, known as "Scientific Lazzaroni", a member of which, astronomer Gould, personally met with Babbage in 1845, and had the difference engine explained to him. In 1853 American Association for the Advancement of Science, at a meeting presided over by Benjamin, passed a resolution expressing "deep interest" in completing the analytic engine. In 1857 Sheutz's difference engine, built at Babbage's encouragement, was purchased by the Dudley observatory with Gould's mediation for $5000, leading to a major row with the Dudley Board of Trustees.
From Peirce's obituary of Babbage, which is quoted in full by Ketner:
"About 1822, he made his first model of a calculating machine. It was a 'difference engine', that is, the first few numbers of a table being supplied to it, it would go on and calculate the others successively according to the same law... In 1833, a portion of the engine, sufficient to illustrate the working of the whole, was put together. It was a wonderful piece of workmanship, of a precision then unknown, and still unrivalled. To make it, it had been necessary not only to contrive new tools, but to lay a scientific foundation of the principles of tools, and to educate the mechanics who were to use them.
In 1833, Mr. Babbage declined to continue this system, and, in consequence, the engineer discontinued the construction of the engine, dismissed the workmen, and took away all the tools. During the suspension of the work caused by this circumstance, the great misfortune of his life befell Mr. Babbage. He discovered the possibility of a new analytical engine, to which the difference engine was nothing; for it would do all the arithmetical work that that would do, but infinitely more; it would perform the most complicated algebraical processes, elimination, extraction of roots, integration, and it would find out for itself what operations it was necessary to perform; and the principle of this machine was such as immensely to simplify the means of attaining the object of a difference machine.
One would suppose that, finding himself so unlucky as to have thought of such a thing, Babbage would at least have had the sense to keep it strictly to himself. Instead of that, he wrote immediately and communicated it to the Government! Before that, all was going smoothly; after that, they never would advance another penny... But the analytical engine is, beyond question, the most stupendous work of human invention. It is so complicated that no man's mind could trace the manner of its working through drawings and descriptions, and its author had to invent a new notation to keep account of it. This mechanical notation has been found very serviceable for simpler cases."