Aluminum and mercury ion detection